From 5232ba706b67e1745bdcb1ee5480f05555ab0e19 Mon Sep 17 00:00:00 2001 From: Dimitry Date: Mon, 18 Mar 2019 18:14:32 +0300 Subject: [PATCH 1/5] test --- EIPS/eip-1845.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 EIPS/eip-1845.md diff --git a/EIPS/eip-1845.md b/EIPS/eip-1845.md new file mode 100644 index 0000000000000..e1c1c80b22920 --- /dev/null +++ b/EIPS/eip-1845.md @@ -0,0 +1,54 @@ +--- +eip: +title: +author: , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> +discussions-to: +status: Draft +type: +category (*only required for Standard Track): +created: +requires (*optional): +replaces (*optional): +--- + + +This is the suggested template for new EIPs. + +Note that an EIP number will be assigned by an editor. When opening a pull request to submit your EIP, please use an abbreviated title in the filename, `eip-draft_title_abbrev.md`. + +The title should be 44 characters or less. + +## Simple Summary + +If you can't explain it simply, you don't understand it well enough." Provide a simplified and layman-accessible explanation of the EIP. + +## Abstract + +A short (~200 word) description of the technical issue being addressed. + +## Motivation + +The motivation is critical for EIPs that want to change the Ethereum protocol. It should clearly explain why the existing protocol specification is inadequate to address the problem that the EIP solves. EIP submissions without sufficient motivation may be rejected outright. + +## Specification + +The technical specification should describe the syntax and semantics of any new feature. The specification should be detailed enough to allow competing, interoperable implementations for any of the current Ethereum platforms (go-ethereum, parity, cpp-ethereum, ethereumj, ethereumjs, and [others](https://github.com/ethereum/wiki/wiki/Clients)). + +## Rationale + +The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.--> + +## Backwards Compatibility + +All EIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The EIP must explain how the author proposes to deal with these incompatibilities. EIP submissions without a sufficient backwards compatibility treatise may be rejected outright. + +## Test Cases + +Test cases for an implementation are mandatory for EIPs that are affecting consensus changes. Other EIPs can choose to include links to test cases if applicable. + +## Implementation + +The implementations must be completed before any EIP is given status "Final", but it need not be completed before the EIP is accepted. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of "rough consensus and running code" is still useful when it comes to resolving many discussions of API details. + +## Copyright +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 9ef9573a3a230d457f004f8bca854b07b747ed5a Mon Sep 17 00:00:00 2001 From: winsvega Date: Mon, 18 Mar 2019 18:49:38 +0300 Subject: [PATCH 2/5] Update eip-1845.md --- EIPS/eip-1845.md | 73 ++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/EIPS/eip-1845.md b/EIPS/eip-1845.md index e1c1c80b22920..eca8532c7839b 100644 --- a/EIPS/eip-1845.md +++ b/EIPS/eip-1845.md @@ -1,54 +1,65 @@ --- eip: -title: -author: , FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> -discussions-to: +title: Fork Name Standards +author: DimitryKh +discussions-to: https://github.com/ethereum/retesteth/issues/23 status: Draft -type: -category (*only required for Standard Track): -created: -requires (*optional): -replaces (*optional): +category: Informational +created: 2019-03-18 --- - -This is the suggested template for new EIPs. - -Note that an EIP number will be assigned by an editor. When opening a pull request to submit your EIP, please use an abbreviated title in the filename, `eip-draft_title_abbrev.md`. - -The title should be 44 characters or less. - ## Simple Summary - -If you can't explain it simply, you don't understand it well enough." Provide a simplified and layman-accessible explanation of the EIP. +Name forks like `ETH-0001, ETH-0002, ETH-0003` and so on. ## Abstract - -A short (~200 word) description of the technical issue being addressed. +Each client parse `ETH-0001` kind of indexes into ethereum fork rules. `ETH-0001` stands for Frontier rules. +Therefore if in any config file instead of `Frontier`, an `ETH-0001` name provided. The client must parse it as a `Frontier` rule. +Parsing previous naming convention (`Frontier, Homestead, EIP150`) becomes optional. `ETH-xxxx` naming convention is mandatory for all clients to implement. ## Motivation - -The motivation is critical for EIPs that want to change the Ethereum protocol. It should clearly explain why the existing protocol specification is inadequate to address the problem that the EIP solves. EIP submissions without sufficient motivation may be rejected outright. +**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. + +**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. + +Following standard for the fork names will allow to hardcode fork names without issues. ## Specification - -The technical specification should describe the syntax and semantics of any new feature. The specification should be detailed enough to allow competing, interoperable implementations for any of the current Ethereum platforms (go-ethereum, parity, cpp-ethereum, ethereumj, ethereumjs, and [others](https://github.com/ethereum/wiki/wiki/Clients)). +In genesis config the following fields must be understood by all clients: + +``` +"ETH-0001-FB": "5000", +"ETH-0002-FB": "15000", +... +"ETH-xxxx-FB": "25000" +``` + +Where `ETH-0001-FB` stands for `Frontier` fork block number. ## Rationale - -The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.--> +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 - -All EIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The EIP must explain how the author proposes to deal with these incompatibilities. EIP submissions without a sufficient backwards compatibility treatise may be rejected outright. +Clients could support `Frontier, Homestead` and any other naming convention. ## Test Cases - -Test cases for an implementation are mandatory for EIPs that are affecting consensus changes. Other EIPs can choose to include links to test cases if applicable. +Retesteth will generate `genesis.json` and run all tests with this specification. ## Implementation - -The implementations must be completed before any EIP is given status "Final", but it need not be completed before the EIP is accepted. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of "rough consensus and running code" is still useful when it comes to resolving many discussions of API details. +**Aleth:** +Aleth replace hardcoded variable names with an array that resolve +``` +chainParams().forkblocks["ETH-0002-FB"] +``` +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/). From bd84c8b18284c91c5b2439b91309944bd0b3e8d7 Mon Sep 17 00:00:00 2001 From: winsvega Date: Wed, 3 Jul 2019 23:56:27 +0300 Subject: [PATCH 3/5] Update EIPS/eip-1845.md Co-Authored-By: Danno Ferrin --- EIPS/eip-1845.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1845.md b/EIPS/eip-1845.md index eca8532c7839b..4a8178e250614 100644 --- a/EIPS/eip-1845.md +++ b/EIPS/eip-1845.md @@ -53,7 +53,7 @@ Retesteth will generate `genesis.json` and run all tests with this specification **Aleth:** Aleth replace hardcoded variable names with an array that resolve ``` -chainParams().forkblocks["ETH-0002-FB"] +chainParams().forkblocks["ETH-002-00-FB"] ``` into `DAO fork` block number, rather then using: From 6b6c1f4fe339ff9730146c6fc5208873cb329730 Mon Sep 17 00:00:00 2001 From: winsvega Date: Wed, 3 Jul 2019 23:56:49 +0300 Subject: [PATCH 4/5] Update EIPS/eip-1845.md Co-Authored-By: Danno Ferrin --- EIPS/eip-1845.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1845.md b/EIPS/eip-1845.md index 4a8178e250614..0722936c09bc6 100644 --- a/EIPS/eip-1845.md +++ b/EIPS/eip-1845.md @@ -9,7 +9,7 @@ created: 2019-03-18 --- ## Simple Summary -Name forks like `ETH-0001, ETH-0002, ETH-0003` and so on. +Name forks like `ETH-001-00, ETH-002-00, ETH-003-00` and so on. ## Abstract Each client parse `ETH-0001` kind of indexes into ethereum fork rules. `ETH-0001` stands for Frontier rules. From f3e5338400814d3e85e8ae4d6a9b7dd07f8f7508 Mon Sep 17 00:00:00 2001 From: winsvega Date: Wed, 3 Jul 2019 23:58:44 +0300 Subject: [PATCH 5/5] Apply suggestions from code review Co-Authored-By: Danno Ferrin --- EIPS/eip-1845.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/EIPS/eip-1845.md b/EIPS/eip-1845.md index 0722936c09bc6..00ba5807e55d0 100644 --- a/EIPS/eip-1845.md +++ b/EIPS/eip-1845.md @@ -12,9 +12,9 @@ created: 2019-03-18 Name forks like `ETH-001-00, ETH-002-00, ETH-003-00` and so on. ## Abstract -Each client parse `ETH-0001` kind of indexes into ethereum fork rules. `ETH-0001` stands for Frontier rules. -Therefore if in any config file instead of `Frontier`, an `ETH-0001` name provided. The client must parse it as a `Frontier` rule. -Parsing previous naming convention (`Frontier, Homestead, EIP150`) becomes optional. `ETH-xxxx` naming convention is mandatory for all clients to implement. +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:** @@ -24,20 +24,22 @@ Different clients use different fork names even for the main network on their ge 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-0001-FB": "5000", -"ETH-0002-FB": "15000", +"ETH-001-00-FB": "5000", +"ETH-002-00-FB": "15000", ... -"ETH-xxxx-FB": "25000" +"ETH-xxx-yy-FB": "25000" ``` -Where `ETH-0001-FB` stands for `Frontier` fork block number. +Where `ETH-001-00-FB` stands for `Frontier` fork block number. + +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. ## 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.