-
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 all 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,67 @@ | ||
--- | ||
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-001-00, ETH-002-00, ETH-003-00` and so on. | ||
|
||
## Abstract | ||
Each client parses `ETH-001-00` kind of indexes into ethereum fork rules, the major number increasing for roadmap forks and the minor for other forks. `ETH-001-00` stands for Frontier rules. | ||
Therefore if in any config file instead of `Frontier`, an `ETH-001-00` name provided. The client must parse it as a `Frontier` rule. | ||
Parsing previous naming convention (`Frontier, Homestead, EIP150`) becomes optional. `ETH-xxx-yy` naming convention is mandatory for all clients to implement. | ||
|
||
## 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. | ||
The contents of a fork may also change as Testnet deployments demonstrate issues. There may also be emergency forks between planned major forks | ||
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-001-00-FB": "5000", | ||
"ETH-002-00-FB": "15000", | ||
... | ||
"ETH-xxx-yy-FB": "25000" | ||
``` | ||
|
||
Where `ETH-001-00-FB` stands for `Frontier` fork block number. | ||
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. What the 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. Explain what the |
||
|
||
The counting pattern will follow an `ETH-xxx-yy` 'planned'/'unplanned' pattern, where the first `xxx` number increments for each planned fork, and each unplanned fork after the planned fork increments the `yy` number. Unplanned forks may be for emergency forks, such as Spurious Dragon, or for late revisions to fork definitions that was deployed onto long lived testnets, such as ConstantinopleFix/Petersburg. | ||
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. Why is |
||
|
||
## 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-002-00-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. This looks like quite inefficient where a struct field read is replaced with a map lookup by a string key. |
||
``` | ||
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.