chore: merge main and upgrade foundry crates to multichain revm
Merge main with the multichain changes to feat/solidity-tests and upgrade Foundry crates to (multichain) REVM 21 using generics for block, tx, REVM config and chain config.
The changes that are not related to generics, but caused by other REVM/Alloy interface changes are based on https://github.com/foundry-rs/foundry/pull/10183.
After this PR is merged, Solidity tests will still only support mainnet, but OP chain type and merging feat/solidity-tests into main is unblocked.
Follow ups to allow running Solidity tests with OP chain type:
- Merge
feat/soliditytests intomain(TODOs related to JS build and CI: https://github.com/NomicFoundation/edr/issues/685) - Make halt reason generic in Foundry crates
- Make precompiles generic in Foundry crates
- Allow setting predeploys for soltest runner and pass in OP predeploys
- Expose chain type setting in Solidity test runner with two choices: OP or mainnet
- Release EDR with Solidity tests from
release/optimism
🦋 Changeset detected
Latest commit: 10437b24202f5f40a823505b59539dc95cee5abe
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 2 packages
| Name | Type |
|---|---|
| @nomicfoundation/edr | Patch |
| @nomicfoundation/edr-helpers | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Note to self: need to make halt reason generic as well
What merge strategy do you plan to use? Do you want to maintain history?
I tried cleaning up the merge history, but failed. I tried several things:
- combine multiple merge commits into one without squashing (as squashing would result in future merge conflicts)
- rebase onto
feat/solidity-teststo avoid having a mix of merges frommain/feat/multichainandfeat/solidity-tests
I was not able to achieve either of these. I tried:
- Instructing Cline to do it for me
-
git rebase -i --rebase-merges - cherry-pick commits on top of
feat/solidity-tests
The primary issue was that the original merge conflict resolutions could not be preserved.
This is how we can squash this PR down to one commit while preserving merge history (so as to avoid merge conflicts in the future):
cd ~/edr # repo root
git checkout -b merge-multichain-revm-21-squash "$(git merge-base merge-multichain-revm-21 feat/solidity-tests)"
git merge "$(git merge-base merge-multichain-revm-21 main)"
# This will show a lot of merge conflicts. We resolve them by copying everything from the PR branch:
git restore -WSs merge-multichain-revm-21 .
git commit -m 'chore: merge main and upgrade foundry crates to multichain revm'
# Reset PR branch to squashed merge commit:
git branch -M merge-multichain-revm-21
git push -f
The resulting commit should have exactly the same contents as the PR, and should have two parent commits (the first from feat/solidity-tests and the second from main).
This would need to be merged via normal merge rather than squash merge. It could be a fast-forward but I don't know if GitHub allows that via the UI.
There are a couple of test failures left:
-
Test EDR::
integration::rpc::transaction_and_receipt_pre_bedrock- This is fixed in
main. I'd merge with this failure to avoid having to mergemaininto this branch again and complicate git history.
- This is fixed in
-
Test EDR TS bindings: Failed to set global tracing subscriber with error: a global default trace dispatcher has already been set
Please only initialize EdrContext once per process to avoid this error.
- I can't repro this locally, so I suspect that it only happens after merging this branch. Should be fixed by fixing git history.
-
Run Hardhat tests:
Should not return the field reward if no percentiles were given:- The Rust error is:
failed to parse with expected type 'edr_rpc_client::jsonrpc::Response<edr_eth::fee_history::FeeHistoryResult>', due to error: 'data did not match any variant of untagged enum ResponseData. - Related PR: https://github.com/NomicFoundation/edr/pull/484
- It's probably related to a change from
mainoverwriting something infeat/solidity-tests. I'm looking into this.
- The Rust error is:
This is fixed in main. I'd merge with this failure to avoid having to merge main into this branch again and complicate git history.
The idea is to squash everything based on @frangio's proposed method to ensure a clean git history. Doing one more merge shouldn't matter.
The danger with ignoring Rust test failures is that they can hide other test errors that happen in later files & crates, as the test runner exits early.
The idea is to squash everything based on @frangio's proposed method to ensure a clean git history. Doing one more merge shouldn't matter.
The danger with ignoring Rust test failures is that they can hide other test errors that happen in later files & crates, as the test runner exits early.
Ok are we cool with cherry picking that fix from main? There are conflicts in 58 files when merging main into this branch so I'd really like to avoid that 😅
superseded by https://github.com/NomicFoundation/edr/pull/940