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

EIP: Implement eth_chainId method in JSON-RPC #695

Merged
merged 8 commits into from
Jan 26, 2018

Conversation

whilei
Copy link
Contributor

@whilei whilei commented Aug 21, 2017

@@ -0,0 +1,80 @@
## Preamble

EIP: <to be assigned>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use 695, and move this file to EIPS/eip-695.md

@ethereum ethereum deleted a comment from nnuna1986 Dec 22, 2017
@pirapira
Copy link
Member

@whilei are you still around?

@whilei
Copy link
Contributor Author

whilei commented Jan 25, 2018

Hi, sure am!

Just seeing your message above. Will do.


## Specification

----
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we don't have this. It's fine for me though.

EIPS/eip-695.md Outdated
### eth_chainId

Returns the currently configured chain id, a value used in replay-protected transaction
signing as introduced by EIP-155.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please link [EIP-155](./eip-155.md).

EIPS/eip-695.md Outdated

##### Returns

`QUANTITY` - big integer of the current chain id. Defaults are mainnet=61, morden=62.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON RPC has String, Number, Booleans or Null. I guess it's a String representing an integer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "big integer" is the usual way to say it?

Copy link
Contributor Author

@whilei whilei Jan 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, QUANTITY, for example: https://github.com/ethereum/wiki/wiki/JSON-RPC#net_peercount.

I'll change it to integer of the current chain id. [...], ok? (Because integer number is redundant)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this QUANTITY?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When encoding QUANTITIES (integers, numbers): encode as hex, prefix with "0x", the most compact representation (slight exception: zero should be represented as "0x0"). Examples:

0x41 (65 in decimal)
0x400 (1024 in decimal)

https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Will you add that link to the PR? Maybe in a Reference section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, 1d1799b

Copy link
Member

@pirapira pirapira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge as a draft.

@pirapira pirapira merged commit 8fe9f98 into ethereum:master Jan 26, 2018
hackmod added a commit to EthersocialNetwork/parity-ethereum that referenced this pull request Oct 19, 2018
hackmod added a commit to EthersocialNetwork/parity-ethereum that referenced this pull request Oct 19, 2018
hackmod added a commit to EthersocialNetwork/parity-ethereum that referenced this pull request Oct 19, 2018
sorpaas pushed a commit to openethereum/parity-ethereum that referenced this pull request Oct 20, 2018
* Support eth_chainId RPC method

 * ethereum/EIPs#695
 * Original PR is #6329

* rpc: remove parity_chainId
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

Successfully merging this pull request may close these issues.

2 participants