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

Eip 1344 (ChainID opcode) #19921

Merged
merged 2 commits into from
Aug 8, 2019
Merged

Eip 1344 (ChainID opcode) #19921

merged 2 commits into from
Aug 8, 2019

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Aug 6, 2019

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)

@holiman holiman changed the title Eip 1344 v2 Eip 1344 (ChainID opcode) Aug 6, 2019
@karalabe karalabe mentioned this pull request Aug 6, 2019
10 tasks
Copy link

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One question.

core/vm/eips.go Show resolved Hide resolved
core/vm/interpreter.go Outdated Show resolved Hide resolved
@@ -101,6 +101,8 @@ const (
NUMBER
DIFFICULTY
GASLIMIT
CHAINID = 0x46
Copy link
Contributor

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.

Copy link
Contributor Author

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

config, ok := Forks[subtest.Fork]
if !ok {
config, eips, err := getVMConfig(subtest.Fork)
if err != nil {
Copy link
Contributor

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 {

@karalabe
Copy link
Member

karalabe commented Aug 8, 2019

Pls rebase.

@holiman
Copy link
Contributor Author

holiman commented Aug 8, 2019

rebased

core/vm/eips.go Outdated Show resolved Hide resolved
core/vm/eips.go Outdated Show resolved Hide resolved
core/vm/eips.go Outdated Show resolved Hide resolved
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karalabe karalabe merged commit 081642e into ethereum:master Aug 8, 2019
@karalabe karalabe added this to the 1.9.2 milestone Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants