test: SszSpecTest#959
Conversation
|
@claude please review this pr |
|
Claude finished @shane-moore's task in 1m 28s —— View job Review: PR #959 —
|
|
@claude On (1): I agree in the abstract, but I think it is outside the current fixture contract for this test type. I also agree with your other two observations: the lack of |
|
Claude finished @shane-moore's task in 14s —— View job
Agreed on all points. The withdrawals-specific scope of |
2fba261 to
14f4072
Compare
14f4072 to
794386b
Compare
Problem, Evidence, and Context (Required)
Anchor is missing the
SSZSpecTesttype fromssv-spec, leaving SSZ-level parity with the Go reference unverified for proposer consensus data. Regressions in withdrawals merkleization orProposerConsensusDatadecoding are currently uncovered by the spec-test suite.Part of the spec-test expansion in #954 (split from #840); sub-issue #955.
Change Overview (Required)
Adds an
SSZSpecTestrunner that mirrors Go'sSSZSpecTest.Run(): decodeProposerConsensusDatafrom SSZ, extract the beacon block (blinded first, then full), and assert the execution-payload withdrawals root matches the fixture's expected root. Wired into the type dispatcher under"ssz.SSZSpecTest"with one fixture.Intentional non-changes:
ExpectedErrorCodeis not asserted, matching the upstream Go runner. The generator emits only success fixtures today; Anchor-only enforcement would diverge from the reference contract.Risks, Trade-offs, and Mitigations (Required)
The Capella fixture uses placeholder BLS values that Lighthouse rejects during SSZ decode (
BLST_BAD_ENCODING) but Go'sfastsszaccepts. So the defaultcargo test -p spec_testspath fails decode and never reaches the withdrawals-root assertion; it is kept only for parity with the currentssv-specrunner. The meaningful coverage path is--features fake_crypto, which skips BLS validation and verifies the withdrawals root end-to-end. #938 tracks making thefake_cryptoinvocation explicit in the Makefile / CI. Upstream fixture fix is ssvlabs/ssv-spec#622; once bumped, the fallback becomes dead code (cleanup #953).Validation (Required)
cargo test -p spec_tests: 55 passed (parity path).cargo test -p spec_tests --features fake_crypto: 55 passed (full withdrawals-root verification).cargo clippy,cargo +nightly fmt --check: clean.Rollback
N/A, test-only.
Additional Info
Remaining spec test types from #954: #956, #957, #958.