Skip to content

docs(core-consensus): fix stale comment on round certificate validation#1570

Open
lau90eth wants to merge 1 commit into
circlefin:mainfrom
lau90eth:lau90eth/fix-stale-comment-round-certificate
Open

docs(core-consensus): fix stale comment on round certificate validation#1570
lau90eth wants to merge 1 commit into
circlefin:mainfrom
lau90eth:lau90eth/fix-stale-comment-round-certificate

Conversation

@lau90eth

@lau90eth lau90eth commented Jul 3, 2026

Copy link
Copy Markdown

Closes: #1569

Summary

The comment above on_round_certificate in handle/liveness.rs states:

There is currently no validation of the correctness of the certificate in this function. A byzantine validator may send a certificate that does not have enough votes to reach the thresholds for PrecommitAny or SkipRound.

This is no longer accurate. Commit 961fa4e ("fix: Reject certificates with any invalid signature") added full validation via verify_round_certificate in signing/src/ext.rs:

  • Rejects duplicate votes from the same validator
  • Rejects votes from unknown validators
  • Rejects mismatched vote types for Precommit certificates
  • Verifies each individual signature
  • Enforces the 2f+1 (quorum) threshold for PrecommitAny and f+1 (honest) threshold for SkipRound

The comment was never updated after that fix landed, which could mislead future contributors into thinking this validation gap still exists.

Change

Updated the doc comment to accurately describe the current validation behavior.

No functional changes.

The comment claimed round certificates were not validated for
sufficient voting power. This was true prior to commit 961fa4e
(fix: Reject certificates with any invalid signature), which added
full validation via verify_round_certificate: per-signature checks,
duplicate-vote detection, and the 2f+1/f+1 threshold check. The
comment was never updated to reflect this.
@lau90eth
lau90eth requested review from ancazamfir and romac as code owners July 3, 2026 15:12
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Hi @lau90eth,

Thank you for your interest in contributing to Malachite.

This PR has been automatically closed because you are not assigned to issue #1569. We require contributors to be explicitly assigned to an issue before submitting a PR.

To contribute properly:

  1. Comment on issue Stale comment on round certificate validation in handle/liveness.rs #1569 requesting assignment
  2. Wait for maintainer approval
  3. Only submit a PR after you have been assigned

Please see our CONTRIBUTING.md for more details.

@github-actions github-actions Bot added the need-triage This issue needs to be triaged label Jul 3, 2026
@github-actions github-actions Bot closed this Jul 3, 2026
@romac romac added documentation Improvements or additions to documentation and removed need-triage This issue needs to be triaged labels Jul 7, 2026
@romac romac reopened this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale comment on round certificate validation in handle/liveness.rs

2 participants