Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic with 'spec not supported' when specifying --hardfork muir_glacier #2260

Closed
2 tasks done
banteg opened this issue Jul 11, 2022 · 13 comments
Closed
2 tasks done

panic with 'spec not supported' when specifying --hardfork muir_glacier #2260

banteg opened this issue Jul 11, 2022 · 13 comments
Labels
C-anvil Command: anvil C-forge Command: forge T-bug Type: bug
Milestone

Comments

@banteg
Copy link

banteg commented Jul 11, 2022

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (ce52d85 2022-07-10T00:11:05.440274Z)

What command(s) is the bug in?

anvil

Operating System

macOS (Apple Silicon)

Describe the bug

steps to reproduce

  1. anvil --port 7545 --fork-url http://127.0.0.1:8545 --fork-block-number 12175070 --hardfork muirglacier
  2. turn off automine
  3. replay all txs from the next block
  4. mine a block
  5. revm panics

    thread 'tokio-runtime-worker' panicked at 'Spec Not supported', /Users/runner/.cargo/git/checkouts/revm-bf744d8ffabcbad9/51f3f8f/crates/revm/src/evm.rs:162:14

an ape script to reproduce can be found here
https://gist.github.com/banteg/13147218f9424988a8814f7c3f0ea5d1

it appears we hit this line
https://github.com/bluealloy/revm/blob/51f3f8feb5625ca39a16492d569f6985e69121a7/crates/revm/src/evm.rs#L162

the fix appears to be to fall back to the previous evm version supported by the underlying vm when a user specifies it, i.e. muir_glacier -> istanbul, constantinople, petersburg -> byzantium (or byzantine as it's called in revm).

or this can be fixed by adding a more complete spec to revm.

@banteg banteg added the T-bug Type: bug label Jul 11, 2022
@onbjerg onbjerg added C-forge Command: forge C-anvil Command: anvil labels Jul 11, 2022
@onbjerg onbjerg added this to the v1.0.0 milestone Jul 11, 2022
@onbjerg onbjerg added this to Foundry Jul 11, 2022
@onbjerg onbjerg moved this to Todo in Foundry Jul 11, 2022
@onbjerg
Copy link
Collaborator

onbjerg commented Jul 11, 2022

Also an issue for Forge (same reasons)

@mattsse
Copy link
Member

mattsse commented Jul 11, 2022

the fix appears to be to fall back to the previous evm version supported by the underlying vm when a user specifies it, i.e. muir_glacier -> istanbul, constantinople, petersburg -> byzantium (or byzantine as it's called in revm).

since this is a revm limitation, should we downgrade this accordingly when selecting the hardfork @onbjerg?

@gakonst
Copy link
Member

gakonst commented Jul 12, 2022

cc @rakita for visibility / any thoughts

@rakita
Copy link
Contributor

rakita commented Jul 14, 2022

hm, i went through all EIP's from hardforks and added them to EVM and added comment when it got enabled, what i didn't do is test them and run eth/tests with specs enabled. That is why only the newest ones are "supported". Not sure how much effort is needed to enable them all, but will check (crossing fingers it all passes on the first try :D)

@gakonst
Copy link
Member

gakonst commented Jul 14, 2022

sounds good - thanks for letting us know!

@onbjerg
Copy link
Collaborator

onbjerg commented Aug 11, 2022

Ping @rakita was this fixed recently?

@gakonst
Copy link
Member

gakonst commented Aug 11, 2022

or @banteg to check the repro again

@rakita
Copy link
Contributor

rakita commented Aug 11, 2022

didnt look at this

@onbjerg
Copy link
Collaborator

onbjerg commented Aug 23, 2022

@rakita what is the status on this? Some way I can help? :)

@rakita
Copy link
Contributor

rakita commented Aug 23, 2022

@onbjerg bluealloy/revm#155 (comment)

Will be away from laptop for next few days, but major work was done in branch to suport all forks.

@rakita
Copy link
Contributor

rakita commented Aug 26, 2022

@onbjerg can you integrate bluealloy/revm#191 ? Result<Option>> is added in Database as requested in discord, it broke foundry in a few places.

@mattsse
Copy link
Member

mattsse commented Aug 26, 2022

thanks!

will migrate breaking changes

@mattsse
Copy link
Member

mattsse commented Sep 6, 2022

this has landed with #2967

@mattsse mattsse closed this as completed Sep 6, 2022
Repository owner moved this from Todo to Done in Foundry Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil C-forge Command: forge T-bug Type: bug
Projects
Archived in project
Development

No branches or pull requests

5 participants