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

ECIP1045 #22

Open
wants to merge 115 commits into
base: master
Choose a base branch
from
Open

ECIP1045 #22

wants to merge 115 commits into from

Conversation

whilei
Copy link
Owner

@whilei whilei commented Sep 10, 2018

This includes ECIP1045 features, including Byzantium support (in code as ECIP1045B) and anticipated Constantinople (in code as ECIP1045C) 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

solution:

since STATICCALL functions equivalently to CALL, use congruent behavior
to CALL during gas decision log switch statement
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
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: refactor field to vm.Opcode#IsStateModifying
whilei and others added 30 commits October 4, 2018 11:59
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants