-
Notifications
You must be signed in to change notification settings - Fork 117
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
Gossip recently verified block hashes to peers #2729
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far. I added one idea about how to try to simplify the code.
40d46dc
to
04eb0ca
Compare
04eb0ca
to
9af60a9
Compare
b5d91ab
to
722259b
Compare
618248c
to
3a23a40
Compare
(This is lower priority, because it's not blocking any other work.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, i made just a few very minor comments. Feel free to merge here.
Co-authored-by: Janito Vaqueiro Ferreira Filho <[email protected]>
Also improve the comments.
This type helps distinguish between syncer and state errors.
Also do a minor type cleanup on the existing test code, replacing `Option<Vec<_>>` with `Vec<_>`.
Co-authored-by: Alfredo Garcia <[email protected]>
Motivation
Zebra needs to broadcast verified block hashes to its peers, so they learn about new blocks.
Designs
Grow
andReset
chain tip changes should be sent in block gossips.Tasks can wait until they are near the tip using
SyncStatus::wait_until_close_to_tip
:zebra/zebrad/src/components/sync/status.rs
Lines 31 to 34 in 44ac067
Tasks can await tip changes using
ChainTipChange::tip_change
andTipAction
:zebra/zebra-state/src/service/chain_tip.rs
Line 313 in 44ac067
Solution
Closes #2712.
Testing
Here are the manual tests I did:
inv
messages using the Grafana dashboard: moreinv
messages than before this changeReview
@jvff or @oxarbitrage can review this PR.
Reviewer Checklist