Change chain IDs to 256-bit numbers#353
Merged
ltitanb merged 2 commits intoaugment-sign-requestsfrom Aug 12, 2025
Merged
Conversation
ManuelBilbao
reviewed
Aug 6, 2025
90ae97a to
2f24a52
Compare
ManuelBilbao
approved these changes
Aug 7, 2025
This was referenced Aug 7, 2025
ltitanb
approved these changes
Aug 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
alloywhich 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
u64limit; people will not be able to use e.g. the Signer service for custom chains that go out of those bounds.