test: add encoding spec tests for SSV types#835
test: add encoding spec tests for SSV types#835shane-moore wants to merge 9 commits intosigp:unstablefrom
Conversation
|
Claude finished @shane-moore's task in 1m 41s —— View job Code Review CompleteI've reviewed the PR and the implementation looks solid. The new SummaryThis PR adds a new Verdict: The code quality is high. I've identified a few minor improvements and one commit message typo to fix before merging. FindingsCode Quality ✅Strengths:
Minor Issues:
Testing ✅Strengths:
Observations:
Note: The actual test execution depends on fixtures in the Security ✅No security concerns identified. This is test-only code that:
Performance ✅Performance is appropriate for test code:
Documentation
|
9af9633 to
a4f509b
Compare
|
I know this code already existed, but it's hard to grasp the required context to review the changes for a person unfamiliar with it. Suggested structure:
|
Refactor: Deduplicate Encoding Tests in
|
|
luv the ideas, implemented in last couple of commits:
|
| // Anchor's `Share` is architecturally different from Go spec's `Share` | ||
| // (different fields, decomposed across multiple types). Not applicable. | ||
| "share.EncodingTest" => { | ||
| *skipped_known_count += 1; | ||
| None | ||
| } |
There was a problem hiding this comment.
share.EncodingTest is currently a known inapplicable case, but this branch skips it silently. Could we make this explicit in test output (e.g. eprintln!("SKIP (known-inapplicable): {prefix}")) and include skipped-known/skipped-unknown counts in the final summary?
Reason: share is the one intentional coverage exception in this suite, and surfacing it clearly makes CI output auditable and prevents future confusion about missing fixture coverage.
Issue Addressed
Continuation of spec test from #833
Proposed Changes
Add encoding spec tests for the remaining SSV types. Each test validates SSZ decode, encode roundtrip, and hash tree root against fixtures from the ssv-spec
boolebranch.Encoding tests added:
PartialSignatureMessagesSignedSSVMessageSSVMessageAggregatorCommitteeConsensusDataProposerConsensusDataAdditional Info
The remaining fixtures cover message validation, RSA encryption, duty mapping, and other test categories planned for future PRs.