Skip to content

feat: post-reconstruction signature verification with fallback (PR #890 split 3/4) #933

Description

@shane-moore

Context

Part 2 of the PR #890 split, per review comment. Depends on #932.

Scope

Core spec compliance (~250 LOC prod + ~400 LOC tests, 3 crates). Implements ReconstructSignature + FallBackAndVerifyEachSignature.

Files

File Change
client/src/lib.rs Pass database.clone() to signature collector (1 line)
validator_store/src/lib.rs Add validator_pubkey to ValidatorSigningData (1 line)
signature_collector/Cargo.toml Add metrics + database deps
signature_collector/src/lib.rs try_combine_and_verify, verify_reconstructed_signature, find_invalid_shares, fetch_share_pubkeys; CombineOutcome enum; while loop retry; DB wiring through manager; SignatureCollecting trait
signature_collector/src/metrics.rs SIGNATURE_VERIFICATION_FAILURES_TOTAL counter
signature_collector/src/tests.rs Unit tests for find_invalid_shares, try_combine_and_verify; integration tests for happy path + fallback eviction/recovery

Key design decisions

  • CombineOutcome enum for explicit control flow (Success / CombineFailed / VerificationFailed)
  • while loop replaces if to retry after evicting invalid shares
  • SignatureCollecting trait for testability
  • spawn_blocking for DB access to avoid blocking async runtime

Known issue to address

  • The while loop + eviction interaction when remaining shares still >= threshold needs review (flagged in original PR comment)

Parent issue

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions