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

Add RPC eth_chainId for querying the current blockchain chain ID #694

Closed
tcz001 opened this issue Aug 21, 2017 · 1 comment
Closed

Add RPC eth_chainId for querying the current blockchain chain ID #694

tcz001 opened this issue Aug 21, 2017 · 1 comment

Comments

@tcz001
Copy link

tcz001 commented Aug 21, 2017

Preamble

EIP: EIP694
Title: Add RPC eth_chainId for querying the current blockchain chain ID
Type: Standard Track
Category: Interface
Status: Draft
Created: 2017-08-21

Simple Summary

Add RPC eth_chainId for querying the current blockchain chain ID

Abstract

Currently although we can use net_version RPC call to get the current network ID, there's no RPC for querying the chain ID. This makes it impossible to determine the current actual blockchain using the RPC.

Motivation

An ETH/ETC client can accidentally connect to an ETC/ETH RPC endpoint without knowing it unless it tries to sign a transaction or it fetch a transaction that is known to have signed with a chain ID. This has since caused trouble for application developers, such as MetaMask, to add multi-chain support.

Specification

As Parity PR and ETC go-ethereum PR, we can achieve cross-client compatible RPC API by using the same approach.
As described in ethereumproject/go-ethereum PR:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x3d"
}
@whilei
Copy link
Contributor

whilei commented Aug 21, 2017

I have submitted this a PR per the README instructions - #695.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants