Skip to content

Round aware signatures tracker#7893

Merged
AdoAdoAdo merged 4 commits into
feat/testnet-fixesfrom
round-aware-signatures-tracker
Jul 2, 2026
Merged

Round aware signatures tracker#7893
AdoAdoAdo merged 4 commits into
feat/testnet-fixesfrom
round-aware-signatures-tracker

Conversation

@ssd04

@ssd04 ssd04 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Jul 1, 2026
@ssd04 ssd04 changed the title add round aware signatures tracker Round aware signatures tracker Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 SentSignaturesTracker to record and retrieve (headerHash, roundIndex) for a signed nonce, replacing GetSignedHash with GetSignedNonceInfo.
  • Update competing-block detection in subroundSignature to ignore signatures from rounds older than currentRound-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.

Comment thread consensus/spos/bls/v2/subroundSignatureCompetingBlock_test.go Outdated
Comment thread consensus/spos/bls/v2/subroundSignatureCompetingBlock_test.go
sstanculeanu
sstanculeanu previously approved these changes Jul 2, 2026
AdoAdoAdo
AdoAdoAdo previously approved these changes Jul 2, 2026
Base automatically changed from signature-time-checks to feat/testnet-fixes July 2, 2026 14:14
@AdoAdoAdo AdoAdoAdo dismissed stale reviews from sstanculeanu and themself July 2, 2026 14:14

The base branch was changed.

@AdoAdoAdo AdoAdoAdo marked this pull request as ready for review July 2, 2026 14:15
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.69%. Comparing base (dd67d4a) to head (b945171).
⚠️ Report is 6 commits behind head on feat/testnet-fixes.

Files with missing lines Patch % Lines
consensus/spos/bls/v2/subroundSignature.go 87.50% 0 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AdoAdoAdo AdoAdoAdo merged commit 8a99cd4 into feat/testnet-fixes Jul 2, 2026
12 checks passed
@AdoAdoAdo AdoAdoAdo deleted the round-aware-signatures-tracker branch July 2, 2026 14:31
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