Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate the download and verify stream when the mempool is activated #2628

Closed
Tracked by #2309
mpguerra opened this issue Aug 13, 2021 · 6 comments
Closed
Tracked by #2309
Labels
C-enhancement Category: This is an improvement

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Aug 13, 2021

Motivation

Specifications

Designs

Related Work

@mpguerra mpguerra mentioned this issue Aug 13, 2021
59 tasks
@mpguerra mpguerra added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Aug 13, 2021
@mpguerra mpguerra added this to the 2021 Sprint 19 milestone Aug 26, 2021
@mpguerra
Copy link
Contributor Author

@conradoplg
Copy link
Collaborator

Since the stream is not a service, it's just something that is called by whoever wants it, then checking if the mempool is activated must be done by the callers. This will be done for the inbound service in #2679 but in this ticket we can ensure the check is being done wherever it's needed (and maybe refactor it if needed)

@teor2345
Copy link
Contributor

teor2345 commented Aug 30, 2021

Since the stream is not a service, it's just something that is called by whoever wants it, then checking if the mempool is activated must be done by the callers.

Streams and services get called by tasks, but they can also do their own checks when they are called.
I'd like to do most checks inside the stream/service, so different callers get consistent outcomes.

The download and verify service can call SyncStatus::is_close_to_tip to check if the mempool is inactive.

If the mempool is inactive, it needs to:

  • cancel all downloads
  • cancel all verifications
  • return None to the caller

(If Zebra's network connection is interrupted for a long time, we'll want to deactivate the mempool while we're catching up to the new tip.)

Edit: but this is mostly ticket #2629

@teor2345
Copy link
Contributor

I think you're right, there's not much to be done to activate the download and verify stream.
(Maybe we created this ticket when we thought it was going to be a task?)

@mpguerra
Copy link
Contributor Author

mpguerra commented Sep 1, 2021

I wonder if this is something that will be covered by an issue that @dconnolly has been talking about opening with the init() function?

If so, should we just close this one?

@teor2345
Copy link
Contributor

teor2345 commented Sep 2, 2021

Yeah let's just close this one.

@teor2345 teor2345 closed this as completed Sep 2, 2021
@mpguerra mpguerra removed this from the 2021 Sprint 19 milestone Sep 2, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: This is an improvement
Projects
None yet
Development

No branches or pull requests

3 participants