-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
Geth/evm raises runtime error when executing opcode prevrandao
#29722
Comments
Using paris version bytecodes with same ./evm --debug --gas 0xffffff --nomemory=false --json --code 6080604052348015600f57600080fd5b506004361060285760003560e01c806332a2c5d014602d575b600080fd5b60336047565b604051603e91906066565b60405180910390f35b600044905090565b6000819050919050565b606081604f565b82525050565b6000602082019050607960008301846059565b9291505056fea26469706673582212207ff40fb39a7b5e0a9ae6ee8422a04abe9e81eb8ba50c1e71c214eba304e7b67464736f6c63430008170033 --input 32a2c5d0 --prestate ./genesis.json run |
Same as the other one, The |
Okay, I'll try to learn how to use evm statetest or t8n for fuzzing, but I think maybe the problem is not in https://github.com/ethereum/go-ethereum/blob/master/core/vm/runtime/runtime.go#L191. go-ethereum/core/vm/runtime/runtime.go Line 157 in c5ba367
And I can successfully run PUSH0 in geth/evm 1.13.4, like
$ ./evm --debug --code 5f --json --prestate ./genesis.json run
INFO [05-15|21:52:17.758] Persisted trie from memory database nodes=1 size=144.00B time="6.216µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=0 livesize=0.00B
{"pc":0,"op":95,"gas":"0xffffff","gasCost":"0x2","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PUSH0"}
{"pc":1,"op":0,"gas":"0xfffffd","gasCost":"0x0","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"STOP"}
{"output":"","gasUsed":"0x2"}
#### LOGS ####
$ ./evm --version
evm version 1.13.4-stable-3f907d6a Maybe somewhere else is wrong? Thanks for your time. |
Well yes, the input Changed in ac0ff04 But actually, that commit is included in all of v1.14.3 v1.14.2 v1.14.0 v1.13.15 v1.13.14 v1.13.13, so the same thing should happen in 1.13 -- but not |
Thanks for your reply! |
Please don't misunderstand me -- this is a legit bug. I just meant that this bug is not high-priority, but sure we should fix it. Preferrably not by hardcoding |
Okay, thanks. Should I close this issue for now or what? |
Let's keep it open until we fix it |
Fixed in #29799. |
System information
Geth version:
1.13.4
CL client & version: Nope
OS & Version: Linux
Commit hash : 3f907d6
Expected behaviour
According to EVM opcodes, when execuing opcode
0X44
, EVM should return previous block's RANDAO mix. Comparing with Besu/evmtools, Py-evm and EthereumJS, all other 3 evms are fine, only Geth/evm came to an error.Actual behaviour
When executing any Ethereum smart contract bytecodes that includes opcode
0X44
, the Geth/evm will raise an error and abort its execution, causing Ethereum execution node or other applications built upon Geth/evm fail.Steps to reproduce the behaviour
Geth & Tools 1.13.4-3f907d6a
from https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.13.4-3f907d6a.tar.gzgeth-alltools-linux-amd64-1.13.4-3f907d6a/evm
genesis.json
file in dir geth-alltools-linux-amd64-1.13.4-3f907d6a/ to let evm support shanghai opcodes.Backtrace
Thanks for your attention :)
The text was updated successfully, but these errors were encountered: