runtimeverification / runtimeverification/kontrol

Add support for fork Foundry tests

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
122
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Related: https://github.com/runtimeverification/evm-semantics/issues/1401

We should consider supporting Foundry fork tests, which would make it easier to reproduce exploits, perform meaningful inter-contract analysis, and simplify the application of FV to the existing test suits that contain fork tests. We can also re-verify the property tests against the updated mainnet state against potentially changing mainnet state (e.g., if other contracts change through a proxy).

The existing workaround is to set the contracts' bytecode using the etch cheatcode (as discussed in https://github.com/runtimeverification/evm-semantics/issues/1401), but that would still require careful reconstruction of the state such as setting storage variables according to their values in a certain block, etc.

Perhaps we might look into re-using the information fetched by Foundry when its run in the fork-test mode:

forge test --fork-url <your_rpc_url>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with related issue #1401 and the Foundry fork-testing documentation, then review the existing etch workaround and the forge test --fork-url <your_rpc_url> entry point. Done means defining and validating support for fork tests without manually reconstructing contract state, including tests against the relevant updated chain state.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.