-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add EIP-5976: Handbook for EIP Authors #5976
Changes from 8 commits
a25099f
399a8c4
e0d0d63
1b7ef1b
cff28dc
c389b7f
8cef683
b4aa6bd
9a5bc6f
702236a
4ebca58
c3aae4d
8983733
f1baebe
a2c48a8
d2a109b
a329b57
66a9dcc
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,77 @@ | ||
--- | ||
eip: 5976 | ||
title: EIP Author Handbook | ||
description: Handy reference for EIP authors with specific suggestions of best practice | ||
author: Zainan Victor Zhou (@xinbenlv) | ||
discussions-to: https://ethereum-magicians.org/t/informational-eip-author-handbook/11754 | ||
status: Draft | ||
type: Informational | ||
created: 2022-11-15 | ||
--- | ||
|
||
## Abstract | ||
|
||
A handy reference for EIP authors with specific suggestions of best practices for different kinds of EIPs. | ||
|
||
## Specification | ||
|
||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Scoping | ||
|
||
1. Standard track EIPs are divided in 4 categories: Core, Network, Interface, | ||
and application(ERC) layer. A new EIP SHOULD ideally only address one layer of A new EIP SHOULD ideally only address one layer of When unable to determine, Author is generally RECOMMENDED to break down the new EIP into multiple ones where each only address the scope of one layer. | ||
|
||
- Positive example(s): [EIP-1559](./eip-1559), [EIP-2718](./eip-2718.md), [EIP-2929](./eip-2929.md), [EIP-2930](./eip-2930.md) series. | ||
- Negative example(s): [EIP-712](./eip-712.md) that span across Interface and Application layers. | ||
|
||
### Identifying Related and Competing EIPs | ||
|
||
1. Authors of the New EIP SHOULD familiarize with related EIPs. | ||
xinbenlv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. For existing EIPs that the New EIP strictly depends on, Author SHOULD mention them in its Specification section and and `requires` field in the EIP preamble. | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
3. For EIPs that could depend on or interact with the new EIP, Author is | ||
RECOMMENDED to properly describe how these EIPs could interact with new EIP. | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
4. For EIPs that the new EIP _competes with_, Authors SHOULD describe in Motivation section how the new EIP addresses new areas of use cases old ones don't, and in | ||
Rationale section that how the design decisions in the new EIP compare with | ||
the existing competing EIPs. | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Finalization | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
1. New EIPs are RECOMMENDED to turn into FINAL when two or more versions of independent and different compliant implementations are built and deployed. | ||
xinbenlv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### ERC EIPs | ||
|
||
#### Worthiness of ERC EIPs | ||
|
||
1. New ERC EIPs is RECOMMENDED to justify its "worthiness" by providing in its Rationale section: | ||
|
||
- A _massive pre-standardized adoptions_, e.g [EIP-721 Non-Fungible Token](./eip-721.md). | ||
- A _strong potential demand as seen elsewhere_, but couldn't yet be achieved on EVM due to lacking API consensus [EIP-137 Ethereum Domain Name Service](./eip-137.md). | ||
- A _novel use cases backed_ by interested future adopters., e.g. [EIP-4337](./eip-4337.md). | ||
|
||
### Core EIPs | ||
|
||
#### When requiring a hard-fork | ||
|
||
1. A new EIP requiring a hard-fork is RECOMMENDED to explicitly declare a place-holding number as a named parameter and recommend implementing clients to use such name as controlling parameter prior to rollout. | ||
|
||
#### When adding a new EVM instruction | ||
|
||
For a new EIP that adds EVM Instruction, here is a handy check-list | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- Its Category MUST be `Core` | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- It MUST specify a mnemonic | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- It MUST specify a opcode number. It should contains wording this opcode number are deemed subject to change. Do not use a placeholder opcode number so clients of different language can integrate before. Author SHOULD check other instruction-adding non-finalized EIPs to avoid picking a conflicting opcode. | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
before finalize. | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- It MUST specify a gas cost. It MUST justify its gas cost choice in is Rationale section. | ||
Pandapip1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Rationale | ||
|
||
Help authors better streamline the authoring and reduce review round-trip time. | ||
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. Can also be omitted. 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. I think this is legit rationale and I lean towards keeping the Rationele unless you are against... 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. I am against including a rationale for this EIP, as:
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. Got it. Removed, respect your opposition. Pinging @SamWilsn for updating EIPW to exempt "Informational" track from mandating "Rationale " and "Security Considerations" |
||
|
||
## Security Considerations | ||
|
||
No security issues introduced. | ||
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. Can be omitted for informational EIPs. 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. Tried, EIPW wouldnt let me 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. Can be overwritten. 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. Should we remove that from EIPW side? 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. Yes, it should. CC @SamWilsn. 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. Updated to remove Security Considerations |
||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](../LICENSE.md). |
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.
Rationale and Security Considerations were suggested to be removed by Editor as deemed not applicable to this type of EIP. This will need a manual merge
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.
You should add this to:
EIPs/.github/workflows/ci.yml
Line 119 in cf35f4c