Skip to content

Conversation

@KolbyML
Copy link
Member

@KolbyML KolbyML commented Oct 16, 2025

fixes NIT-3993

problem

For benchmarking purposes, we would like to write to storage slots of existing contracts without private keys for the contracts. To do that, we want to be able to replace any contract code with a simple permissive contract code. This custom contract code will implement method facilitating the arbitrary writes to the contract's storage.

solution

  • Add a method to the ArbDebug procompile which overwrites the specified contracts code
  • Add a test to make sure the new method works as expected

I also had to update ArbDebug's solidity interface in OffchainLabs/nitro-precompile-interfaces

^ so this should probably be reviewed first

@KolbyML KolbyML changed the title Add arbdebug_overwriteContractCode method to ArbDebug precompile Add OverwriteContractCode method to ArbDebug precompile Oct 16, 2025
gligneul
gligneul previously approved these changes Oct 21, 2025
@KolbyML
Copy link
Member Author

KolbyML commented Oct 21, 2025

I update the submodule to the head. So the PR is ready to be merged, once approved

eljobe
eljobe previously approved these changes Oct 21, 2025
gligneul
gligneul previously approved these changes Oct 21, 2025
@eljobe eljobe added this pull request to the merge queue Oct 21, 2025
auto-merge was automatically disabled October 21, 2025 15:03

Pull Request is not mergeable

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 21, 2025
@KolbyML KolbyML dismissed stale reviews from gligneul and eljobe via e701d7a October 21, 2025 17:32
@KolbyML KolbyML force-pushed the NIT-3993 branch 2 times, most recently from 49140d8 to 5389bc4 Compare October 21, 2025 17:34
@KolbyML
Copy link
Member Author

KolbyML commented Oct 21, 2025

I had to add stubs for the precompiles in #3860 to make CI pass, as apparently if you must implement all the functions in the precompile interfaces, and 3860's interfaces were merged before mine on https://github.com/OffchainLabs/nitro-precompile-interfaces

@gligneul gligneul added this pull request to the merge queue Oct 21, 2025
Merged via the queue into OffchainLabs:master with commit 5c12403 Oct 21, 2025
23 checks passed
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.

4 participants