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

Fix force broadcast in herder #2650

Merged
merged 2 commits into from Aug 4, 2020

Conversation

MonsieurNicolas
Copy link
Contributor

This PR fixes a couple issues.

First is a major issue with how SCP messages are broadcasted: broadcast has a force flag to force sending the latest SCP message to peers, but from what I can tell, that flag never worked.

  • Impact of this is that the function HerderImpl::rebroadcast() was actually not doing anything, which in turn may cause various issues like peers potentially missing SCP messages or connections getting idle (if SCP rounds take too long, an issue mostly in test cases as real networks have transactions flowing)

The second issue is minor, in that it doesn't really impact production/testnet and only test cases:
In test cases we have situations where we bootstrap a new network, and lose sync within the first few ledgers (before MAX_SLOTS_TO_REMEMBER=12 ledgers).

When this happens, we want to ensure that we continue to process SCP messages, regardless of their timestamp.

The old code was approximating "never been in sync" by just looking at the ledger window, which is inaccurate.

it was preserving mPeersTold so "force" never worked...
In test cases we have situations where we bootstrap a new network,
and lose sync within the first few ledgers (before MAX_SLOTS_TO_REMEMBER=12 ledgers).
When this happens, we want to ensure that we continue to process SCP messages,
regardless of their timestamp.

The old code was approximating "never been in sync" by just looking at the ledger
window, which is inacurate.
@MonsieurNicolas MonsieurNicolas added this to In progress in v14.0.0 via automation Aug 4, 2020
Copy link
Contributor

@rokopt rokopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicolas and I went over these changes in a call, and they look good to me.

@MonsieurNicolas
Copy link
Contributor Author

r+ 4526d39

@latobarita latobarita merged commit 264f9d5 into stellar:master Aug 4, 2020
v14.0.0 automation moved this from In progress to Done Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v14.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants