diff --git a/EIPS/eip-695.md b/EIPS/eip-695.md index ad367b3566f57..af0ba45c09631 100644 --- a/EIPS/eip-695.md +++ b/EIPS/eip-695.md @@ -1,7 +1,7 @@ --- eip: 695 title: Create `eth_chainId` method for JSON-RPC -author: Isaac Ardis , Wei Tang (@sorpaas), Fan Torchz (@tcz001) +author: Isaac Ardis , Wei Tang (@sorpaas), Fan Torchz (@tcz001), Erik Marks 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)