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

chore: improve sync-gossip transition #2448

Merged
merged 1 commit into from
May 16, 2023
Merged

Conversation

mfrankovi
Copy link
Contributor

When node restarts and finishes syncing, transition to synced state and gossiping is often accompanied with large number of error logs. These logs are related to node getting synced or almost synced and receiving cert votes for a block but missing the actual pbft block and reward votes or dag blocks. In this PR some improvements are made to address this:

  1. In tryPushCertVotesBlock if we have 2t+1 cert votes but missing a pbft block and/or reward votes, there is a great chance that other nodes have advanced so try to resync
  2. Do not try to push cert voted block while syncing since this is very likely to fail. Only push cert voted blocks ones syncing is complete
  3. When sending final pbft sync block, mark peer as synced so that the gossiping is started at the same time node gets synced without the delay
  4. Update peer->pbft_chain_size_ earlier in propose vote processing to have more accurate peer pbft_chain_size in case restarting pbft syncing is needed

@mfrankovi mfrankovi force-pushed the sync_gossip_transition branch from bcc88d8 to ab10edd Compare May 15, 2023 14:53
@mfrankovi mfrankovi force-pushed the sync_gossip_transition branch from ab10edd to 09a5da1 Compare May 16, 2023 07:24
@mfrankovi mfrankovi merged commit e6133da into develop May 16, 2023
@mfrankovi mfrankovi deleted the sync_gossip_transition branch May 16, 2023 08:01
@taraxadeploy
Copy link
Collaborator

prnet cleaned-up successfully

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.

4 participants