feat(validator_store): record block-QBFT-decided beacon block roots - #1224
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epbs #1224 +/- ##
==========================================
+ Coverage 71.95% 73.03% +1.08%
==========================================
Files 168 170 +2
Lines 33797 34356 +559
==========================================
+ Hits 24317 25091 +774
+ Misses 9480 9265 -215
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@claude review this PR. Prioritise finding potential edge cases not covered and quality of tests. Ensure solution is correctly implemented against issue spec. |
|
Claude finished @jnhsigmap's task in 7m 51s —— View job PR Review: record block-QBFT-decided beacon block roots
VerdictThe implementation is correct against the stated intent. The store is written at the single post-consensus point ( Edge case not covered (1 inline)Write-side inclusive eviction boundary is unpinned. The retain keeps an entry at exactly Test-quality notes (no change required)
No blocking issues. The one inline is a small, worthwhile test addition. |
|
addressed claude review in 852aedd. also my bad with the source branch name 🤦. I will fix that up on my local after this merges. |
|
lgtm breh! will approve after you knock out the small merge conflicts |
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 28 minutes 55 seconds in the queue, including 27 minutes 4 seconds running CI. Required conditions to merge
|
Problem, Evidence, and Context (Required)
beacon_block_rootdiffers from the root the cluster decided. Nothing records that root today, so the check has no value to compare against.Change Overview (Required)
AnchorValidatorStoregains a small handoff store: a mutex-guarded map from(validator, slot)to the decided block root, written at the success point of block consensus for Gloas-and-later duties.validator_storefirst (one store field, two private helpers, one hook in the block-decide path). The two new test modules are map-level contract tests and end-to-endsign_blocktests, and they share a small fixture struct.decode_decided_block, and the store's public constructor signature.Risks, Trade-offs, and Mitigations (Required)
validator_storechanges.Validation (Required)
sign_blockpath: the stored root is the decoded block'scanonical_root()and not the QBFT wrapper hash, a conflict aborts before any threshold signature, and an Electra duty leaves the store empty.cargo test -p anchor_validator_store(79 passed), full workspacemake testin release mode,make cargo-fmt-check, andmake lintall pass.Rollback (Required for behavior or runtime changes; optional otherwise)
Blockers / Dependencies (Optional)
Additional Info / Next Steps (Optional)