inventory: keep genesis chain id within 32-bit range - #188
Open
barnabasbusa wants to merge 1 commit into
Open
Conversation
Drop one random digit so chain ids are 9 digits (701,000,000-709,999,999) instead of 10 (7,010,000,000-7,099,999,999), which exceeds uint32/int32 max and breaks tooling that stores the chain id as a 32-bit integer. Claude-Session: https://claude.ai/code/session_01SR2hVqU8pi6v4NZ7RJwcxm
There was a problem hiding this comment.
Reduces the random part of ethereum_genesis_chain_id from an 8-digit to a 7-digit value so generated chain ids are 9 digits (701000000-709999998) and fit in int32/uint32. Verified against the pinned ansible==10.1.0 'random' filter (randrange end-exclusive): the new range produces only 7-digit random parts and start was correctly reduced to keep the id fixed-length and avoid an empty-range ValueError. No committed network-config artifacts exist in this repo to drift out of sync. Change is correct.
Reviewed 1 changed file(s) @ a9c9b668 — no blocking issues found.
"If you can't measure it, you can't improve it." — Peter Drucker
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.
Drops one digit from the random part of
ethereum_genesis_chain_idso generated chain ids are 9 digits (701000000–709999999) instead of 10 (7010000000–7099999999).The 10-digit ids exceed both
uint32max (4,294,967,295) andint32max (2,147,483,647), which breaks any tooling that stores the chain id as a 32-bit integer. 9 digits with a70prefix fits inint32with headroom.startis reduced alongside the max so the id stays fixed-length (and so Jinja'srandomdoesn't error on start > end).Only affects newly generated genesis; existing baked network-configs are unchanged.
https://claude.ai/code/session_01SR2hVqU8pi6v4NZ7RJwcxm