Skip to content
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

ERC-695: Add security considerations; rekmarks as author #2642

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions EIPS/eip-695.md
@@ -1,7 +1,7 @@
---
eip: 695
title: Create `eth_chainId` method for JSON-RPC
author: Isaac Ardis <isaac.ardis@gmail.com>, Wei Tang (@sorpaas), Fan Torchz (@tcz001)
author: Isaac Ardis <isaac.ardis@gmail.com>, Wei Tang (@sorpaas), Fan Torchz (@tcz001), Erik Marks <rekmarks@protonmail.com>
discussions-to: https://ethereum-magicians.org/t/eip-695-create-eth-chainid-method-for-json-rpc/1845
type: Standards Track
category: Interface
Expand All @@ -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).
rekmarks marked this conversation as resolved.
Show resolved Hide resolved

## Motivation

Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down