forked from ethereumproject/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
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
ECIP1045 #22
Open
whilei
wants to merge
115
commits into
master
Choose a base branch
from
ecip1045
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
solution: since STATICCALL functions equivalently to CALL, use congruent behavior to CALL during gas decision log switch statement
…be like DELEGATECALL https://github.com/ethereum/go-ethereum/blob/76069eef38082089d2eaf99661a80e1a953bf271/core/vm/memory_table.go solution: change switch case condition
Includes a fix where signature had accepted 'value' param, and should not have
This should disallow state modificaation on StaticCall method, and if an opcode is called that writes to the state layer, the vm should throw an exception solution: - implement IsReadOnly and SetReadOnly interface methods - add field for opcode instruction regard whether or not it makes (or can make) changes to state, eg LOG*, SSTORE, SUICIDE, and possibly CALL returning a non-zero value.
solution: add placehold fn to satisfy interface
... it will cause confusion solution: rename fork to ECIP1045
solution: this is handled in core/vm/vm.go conditional, see comment there
solution: include congruent DELEGATECALL:STATICCALL tests
…face (missing IsECIP1045 method) solution: implement method as default
solution: implement IsECIP1045, IsReadOnly, and SetReadOnly methods for associated RuleSet and VMEnv structs
…nterface methods solution: implement them
solution: set in fn Since STATICCALL and incoming OPCODES should only be activated after the fork (and tests configured with envs after the fork), this number can be safely set to 0
solution: remove typo
solution: fix stack signature
solution: refactor field to vm.Opcode#IsStateModifying
solution: initialize to 0
This doc includes test specifications for reference.
This way, we can easily update the library without loosing our custom function.
Copied the bn256/cloudflare and bn256/google dirs from ETH geth
Copied the bn256/cloudflare and bn256/google dirs from ETH geth
solution: fix expected storage value
This unfinished changes made refactorings and added complexity to unit tests, which were eventually unused. Instead of testing this feature (eip1283) with go tests, JSON tests are used. solution: Revert refactoring and go tests to state at parent branch ecip1045
Originally named after Sputnik because @mersinvald wrote the bitwise logic tests for SputnikVM implementation of bitwise shifts logics. However, these tests are more aptly named after their proposed hardfork introduction, currently spec'd in ECIP1045.
Because gas metering change causes want/got gas mismatches for preexisting tests, eg Bitwise Shift tests. solution: Create interface method IsEIP1283 to separate concerns for testing with and without those changes.
…_go1.11 fix bn256 compilation issues with go1.11
solution: refactor exec() to work for CREATE and CREATE2
This parses the tests from spec'd table in EIP document, which is currently included in the associated JSON tests file
…ative solution: remove 'safety' check for refundCounter negativity. I haven't seen the bespoke proof for refundCounter negativity mentioned in the EIP document, and apparently misunderstood implementation here...?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes ECIP1045 features, including Byzantium support (in code as
ECIP1045B
) and anticipated Constantinople (in code asECIP1045C
) features.Note when pulling, that I've used tags to flag feature progresses, although only have made tags so far for Constantinople features, eg https://github.com/whilei/go-ethereum/tree/feat-constantinople-create2.
git pull whilei --tags