Skip to content

Conversation

@jclapis
Copy link
Collaborator

@jclapis jclapis commented Aug 6, 2025

Currently a size limit on chain IDs isn't well-defined (see https://ethereum-magicians.org/t/eip-2294-explicit-bound-to-chain-id). Some tools use an unsigned 64-bit integer (including alloy which is one of our dependencies), some use an unsigned 52-bit integer (since that's the highest value that fits without error into floats, which JS uses), but the largest value canonically is an unsigned 256-bit integer, used by Geth and friends in the EVM implementation itself.

One of the reasons the 256-bit version is popular is because it lets people use keccak256("some_relevant_string") as their Chain ID to avoid collisions. Until there's an official spec designation for a size limit, we should stick to 256-bit ones internally to support use-cases like that.

Alternatively, we should make it explicit in the documentation that Commit-Boost doesn't support chain IDs larger than the u64 limit; people will not be able to use e.g. the Signer service for custom chains that go out of those bounds.

@jclapis jclapis requested a review from ManuelBilbao August 6, 2025 18:14
@jclapis jclapis self-assigned this Aug 6, 2025
@jclapis jclapis added the core Core part of the repo (signer, modules interface) label Aug 6, 2025
@jclapis jclapis changed the base branch from signer-json-api to augment-sign-requests August 7, 2025 07:21
@ltitanb ltitanb merged commit 7293e5c into augment-sign-requests Aug 12, 2025
1 check passed
@ltitanb ltitanb deleted the chain-id-to-u256 branch August 12, 2025 16:51
@jclapis jclapis mentioned this pull request Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core part of the repo (signer, modules interface)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants