fix(config): invalidate cached genesis on parse failure#126
Merged
Conversation
…ashLooping The cached `<dataDir>/genesis.bytes` file is written on first start to hold hash stability across restarts. On a binary upgrade that adds new codec types (multi-version v0+v1 dispatcher, etc.), the old cached blob may carry type IDs the new binary doesn't recognise. The existing code surfaced this as `resolve X-Chain asset ID from cached genesis: unmarshal interface: unknown type ID N` and returned an error — wedging the node in CrashLoop with no automatic recovery. Drop the cache and rebuild from the `--genesis-file` instead. Hash stability is forfeit for that single restart (intentional — the alternative is a permanent outage on every binary bump that changes codec types). Subsequent restarts re-establish stability against the fresh cache. Surfaced today on Liquidity testnet+mainnet bumping lqd v1.9.x → v1.10.8: every pod hit "unknown type ID 29" on the stale v1.9.x codec cache and CrashLoopBackOff'd.
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 the stale cached genesis.bytes file when its parse fails (codec mismatch on binary upgrade). Prevents permanent CrashLoop after type-ID-bumping releases. Surfaced today on Liquidity testnet+mainnet bumping v1.9.x → v1.10.8: 'unknown type ID 29' on the stale v1.9.x codec cache.