fix(consensus): restrict collected signatures to shard members - #986
fix(consensus): restrict collected signatures to shard members#986hackobi wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CI follow-up: the repository workflow previously created zero jobs because of a duplicate trigger key. That syntax issue is isolated in draft PR #988. With the repair applied, Type Check and Sonar checks pass; repository-wide Lint still fails on the existing baseline (222 errors, 757 warnings). PR #986 remains draft and is not merge-ready. |
|
Independent review found a blocking gap tracked in #990: verifyBlock() excludes outsider signatures from quorum but syncBlock() can still pass the original block to Chain.insertBlock(), which stores validation_data unchanged. The review also found inconsistent identity casing between membership filtering and exact finality lookups. Do not approve or merge #986 until the acceptance/storage boundary and casing behavior are covered. Attempted focused regression execution was blocked by existing harness/module-resolution failures under both Bun and Jest. |
Summary
Security rationale
The Petri review identified a quorum-inflation risk: a cryptographically valid signature from an identity outside the current shard could be stored and later counted. This draft addresses that specific signer-membership gap. It does not claim to resolve vote freshness, block-height/round binding, shard derivation, block acceptance, or transport authentication; those require separate review work.
Verification
bun test src/libs/consensus/v2/routines/signerMembership.test.ts— 3 passed.getShard.test.tsfailed before reaching assertions because Bun does not provide the repository test'sjest.requireMockAPI.bunx eslint@8.57.1 ...— passed.bun run type-check-ts— blocked by unrelated pre-existing repository errors (TLSNotary config, transaction types, GCR APIs, and other baseline diagnostics).Review status
This remains a draft pending independent consensus review, maintainer review, CI validation, and integration coverage through both changed code paths. No approval is claimed from the preliminary automated review attempts.
Checklist
broadcastBlockHashandmanageProposeBlockHash.