-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fork Names Standard EIP #1848
Fork Names Standard EIP #1848
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
eip: <to be assigned> | ||
title: Fork Name Standards | ||
author: DimitryKh <[email protected]> | ||
discussions-to: https://github.com/ethereum/retesteth/issues/23 | ||
status: Draft | ||
category: Informational | ||
created: 2019-03-18 | ||
--- | ||
|
||
## Simple Summary | ||
Name forks like `ETH-0001, ETH-0002, ETH-0003` and so on. | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Abstract | ||
Each client parse `ETH-0001` kind of indexes into ethereum fork rules. `ETH-0001` stands for Frontier rules. | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Therefore if in any config file instead of `Frontier`, an `ETH-0001` name provided. The client must parse it as a `Frontier` rule. | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Parsing previous naming convention (`Frontier, Homestead, EIP150`) becomes optional. `ETH-xxxx` naming convention is mandatory for all clients to implement. | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Motivation | ||
**Clients:** | ||
Different clients use different fork names even for the main network on their genesis config. If we want a generic genesis format, we have to use a standard for the fork names. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's correctly identifies an issue, but do not explain why you need to create new standard instead of using the existing "standard" of "Hardfork Meta" EIPs: https://eips.ethereum.org/meta. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Name your pets, number your herd. This article is about servers but the intent is the same: https://www.engineyard.com/blog/pets-vs-cattle If we are going to go to 2-4 upgrades a year we don't need to spend time bikeshedding fork block names and waiting on someone to make it "official." |
||
|
||
**Development:** | ||
After `ConstantinopleFix` release, devs wanted to rename it into `Petersburg`. That require code changes which is development time and money. | ||
And code changes to the client might result in errors and bugs if not tested and reviewed properly. | ||
During hardfork development the name is not fixed, thus closer to the release date, need to change the fork name again in the code and in the test files. | ||
|
||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Following standard for the fork names will allow to hardcode fork names without issues. | ||
|
||
## Specification | ||
In genesis config the following fields must be understood by all clients: | ||
|
||
``` | ||
"ETH-0001-FB": "5000", | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"ETH-0002-FB": "15000", | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
... | ||
"ETH-xxxx-FB": "25000" | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
Where `ETH-0001-FB` stands for `Frontier` fork block number. | ||
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Rationale | ||
Rationale is to get a fork name standard for generic genesis format so that RPC test tools provide clients with a uniform genesis configuration. | ||
It is easy to add +1 to the next fork name number rather then discuss `ConstantinopleFix` vs `Petersburg` and change the constant string everywhere: both in code and tests when we want to rename. | ||
|
||
## Backwards Compatibility | ||
Clients could support `Frontier, Homestead` and any other naming convention. | ||
|
||
## Test Cases | ||
Retesteth will generate `genesis.json` and run all tests with this specification. | ||
|
||
## Implementation | ||
**Aleth:** | ||
Aleth replace hardcoded variable names with an array that resolve | ||
``` | ||
chainParams().forkblocks["ETH-0002-FB"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Link to that implementation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its just a proposal. no implementation so far
winsvega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
into `DAO fork` block number, rather then using: | ||
|
||
``` | ||
u256 const& daoHardfork = chainParams().daoHardforkBlock; | ||
``` | ||
|
||
## Copyright | ||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use 1848.