Round aware signatures tracker#7893
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes the sent-signature tracking “round-aware” by storing the consensus round index alongside the signed header hash for each (public key, nonce) entry, and updates competing-block detection to only delay signing when the previous signature is from the current or immediately previous round.
Changes:
- Extend
SentSignaturesTrackerto record and retrieve(headerHash, roundIndex)for a signed nonce, replacingGetSignedHashwithGetSignedNonceInfo. - Update competing-block detection in
subroundSignatureto ignore signatures from rounds older thancurrentRound-1. - Update stubs and unit tests to match the new interface and semantics (“most-recent-round-wins”).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testscommon/sentSignatureTrackerStub.go | Updates the test stub to the new RecordSignedNonce(..., roundIndex) / GetSignedNonceInfo API. |
| process/track/sentSignaturesTracker.go | Stores roundIndex with the signed hash and updates overwrite semantics to “most-recent-round-wins”. |
| process/track/sentSignaturesTracker_test.go | Expands unit tests to cover overwrites based on round index and new getter shape. |
| process/interface.go | Updates the SentSignaturesTracker interface to the new methods/signatures. |
| consensus/spos/interface.go | Updates the consensus-side SentSignaturesTracker interface to the new methods/signatures. |
| consensus/spos/bls/v2/subroundSignatureCompetingBlock_test.go | Updates and extends tests for competing-block waiting behavior using round-aware signed info. |
| consensus/spos/bls/v2/subroundSignature.go | Records signed nonce with current round index and uses round index to decide whether to delay on competing blocks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The base branch was changed.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/testnet-fixes #7893 +/- ##
===================================================
Coverage 77.68% 77.69%
===================================================
Files 885 885
Lines 125790 125803 +13
===================================================
+ Hits 97715 97737 +22
+ Misses 21594 21589 -5
+ Partials 6481 6477 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?