forked from ethereum/EIPs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically merged updates to draft EIP(s) 695 (ethereum#2642)
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
eip: 695 | ||
title: Create `eth_chainId` method for JSON-RPC | ||
author: Isaac Ardis <[email protected]>, Wei Tang (@sorpaas), Fan Torchz (@tcz001) | ||
author: Isaac Ardis <[email protected]>, Wei Tang (@sorpaas), Fan Torchz (@tcz001), Erik Marks <[email protected]> | ||
discussions-to: https://ethereum-magicians.org/t/eip-695-create-eth-chainid-method-for-json-rpc/1845 | ||
type: Standards Track | ||
category: Interface | ||
|
@@ -20,7 +20,7 @@ Include `eth_chainId` method in `eth_`-namespaced JSON-RPC methods. | |
The `eth_chainId` method should return a single STRING result | ||
for an integer value in hexadecimal format, describing the | ||
currently configured `CHAIN_ID` value used for signing replay-protected transactions, | ||
introduced via [EIP-155](https://eips.ethereum.org/EIPS/eip-155). | ||
introduced by [EIP 155](https://eips.ethereum.org/EIPS/eip-155). | ||
|
||
## Motivation | ||
|
||
|
@@ -34,7 +34,7 @@ the RPC. | |
### `eth_chainId` | ||
|
||
Returns the currently configured chain ID, a value used in replay-protected transaction | ||
signing as introduced by [EIP-155](https://eips.ethereum.org/EIPS/eip-155). | ||
signing as introduced by [EIP 155](https://eips.ethereum.org/EIPS/eip-155). | ||
|
||
The chain ID returned should always correspond to the information in the current known | ||
head block. This ensures that caller of this RPC method can always use the retrieved | ||
|
@@ -77,6 +77,12 @@ MetaMask, to add multi-chain support. | |
|
||
Not relevant. | ||
|
||
## Security Considerations | ||
|
||
Consumers should prefer `eth_chainId` over `net_version`, so that they can reliably identify chain they are communicating with. | ||
|
||
Implementers should take care to implement `eth_chainId` correctly and promote its use, since the chain ID is critical in replay attack prevention as described in [EIP 155](https://eips.ethereum.org/EIPS/eip-155), and consumers will rely on it to identify the chain they are communicating with. | ||
|
||
## Implementation | ||
|
||
- [Parity PR](https://github.com/paritytech/parity/pull/6329) | ||
|