Skip to content

feat(spec-specs, tests): implement EIP-3298 refund removal - #53

Draft
spencer-tb wants to merge 1 commit into
forks/amsterdamfrom
eips/amsterdam/eip-3298
Draft

spencer-tb wants to merge 1 commit into
forks/amsterdamfrom
eips/amsterdam/eip-3298

Conversation

@spencer-tb

Copy link
Copy Markdown
Owner

Status

Documentation/reference prototype for EIP-3298. This draft is not proposed for merge in its current form.

The protocol change is implemented in place in Amsterdam and activated for fixtures through the testing-side Bogota pseudo-fork, targeting Hegota. This work continues @marioevz's original execution-specs implementation, and the final commit preserves him as co-author. No substrate exception or dedicated Bogota spec module is used.

Description

Implements EIP-3298: removes the storage-clearing refund and EIP-3529 quotient cap while retaining the EIP-8038 net-metered STORAGE_WRITE reversal and applying it in full.

  • Spec: removes REFUND_STORAGE_CLEAR, its grant and restoration reversal, and the one-fifth settlement cap; retains refund-counter journaling, child-frame accumulation, the write-reversal rule, and pre-refund EIP-7778 block accounting.
  • Framework: registers EIP3298, models the zero clear-refund schedule and uncapped settlement through fork APIs, and activates the change through the undeployed Bogota testing pseudo-fork resolved against Amsterdam's spec module.
  • Tests: covers removal of clear refunds, surviving and accumulated write reversals, uncapped settlement, calldata-floor ordering, pre-refund block accounting, and reverted-frame journaling. A complete fork-transition test is retained for use once a real post-Amsterdam spec fork exists.
  • Benchmarks: keeps the SSTORE dirty-transition benchmarks active and documents their pre-EIP capped clear-refund and post-EIP uncapped write-reversal behavior.
  • Existing tests: applies one fork-correct EIP-7778 filter update and parks eight refund-cap or clear-refund-dependent functions across seven files with valid_before("EIP3298"); no tests or vectors are deleted.

Required EIP follow-up

None identified. The pinned EIP revision explicitly specifies the self-bounded write-reversal invariant, refund-counter journaling across reverts, post-refund calldata-floor ordering, and pre-refund EIP-7778 block accounting used by this prototype.

Known limitations

  • Because the Bogota pseudo-fork shares Amsterdam's spec module, it cannot provide a genuine pre-/post-fork execution boundary. The complete transition test is therefore skipped until a real post-Amsterdam spec fork exists.
  • The eight parked inherited functions require post-EIP refund-boundary scenarios to be re-derived around the surviving write reversal before production fixture coverage is complete.
  • The branch is frozen to the shared assessment baseline 43e3cd1; later upstream Amsterdam changes are intentionally not included in this isolated review.
  • This is an isolated EIP-3298 assessment prototype, not a combined Hegota implementation branch.

References

Co-authored-by: marioevz <marioevz@gmail.com>

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant