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
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
client/src/lib.rsdatabase.clone()to signature collector (1 line)validator_store/src/lib.rsvalidator_pubkeytoValidatorSigningData(1 line)signature_collector/Cargo.tomlmetrics+databasedepssignature_collector/src/lib.rstry_combine_and_verify,verify_reconstructed_signature,find_invalid_shares,fetch_share_pubkeys;CombineOutcomeenum;whileloop retry; DB wiring through manager;SignatureCollectingtraitsignature_collector/src/metrics.rsSIGNATURE_VERIFICATION_FAILURES_TOTALcountersignature_collector/src/tests.rsfind_invalid_shares,try_combine_and_verify; integration tests for happy path + fallback eviction/recoveryKey design decisions
CombineOutcomeenum for explicit control flow (Success / CombineFailed / VerificationFailed)whileloop replacesifto retry after evicting invalid sharesSignatureCollectingtrait for testabilityspawn_blockingfor DB access to avoid blocking async runtimeKnown issue to address
whileloop + eviction interaction when remaining shares still >= threshold needs review (flagged in original PR comment)Parent issue