diff --git a/eip155/caip10.md b/eip155/caip10.md index 476dcaae..4f37a5a8 100644 --- a/eip155/caip10.md +++ b/eip155/caip10.md @@ -44,9 +44,9 @@ The `chain_id` string will be ammended as follows: ``` chain_id: namespace + ":" + network_id + ":" + reference -network_id: [0-9]{1,19} namespace: [-a-z0-9]{3,8} -reference: 0x[a-fA-F0-9]{1,32} +network_id: [0-9]{1,64} +reference: 0x[a-fA-F0-9]{40} ``` ### Backwards Compatibility @@ -91,7 +91,7 @@ As the Ethereum namespace evolved, user-agents that connect to dapps through an - [ERC-20][]: Basic [aka Fungible] Token Standard - [ERC-721][]: Non-Fungible Token Standard -[Chainid.network]: https://github.com/ethereum-lists/chains +[ethereum-lists/chains]: https://github.com/ethereum-lists/chains [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md diff --git a/eip155/caip2.md b/eip155/caip2.md index c4c7f61d..8c4eea13 100644 --- a/eip155/caip2.md +++ b/eip155/caip2.md @@ -17,23 +17,17 @@ replaces: CAIP-3 ## Rationale -The chain ID defined in EIP155 is the most widely used chain identifier in the -Ethereum ecosystem known to the authors. It optimizes for uniqueness and its -usage for replay protection has helped it achieve wide adoption. Unique network -IDs can be self-registered in the [ethereum-lists/chains][] registry. +The chain ID defined in EIP155 is the most widely used chain identifier in the Ethereum ecosystem known to the authors. It optimizes for uniqueness and its usage for replay protection has helped it achieve wide adoption. +Unique network IDs can be self-registered in the [ethereum-lists/chains][] registry. ## Syntax -For reference, The format of reference currently specified in EIP155 is an -unsigned integer in decimal representation. Due to length restrictions of the -reference field (32 characters), the largest supported `CHAIN_ID` at time of -writing is `99999999999999999999999999999999`. - +For reference, The format of reference currently specified in EIP155 is an unsigned integer of type UINT256, which is 64 characters long in hexadecimal notation. +That said, the longest `chainId` registered in the registry is 15 characters long, and compatibility with major wallets and common tooling in the Ethereum ecosystem is endangered when `chainId`s exceed 55 bits, so implementers are encouraged to observe the much shorter profile defined in [EIP-2294](https://ethereum-magicians.org/t/eip-2294-explicit-bound-to-chain-id/11090/14) in contexts where longer chainIds need to be supported. ### Resolution Method -To resolve a blockchain reference for the EIP155 namespace, make a JSON-RPC -request to a blockchain node with method `eth_chainId`, for example: +To resolve a blockchain reference for the EIP155 namespace, make a JSON-RPC request to a blockchain node with method `eth_chainId`, for example: ``` // Request @@ -52,8 +46,7 @@ request to a blockchain node with method `eth_chainId`, for example: } ``` -The response will return a base-16-encoded integer that should be converted to -base 10 to format an EIP155-compatible blockchain reference. +The response will return a base-16-encoded integer that should be converted to base 10 to format an EIP155-compatible blockchain reference. ## Test Cases