forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Articulate EIP parameters and feature implementations #6
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
whilei
commented
Dec 28, 2018
Closed
whilei
commented
Dec 31, 2018
Closed
* add LGPL licence at update-licence.go * add empty line
* travis, appveyor: bump to Go 1.11.4 * internal/build: revert comment changes
whilei
force-pushed
the
fnf
branch
3 times, most recently
from
January 4, 2019 01:59
177882d
to
7e48e41
Compare
whilei
changed the title
Features not forks w/o submodule
Articulate EIP parameters and feature implementations
Jan 4, 2019
Refactors chain configuration and respective feature implementations to use `IsEIP<NUMBER>` definitions and methods, instead of `Is<HardForkName>`, whenever possible. Doing so attempts to address problems of ambiguity and complexity in chain configuration and feature implementation. Signed-off-by: Isaac Ardis (isaac.ardis@gmail.com)
whilei
pushed a commit
that referenced
this pull request
Feb 7, 2019
…) (#6) Makes Interface interface a bit more stateless and abstract. Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
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.
Refactors chain configuration and respective feature implementations to use
IsEIP<NUMBER>
definitions and methods, instead ofIs<HardForkName>
, whenever possible. Doing so attempts to address problems of ambiguity and complexity in chain configuration and feature implementation.As I see it, this refactoring has a few benefits:
More descriptive code. By describing and implementing client configuration with feature-based definitions, instead of "arbitrary" and opaque hard-fork feature groups, feature implementations become clearer. This improves the code's legibility and accessibility, separates logical concerns, documents specification references, and allows more granular testing.
It's more interoperable. Clients choosing to adopt a subset of EIP-derived changes, normally inextricably bundled in a hard-fork identity, are able to toggle individual features. This establishes an extensible pattern that alternative implementations can use to build clients with supersets or subsets of features.
It doesn't break backwards compatibility. All existing hardcoded or external chain configurations continue to operate as expected, tests pass, and named hard-fork keys and methods take priority.
What this patch doesn't do:
Handle every feature ever introduced via the EIP/Hard-fork processes. For example, of the changes introduced with the
Homestead
fork, only EIP 7'sDELEGATECALL
has been extracted, and the DAO fork is untouched. Just low-hanging fruit.Implement correlated refactoring across the
tests/[testdata/**/*.json]
tests and test runners. These are located in a submodule, very numerous, very opinionated toward the hardfork schema, and their relevance and applicability is not impacted by leaving them as-is.Implement new distinct difficulty calculators for EIP100 (Change difficulty adjustment to target mean block time including uncles) vs. EIP649 (Delaying the difficulty bomb and reducing the block reward), which were two modifications to the difficulty algorithm introduced simultaneously at the Byzantium hard-fork. I'm trying to limit the scope of changes to introduce as little new consensus logic as possible.
Attempt to differentiate features beyond the specifications of EIPs.
Move beyond supplemental modification of existing patterns.
For review and reference, I compiled this gist along the way.