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

add final flag to sync blocks message #125

Merged
merged 3 commits into from
Jul 15, 2022
Merged

add final flag to sync blocks message #125

merged 3 commits into from
Jul 15, 2022

Conversation

joecaswell
Copy link
Contributor

Add flag to blockchain_sync record to indicate final batch of blocks

joecaswell added a commit to helium/blockchain-core that referenced this pull request Mar 15, 2022
joecaswell added a commit to helium/blockchain-core that referenced this pull request Mar 15, 2022
deduplicate block send code
update rebar.lock depends on helium/proto#125
joecaswell added a commit to helium/blockchain-core that referenced this pull request Mar 15, 2022
deduplicate block send code
update rebar.lock depends on helium/proto#125
@joecaswell joecaswell requested a review from madninja July 14, 2022 20:00
@madninja
Copy link
Member

Huh, could you explain how this is useful?

@joecaswell
Copy link
Contributor Author

This is part of the fix for helium/blockchain-core#1273. If the sender is expected to notify the recipient when the final block has been sent, the recipient can gossip only the last block. When a node is catching up, such as after loading a snapshot, it is probable that most of its peers already have the intermediate blocks, so gossiping a block from every batch is essentially noise and wasted bandwidth.

@madninja madninja merged commit 52cd942 into master Jul 15, 2022
@madninja madninja deleted the jc/sync-final-flag branch July 15, 2022 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants