Skip to content

Commit

Permalink
Update eip-1845.md
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Mar 21, 2019
1 parent 5232ba7 commit 9ef9573
Showing 1 changed file with 42 additions and 31 deletions.
73 changes: 42 additions & 31 deletions EIPS/eip-1845.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,65 @@
---
eip: <to be assigned>
title: <EIP title>
author: <a list of the author's or authors' name(s) and/or username(s), or name(s) and email(s), e.g. (use with the parentheses or triangular brackets): FirstName LastName (@GitHubUsername), FirstName LastName <foo@bar.com>, FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)>
discussions-to: <URL>
title: Fork Name Standards
author: DimitryKh <dimitry@ethereum.org>
discussions-to: https://github.com/ethereum/retesteth/issues/23
status: Draft
type: <Standards Track (Core, Networking, Interface, ERC) | Informational | Meta>
category (*only required for Standard Track): <Core | Networking | Interface | ERC>
created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
requires (*optional): <EIP number(s)>
replaces (*optional): <EIP number(s)>
category: Informational
created: 2019-03-18
---

<!--You can leave these HTML comments in your merged EIP and delete the visible duplicate text guides, they will not appear and may be helpful to refer to if you edit it again. 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.-->
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.-->
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.-->
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.-->
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)).-->
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.-->
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.-->
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.-->
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.-->
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/).

0 comments on commit 9ef9573

Please sign in to comment.