Skip to content

feat(tests): Additional MIP-8 coverage - #52

Merged
pdobacz merged 4 commits into
forks/monad_ninefrom
tests/mip8-storage-root-coverage
Aug 27, 2026
Merged

feat(tests): Additional MIP-8 coverage#52
pdobacz merged 4 commits into
forks/monad_ninefrom
tests/mip8-storage-root-coverage

Conversation

@pdobacz

@pdobacz pdobacz commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Closes ENG-1132

Fills gaps in coverage found by @mijovic . All tests confirmed to pass via runloop on v0.16.1

Greptile Summary

This PR expands MIP-8 test coverage for pageified storage commitments, fork migration, and SSTORE growth accounting.

  • Adds paged-root comparisons, full-page clearing checks, and commitment-scheme dispatch coverage.
  • Verifies untouched storage is recommitted across the Monad Nine-to-Ten transition.
  • Covers negative page-growth counters and omission of fully zeroed pages.

Confidence Score: 5/5

The PR appears safe to merge; no concrete correctness, security, or test-validity issues remain.

The added tests use compatible storage representations, isolate gas measurements from the page under test, and exercise the intended MIP-8 commitment and growth behavior without introducing production changes.

Important Files Changed

Filename Overview
packages/testing/src/execution_testing/forks/tests/test_paged_storage_trie.py Adds sound comparisons against legacy slot-MPT roots and verifies that clearing a complete page restores the prior paged-storage root.
packages/testing/src/execution_testing/test_types/tests/test_alloc_prestate.py Verifies that identical allocation contents produce roots through the selected MPT or paged commitment backend.
tests/monad_ten/mip8_pageified_storage/test_fork_transition.py Adds transition coverage ensuring untouched pre-fork storage participates in the post-fork pageified state commitment.
tests/monad_ten/mip8_pageified_storage/test_sstore_gas.py Adds isolated coverage for negative page-growth counters and complete removal of cleared pages.

Reviews (1): Last reviewed commit: "test(mip8): pin the negative state-growt..." | Re-trigger Greptile

Context used:

Only the commitment scheme separates the two blocks' state roots.

Co-Authored-By: Claude <claude-opus-5>
Clears every slot of a page between surviving pages, covering both the
branch-collapse and branch-retained trie shapes.

Co-Authored-By: Claude <claude-opus-5>
Covers the paged root diverging from the keccak MPT, a fully cleared page
returning to its prior root, and Alloc routing state_root by commitment.

Co-Authored-By: Claude <claude-opus-5>
Refills after N clears stay at PAGE_BASE_COST until the counter climbs
back above its starting peak.

Co-Authored-By: Claude <claude-opus-5>
@pdobacz
pdobacz requested review from QEDK and mijovic as code owners August 26, 2026 13:17
@pdobacz
pdobacz merged commit cc3c9ea into forks/monad_nine Aug 27, 2026
10 checks passed
@pdobacz
pdobacz deleted the tests/mip8-storage-root-coverage branch August 27, 2026 10:38
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.

2 participants