Commit caab7d0
* restructure, move out of utils into evm, precompiles and future handlers
* clean up
* clean up
* improve docs
* scaffold handler
* evaluate how to add handles
* prefer EnvRef over EnvMut
* address feedback of owned env
* revert get_or_insert_map workaround
* avoid changing types, leave mut where previously, avoid unnecessary mut
* start layout out handler registry connected to evm
* get create2 from frame inputs
* start adding create2 handler
* continue create2handler
* wrap up create2 handler
* clean up
* continue fixing types
* generalize precompiles
* clean up
* tag inline
* fix imports
* start fixing cheatcode types
* use `env` on handler
* clean up
* temp revert
* odyssey precompile was deprecated
* refix cheatcode types
* clean up
* still facing issues with borrow-checker, double mut
* open questions around passing around env
* minor fix
* for now work around mutability limitations by limited cloning, unclear performance impact or whether it will work with cheatcode macros
* continue fixing types, still issues around cheatcodes, inspector
* bump revm
* bump deps
* minor type fixes
* bump foundry-fork-db to handle c-kzg build issue
* bump rust version
* utilize Host, ContextTr, JournalTr to avoid double mutable borrows
* temp revert
* temp revert
* restore handler, improve types
* refactor types
* restore types
* restore, clean up
* continue fixing types
* clean up
* continue fixing types
* revert journal env cloning, still issues around double borrows
* fix core types per conversation, use EnvMut<'_>
* fix types
* more progress for foundry-evm
* mutate outcome in place
* temp revert exec_create
* some progress with porting with_evm core loop
* remove redundant types
* context -> test_context in Cheatcodes config
* construct new handler, wrapping evm context, imports Handler trait
* temporarily comment out exec_create section to unblock
* add replacement of EnvWithHandlerCfg
* minor fixes
* continue fixing types
* continue fixing types
* continue fixing types
* continue fixing types
* continue types
* fix cached_env
* remove possibly incorrect handling of CreateOutcome on methods like do_eofcreate_end as outcome is now mutated in place
* add custom_printer from revm19, porting for compatibility
* cast: fix types
* verify: fix types
* forge + script: fix types
* anvil: start fixing types
* anvil: continue porting types
* anvil: continue porting types
* anvil: continue porting types
* anvil: continue porting types, small fix in foundry-evm
* use AnvilEvm
* stash optimism hardfork specifics for now
* temp mute anvil use in forge
* apply apparant fixes, test still failing
* clean up
* revert to replay
* apply possible nonce 0/1 fixes, committed to proceed
* disable nonce check in local_evm_env
* undo is_odyssey remove
* always spawn evm with handler
* replay() -> inspect_replay()
* modify macro, comment out anvil related cast tests for the time being
* reapply state depth = 1
* something like this?
* introduce outer block for early return
* print debugging
* clean up
* fix merge
* migrate: anvil to revm 21 (#10361)
* downgrade op-revm to 2.0.0 to resolve dep conflict
* op-revm 3.0 uses revm 22
* add `as_mut_dyn` to trait `MaybeFullDatabase` as we now require mut db_ref access (
* Revert "add `as_mut_dyn` to trait `MaybeFullDatabase` as we now require mut db_ref access ("
This reverts commit 84d11f1.
* fix: Inspector should be generic over CTX not DB
* fixes helpers: new_evm_with_inspector_* to use CTX generic
* fix: pass TxEnv to evm.transact
* fix: inspector inference in TransactionExecutor and build_access_list_with_state
* workaround: dup LogCollector to use with AnvilEvmContext
* coz FoundryEvmContext is not generic over DB, instead hardoded to dyn DatabaseExt
* fix tests
* fix traces test
* fix: use default kzg settings in blob validation
* reintroduce OptimismHardfork
* fix: disable nonce check if nonce is None
* fix!: load state tests by addressing breaking changes in state files
* BlockEnv Breaking change:
- most fields now use `u64` instead of `U64` / `U256`
- coinbase renamed to beneficiary
- best_block_number is `u64`, prev `U64`
* fix: access_list test by using evm.inspect_with_tx
* fix: replace evm.transact with evm.inspect_with_tx
* fix: make impl Inspector for AnvilInspector generic over CTX
* fix: clone inspector in TransactionExecutor to enable evm.inspect_commit
* fix: remove cloned inspector from TransactionExecutor
* feat(`anvil`): op support revm 21 (#10407)
* enable OpHardforks in NodeConfig
* feat: add is_optimism flag to foundry_evm::Env
* feat(`anvil`): set is_optimism in Backend
* feat(`anvil`): introducing EvmContext enum holding Eth and Op variants.
* adds OpEnv to foundry_evm_core
* feat: EitherEvm
* impl Evm for EitherEvm
* integrate EitherEvm into RPC and executor
*Map OpHaltReason and OpTransactionError
* rm old evm helpers
* feat(`foundry_evm`): add deposit tx parts field to Env
* fix(`anvil`): set deposit tx parts in tx executor and backend.inspect_tx
* nit
* docs EitherEvm
* nit
* refac: return TxEnv and Deposit parts separately
* nits
* nit
* make anvil result aliases more generic
* nit
* intermediary(`revm bump`): re-enable Anvil tests, remove duplicate `LogCollector`, entire codebase builds (#10412)
* temp refactor, still facing issue
* clean up
* clean up
* temp cleanup, can later be refd
* clean up, refactor stack.rs to apply ecx restore from cache to outside lamba
* fix
* clean up
* clean up
* avoid borrowing mutably for clarity
* use EthEvmContext directly
* FoundryEvmContext -> EthEvmContext
* continue
* fix tests
* fix inspectors
* codebase now builds entirely
* fix clippy lints
* remove duplicate LogCollector in Anvil
* fmt
* fix clippy
* fix doctests
* disable nonce checks on forks, enforce setting of tx.nonce on set_nonce
* fix: use `transact` from alloy-evm (#10417)
* Patch revm to fix interpreter panic
* bump revm
* fix eof test
* fix bytecode hash
* fix fixture
* fix fixture
* fix fixture
* chore: mv EitherEvm to foundry_evm (#10445)
mv EitherEvm to foundry_evm_core
* remove unused JournalTr
* restore formatting, avoid diff
* remove leftover comment re: optimism support
* fix displays_chained_error test
* fix doc test
* remove optimism todo leftover
* avoid direct field assignment, prefer *current.
* create2 handler register
* fix patch
* fix test_broadcast_raw_create2_deployer
* bump alloy and related deps
apply patches for block-explorers and compilers
* fix: common
* fix gas meter test
* fix
* fix: ConsoleFmt proc_macro
* more fixes
* fix: validate bool removal from abi_decode_*
* fix: use take_slice instead of take_slice_unchecked in Decoder
* fix more validate bool removal
* correctly reset env.tx to cached env, cfg and block, ref https://github.com/foundry-rs/foundry/blob/a34f4c989b94f572497631ff5c85909d674c23a6/crates/evm/evm/src/inspectors/stack.rs#L640-L649
* address more alloy-core 1.0 breaking changes
* fix anvil
* exec_create
* fix cast
* bump gcloudsdk in wallets
* fix(`cheatcodes`): rand workaround
Use ChaChaRng as temporary measure since proptest is on rand 8
* revert test_GasMeter, assert exact gas used
* fix arbitrum test
* address deprecations
* doc test fixes
* fix clippy warnings
* remove leftover comment
* fix assert_can_detect_unlinked_target_with_libraries, ref: bluealloy/revm@fc54dd0
* fix gas metering tests
* restore unintended .wrap_err changes, ref: https://github.com/search?q=repo%3Afoundry-rs%2Ffoundry%20wrap_err(%22EVM%20error%22)&type=code
* fix test_cheats_local_default
* add CC0-1.0 license exception, has been previously approved in Reth: https://github.com/paradigmxyz/reth/blob/adb8bdc70758558d6122e87d78d73cc0f12d4dbb/deny.toml#L48
* usize depth
* repin foundry-fork-db, this aligns the revm and alloy version back
* fix clippy, after usize depth change
* allow foundry-fork-db as git exception
* revm 23
* fix: EitherEvm should work over OpTransaction
* bump compilers and explorers
* fix fmt
* Env::from_with_spec_id -> Env::new_with_spec_id
* bump clippy msrv to align with foundry.toml
* chore: avoid leaking Anvil specific optimism fields into evm/core (#10466)
* start sketching
* maybe ?
* some kind of conversion still required
* continue porting
* clean up types
* pass op transaction in directly
* fixes
* restore setting of enveloped_tx
* refactor anvil Env and reduce changes in tx processing
* apply revm bump fixes, solar fixes
* bump op-alloy-*
* bump to msrv 1.86 for solar, use 0.15.* for alloy instead of pinning to 0.15.0, use alloy-evm patch for .use_ref() issue
* fix: correctly set txtype when setting up TxEnv
* start upgrading to revm 23
* bump PR to be revm 23+ compatible
* fix: correctly set txtype when setting up TxEnv
* fix: correctly set txtype when setting up TxEnv
* clean up
* fix merge conflict, apply fixes from upstream
* bump to 0.7.2
* fix order
* update block-explorers and compilers
* fix clippy
* fix failing abi test
* empty
* integrate BlobParams into anvil
* fix tests
* fix cast decode-event
* fix tests
* fix colored_traces
* fix gas pausing
* fix tests
* fix test
* update last commits from master to be u64 compatible
* syn no longer implements PartialEq requiring us to use `matches!`
* temp comment out journal push loop
* fix clippy lint
* revert clippy changes, make sure lint-foundry uses nightly clippy version
* also assert that blob_count is less than the configured max_blob_count
* fix: only upgrade tx_type to eip-2930 (type 1) if it is a legacy tx
* optimistically remove previous workaround that was required for internal tracking, tests do not indicate it is longer required
* nit
* prefer using typed TransactionType over raw u8
* apply tx_type if set, upgrading from legacy to eip2930 if access_list is present and tx type is legacy
* restore #[ret] macro that was removed unintendedly
* replace redundant Env::new_with_spec_id(..) with default
* allow passing is_optimism into Env constructor specific to Anvil
* extract environment configuration into init.rs to make configuring the environment less error prone
* remove redundant debug derive
* restore #[cold] do hardhat log, previously preferred inline because of new context requirement for bytes but we refactor resolved this
* avoid code duplication, add documented `apply_accesslist`
* alloy 1.0 + fork-db 0.14 + op-alloy 0.16 + revm-insp 0.22 + block-explorers 0.17
* fix clippy
* Update crates/evm/evm/src/inspectors/logs.rs
Co-authored-by: Arsenii Kulikov <[email protected]>
* fix fmt
* set env tx type by deriving tx type from other fields if no transaction_type has been set
* use hardfork configured max_blob_count rather than hardcoded Dancun in assertion and error message
* add temporary workaround for failing StdChains test because eth.llamarpc.com is down
* bump(`revm`: step 3): reintroduce precompile injection (#10508)
* sketching
* sketch
* sketch
* restore test
* add echo precompile test
* pick a safe non precompile target outside of 0x00-0xff range
* add op evm test
* instead of activating all precompiles by default we activate selectively based on the spec defined
* add note for us pinning to OpSpecId::BEDROCK here, we should make this configurable
* bump deps to latest
---------
Co-authored-by: zerosnacks <[email protected]>
Co-authored-by: Arsenii Kulikov <[email protected]>
Co-authored-by: zerosnacks <[email protected]>
Co-authored-by: grandizzy <[email protected]>
1 parent 066e0ce commit caab7d0
File tree
85 files changed
+1575
-1073
lines changed- crates
- anvil
- core/src/eth
- transaction
- src
- eth
- backend
- mem
- otterscan
- tests/it
- cast
- src
- cmd
- wallet
- tests/cli
- cheatcodes
- src
- evm
- inspector
- test
- common
- fmt/src
- src
- preprocessor
- provider
- evm
- core/src
- backend
- evm/src
- executors
- fuzz
- invariant
- inspectors
- fuzz/src
- strategies
- traces/src
- decoder
- identifier
- forge
- src
- cmd
- tests
- cli
- fixtures
- it
- macros/src
- script/src
- test-utils/src
- wallets
- src
- testdata/default/cheats
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
85 files changed
+1575
-1073
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 202 | + | |
| 203 | + | |
209 | 204 | | |
210 | 205 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
232 | 227 | | |
233 | 228 | | |
234 | | - | |
235 | | - | |
236 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
240 | 235 | | |
241 | 236 | | |
242 | | - | |
243 | | - | |
244 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
245 | 240 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 241 | + | |
249 | 242 | | |
250 | | - | |
| 243 | + | |
251 | 244 | | |
252 | 245 | | |
253 | | - | |
254 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
| |||
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
301 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
372 | 380 | | |
373 | | - | |
374 | | - | |
| 381 | + | |
| 382 | + | |
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
378 | | - | |
| 386 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
531 | 529 | | |
532 | 530 | | |
533 | 531 | | |
534 | | - | |
| 532 | + | |
| 533 | + | |
535 | 534 | | |
536 | 535 | | |
537 | 536 | | |
| |||
542 | 541 | | |
543 | 542 | | |
544 | 543 | | |
545 | | - | |
546 | 544 | | |
547 | 545 | | |
548 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| |||
962 | 963 | | |
963 | 964 | | |
964 | 965 | | |
965 | | - | |
| 966 | + | |
966 | 967 | | |
967 | 968 | | |
968 | 969 | | |
969 | 970 | | |
970 | 971 | | |
971 | 972 | | |
972 | | - | |
| 973 | + | |
973 | 974 | | |
974 | 975 | | |
975 | 976 | | |
| |||
1521 | 1522 | | |
1522 | 1523 | | |
1523 | 1524 | | |
1524 | | - | |
| 1525 | + | |
1525 | 1526 | | |
1526 | 1527 | | |
1527 | 1528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments