-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
core/vm: Rename SHA3 instruction to KECCAK256 #23976
Conversation
Also rename helper functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -254,7 +254,7 @@ var opCodeToString = map[OpCode]string{ | |||
MULMOD: "MULMOD", | |||
|
|||
// 0x20 range - crypto. | |||
SHA3: "SHA3", | |||
KECCAK256: "KECCAK256", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will 'break' the API for differential tracing. It's pretty easy to fix in the tracer shims though, so not a blocker for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have some links, I can try submitting support pre-emptively. Note that evmone already outputs KECCAK256
so the shims should be updated to accept both in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think e.g. this just need an alias: https://github.com/holiman/goevmlab/blob/0d79a9a3f8e4f25dcac009f1e4b7f0e1d458c238/ops/operations.go#L304 . It's not a biggie, I can fix whenever I need it next
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's my attempt: holiman/goevmlab#46
This is solved: ethereum/yellowpaper#825 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the keccak256 name. This brings geth in line with those.
Cherry-pick ethereum/go-ethereum#23976 Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
the opcode was renamed in geth and erigon, but still called sha3 in reth ethereum/go-ethereum#23976 erigontech/erigon#5890
This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the keccak256 name. This brings geth in line with those.
Also rename helper functions.
This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the
keccak256
name. This brings geth in line with those.The only concern could be if there is some kind of intput/output geth produces where this makes a difference.
There is also a field which is serialised as
sha3Uncles
-- not sure what relies on it, but of course haven't touched that here.