Skip to content

Add support for etching fresh addresses#982

Merged
msooseth merged 3 commits into
mainfrom
etch-fresh
Jan 27, 2026
Merged

Add support for etching fresh addresses#982
msooseth merged 3 commits into
mainfrom
etch-fresh

Conversation

@elopez

@elopez elopez commented Jan 26, 2026

Copy link
Copy Markdown
Collaborator

Description

This extends vm.etch to allow etching code on fresh addresses. It also fixes an issue with the existing implementation.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

Now properly updates codehash, opIxMap, and codeOps along with code.
Previously only code was updated, which caused JUMP validation to
fail because `isValidJumpDest` uses both `vm.state.code` and
`contract.opIxMap`/`contract.codeOps`.
@msooseth msooseth merged commit 41e6d13 into main Jan 27, 2026
15 of 16 checks passed
@msooseth msooseth deleted the etch-fresh branch January 27, 2026 08:47
@msooseth

Copy link
Copy Markdown
Collaborator

Ah, thanks. I see you also fixed me not updating the codehash, opIxMap, and codeOps datastructs!

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