Skip to content

Add tests for progressive containers and ProgressiveMerkleHasher - #50

Open
eserilev wants to merge 1 commit into
sigp:progressivefrom
eserilev:progressive-tests
Open

Add tests for progressive containers and ProgressiveMerkleHasher#50
eserilev wants to merge 1 commit into
sigp:progressivefrom
eserilev:progressive-tests

Conversation

@eserilev

Copy link
Copy Markdown
Member

Extend the differential property tests (#47) and derive macro tests (#48) to cover the new functionality in the progressive branch:

  • Property test ProgressiveMerkleHasher against a recursive reference implementation of EIP-7916 merkleize_progressive, with random byte lengths and random write splits to exercise the partial-chunk carry buffer, up to 128 chunks to cross all early level boundaries.
  • Property test ProgressiveBitList hashing against the same reference with independent bit packing, covering the empty-list workaround.
  • Derive tests for progressive containers: skip_hashing interaction, nesting (both directions), generics, tree_hash_type, a six-field container crossing a progressive level boundary, and active_fields spanning multiple bytes.
  • Hard-coded roots for the level-crossing and multi-byte cases computed independently from the EIP pseudocode, so these tests do not rely on the hasher under test.

Claude-Session: https://claude.ai/code/session_017PpXigbebk4GAQ9D9qdFzU

Extend the differential property tests (sigp#47) and derive macro tests (sigp#48)
to cover the new functionality in the progressive branch:

- Property test ProgressiveMerkleHasher against a recursive reference
  implementation of EIP-7916 merkleize_progressive, with random byte
  lengths and random write splits to exercise the partial-chunk carry
  buffer, up to 128 chunks to cross all early level boundaries.
- Property test ProgressiveBitList hashing against the same reference
  with independent bit packing, covering the empty-list workaround.
- Derive tests for progressive containers: skip_hashing interaction,
  nesting (both directions), generics, tree_hash_type, a six-field
  container crossing a progressive level boundary, and active_fields
  spanning multiple bytes.
- Hard-coded roots for the level-crossing and multi-byte cases computed
  independently from the EIP pseudocode, so these tests do not rely on
  the hasher under test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PpXigbebk4GAQ9D9qdFzU
@eserilev

Copy link
Copy Markdown
Member Author

@macladson was thinking of merging this into the progressive branch to add a bit more test coverage if that';s cool with you

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.77%. Comparing base (03d9fa4) to head (8674c20).

Additional details and impacted files
@@               Coverage Diff               @@
##           progressive      #50      +/-   ##
===============================================
+ Coverage        92.49%   93.77%   +1.28%     
===============================================
  Files                8        8              
  Lines              626      739     +113     
===============================================
+ Hits               579      693     +114     
+ Misses              47       46       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant