feat(code): Implement Solution 2 for the RoundSync#1032
Merged
ancazamfir merged 7 commits intoanca/gossipfrom May 16, 2025
Merged
feat(code): Implement Solution 2 for the RoundSync#1032ancazamfir merged 7 commits intoanca/gossipfrom
ancazamfir merged 7 commits intoanca/gossipfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## anca/gossip #1032 +/- ##
===================================
===================================
|
Contributor
nenadmilosevic95
left a comment
There was a problem hiding this comment.
Looks good, I did the review of this together with #997 because my understanding is that it complements it and that we want to merge it there. I left some comments but two main things are:
- do we cancel the timeout when receiving the round cert?
- do we recalculate timeoutRebroadcast to account for changes/increasing in the values of other timeouts as the round increase?
nenadmilosevic95
approved these changes
May 16, 2025
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 16, 2025
) * Add gossip messages and handling * Add the new gossip and msg handling files * Add serialization test for round certificate * Send gossip messages over /gossip channel * Reuse exsiting encode and decode vote type functions * Update version and breaking changes * Store the round certificate when new round condition occurs * On hidden lock suspicion (round > x), restream also the proposal * Add vote by vote verification for round certificate * Fix standalone build, less cloning * Less cloning * Rebroadcast the round certificate * Fix clippy * Add `RebroadcastRoundCertificate` event * Move middlewares in their own module * Add round and vote type to `expect_vote_rebroadcast` * Show log when `on_event` step fails * Add basic test for vote and round certificate rebroadcast * Update comments in test * Rename gossip to liveness * Rename gossip to liveness * For hidden lock rebroadcast the proposal message also. * Apply suggestions from code review Co-authored-by: nenadmilosevic95 <50905385+nenadmilosevic95@users.noreply.github.com> Signed-off-by: Anca Zamfir <ancazamfir@users.noreply.github.com> * Correct comments * Rebroadcast proposal and polka for HIDDEN_LOCK_ROUND also * Apply suggestions from code review Co-authored-by: nenadmilosevic95 <50905385+nenadmilosevic95@users.noreply.github.com> Signed-off-by: Anca Zamfir <ancazamfir@users.noreply.github.com> * Fix formatting * Add comments to liveness message processing * Fix spelling * Panic when certificates are not found suggesting internal errors * Add test for hidden lock * Fix reuse of RestreamProposal with nil valid round for hidden lock * chore(code): Send rebroadcast votes to the liveness topic (#1012) * Send rebroadcasted votes over the gossip topic * Send rebroadcast vote event * Rename `GossipMessage` proto to `LivenessMessage` --------- Co-authored-by: Romain Ruetschi <romain@informal.systems> * Re-use `HIDDEN_LOCK_ROUND` constant from liveness test * Update BREAKING_CHANGES.md * Cleanup debugs and consensus traces * Enable the rebroadcast wal tests * Disable again the rebroadcast mode tests * Use a single rebroadcast timer * Try fix for round_certificate_rebroadcast test * Store the enter_round with the certificate, check it matches current round on (re)broadcast * Check in test broadcast of round certificate only, no rebroadcast * feat(code): Implement Solution 2 for the RoundSync (#1032) * Implement solution 2 wrt rebroadcast timer * Change names according to spec * Cancel rebroadcast timer when round cert is received * Increase the rebroadcast timeout each round * Update the config.toml files used by tests * Apply suggestions from code review Co-authored-by: nenadmilosevic95 <50905385+nenadmilosevic95@users.noreply.github.com> Signed-off-by: Anca Zamfir <ancazamfir@users.noreply.github.com> * Apply suggestions from code review * Apply suggestions from code review * Update comments Co-authored-by: nenadmilosevic95 <50905385+nenadmilosevic95@users.noreply.github.com> --------- Signed-off-by: Anca Zamfir <ancazamfir@users.noreply.github.com> Co-authored-by: Romain Ruetschi <romain@informal.systems> Co-authored-by: nenadmilosevic95 <50905385+nenadmilosevic95@users.noreply.github.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #XXX
From the Round sync spec:
rprocesses broadcast the certificate EnterRoundCertificate, reset lastPrevote and lastPrecommit, and start rebroadcastTimeoutREBROADCAST()and starts therebroadcastTimeoutagaintimeoutRebroadcastis approximation on how long the whole round should take so it can be something liketimeoutPropose(r)+timeoutPrevote(r)+timeoutPrecommit(r)REBROADCAST() - broadcasts the current non-nil values of EnterRoundCertificate, lastPrevote and lastPrecommit
Summary of changes as compared to parent branch
anca/gossip:timeout_propose + timeout_prevote + timeout_precommitThe rest of the requirements above are already in the parent branch
PR author checklist
For all contributors
RELEASE_NOTES.mdif the change warrants itBREAKING_CHANGES.mdif the change warrants itFor external contributors