From c14815d76cd79b2aa72189395bf94314eaddf4aa Mon Sep 17 00:00:00 2001 From: bumblefudge Date: Thu, 22 Aug 2024 22:41:13 +0200 Subject: [PATCH 1/6] update regex to better reflect normref and examples --- eip155/caip10.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eip155/caip10.md b/eip155/caip10.md index 476dcaae..bfa1e81e 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,19} +reference: 0x[a-fA-F0-9]{1,40} ``` ### Backwards Compatibility From 75cabc151fb06415c629b2ac6c825c8f9091800c Mon Sep 17 00:00:00 2001 From: bumblefudge Date: Thu, 22 Aug 2024 22:42:17 +0200 Subject: [PATCH 2/6] update regex to better reflect normref and examples --- eip155/caip10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eip155/caip10.md b/eip155/caip10.md index bfa1e81e..13c166b1 100644 --- a/eip155/caip10.md +++ b/eip155/caip10.md @@ -45,7 +45,7 @@ The `chain_id` string will be ammended as follows: ``` chain_id: namespace + ":" + network_id + ":" + reference namespace: [-a-z0-9]{3,8} -network_id: [0-9]{1,19} +network_id: [0-9]{1,64} reference: 0x[a-fA-F0-9]{1,40} ``` From d9152b2ac94226514472b9246e5c6c41355ac43b Mon Sep 17 00:00:00 2001 From: bumblefudge Date: Thu, 22 Aug 2024 23:00:55 +0200 Subject: [PATCH 3/6] line breaks in eip155/caip2 --- eip155/caip2.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/eip155/caip2.md b/eip155/caip2.md index c4c7f61d..c6354670 100644 --- a/eip155/caip2.md +++ b/eip155/caip2.md @@ -17,23 +17,19 @@ 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 +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`. ### 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 +48,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 From 04166f3919a8f2be67d8108a0bbe8340a38e4238 Mon Sep 17 00:00:00 2001 From: bumblefudge Date: Thu, 22 Aug 2024 23:05:14 +0200 Subject: [PATCH 4/6] explain normref max and shorter realistic validation profile in eip155/caip2 --- eip155/caip2.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eip155/caip2.md b/eip155/caip2.md index c6354670..8c4eea13 100644 --- a/eip155/caip2.md +++ b/eip155/caip2.md @@ -22,10 +22,8 @@ Unique network IDs can be self-registered in the [ethereum-lists/chains][] regis ## 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 From b0229ee80ff8da044858c4cd7edba5b1cbdb9fd1 Mon Sep 17 00:00:00 2001 From: Bumblefudge Date: Fri, 23 Aug 2024 09:32:06 +0200 Subject: [PATCH 5/6] Update eip155/caip10.md Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com> --- eip155/caip10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eip155/caip10.md b/eip155/caip10.md index 13c166b1..53a5534d 100644 --- a/eip155/caip10.md +++ b/eip155/caip10.md @@ -46,7 +46,7 @@ The `chain_id` string will be ammended as follows: chain_id: namespace + ":" + network_id + ":" + reference namespace: [-a-z0-9]{3,8} network_id: [0-9]{1,64} -reference: 0x[a-fA-F0-9]{1,40} +reference: 0x[a-fA-F0-9]{40} ``` ### Backwards Compatibility From e4c41b529a419939a84377021580220bffcb8090 Mon Sep 17 00:00:00 2001 From: bumblefudge Date: Thu, 12 Sep 2024 17:19:00 +0200 Subject: [PATCH 6/6] eth-lists link fix --- eip155/caip10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eip155/caip10.md b/eip155/caip10.md index 13c166b1..ce597443 100644 --- a/eip155/caip10.md +++ b/eip155/caip10.md @@ -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