Skip to content

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

Description

@lau90eth

The comment above on_round_certificate in code/crates/core-consensus/src/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 code/crates/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.

I have a small doc-only fix ready and would like to submit a PR for this.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions