-
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
Eip 1344 (ChainID opcode) #19921
Eip 1344 (ChainID opcode) #19921
Conversation
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. One question.
@@ -101,6 +101,8 @@ const ( | |||
NUMBER | |||
DIFFICULTY | |||
GASLIMIT | |||
CHAINID = 0x46 |
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.
Maybe "= 0x46" and "= 0x47" could be omitted because of iota effect.
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.
They could, but I dislike the iota effect -- imo it's wrong to use iota to define something that is defined externally, and it should only be used for things where there's no external dependency -- where only internal consistency matters
tests/state_test_util.go
Outdated
config, ok := Forks[subtest.Fork] | ||
if !ok { | ||
config, eips, err := getVMConfig(subtest.Fork) | ||
if err != nil { |
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.
Maybe it could be modified to:
if config, eips, err := getVMConfig(subtest.Fork); err != nil {
Pls rebase. |
rebased |
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
Implementation of 1344. This PR is built on top of #19743 , which contains some necessary framework.
Neither of these PRs actually enable it for Istanbul (that needs a follow-up PR). So in that sense, they should both be fairly safe to merge.
cc @fubuloubu (only the last commit is relevant)