This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
WIP: ECIP1045 Features #671
Closed
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
…interface solution: remove it core.ChainConfig#IsEIP658 can still be used for implementation
- allows reuse of init_code keccak hash - modifies Create2 unit tests for consistency with ETH
It is implemented in crypto/
- moves spec tests (again) from crypto -> core/vm/ because this allows gas testing as well as expected address hash val tests.
If PostState is present in RLP decoded Receipt (received from network), we can't assume anything about transaction Status, so it should be set to TxStatusUnknown.
Type of Status changed to from `byte` to `uint8` to emphasize that it's a scalar. Struct used in RLP encoding changed, so it can handle both `uint8` (Status) and `[]byte` (PostState). RLP decoding changed accordingly. Comment added.
solution: append 'Msg' to name to make clear why string and not error type
solution: fix typo
This causes TestEIP658RLPRoundTrip2 to break.
solution: invalid returning of writer.Flush() causes EOF error
Ensures round trip RLP en/de-coder works for both empty (eg zero-value address) hash and arbitrary value.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Rel ethereumproject/ECIPs#95
This branch is a work in progress. While most features (except EIP1283) have been implemented, still TODO is testing and review, including:
exec2
are just plain ugly)ecip1045-with-tests
, which replaces/tests/
withethereum/tests
; this depends heavily on establishing correctness of those tests for ETC, fixing test generators/fillers