feat(config): surface trust anchors; warn on a sub-activation --genesis (#107)#108
Merged
Merged
Conversation
…is (#107) Findings #25 and #38 (operator visibility). #25: `ion-node config` omitted MinChainWork (the eclipse/fake-chain floor markSynced enforces) and any augmenting --checkpoint, so an operator couldn't confirm the security-critical config before launch. runConfig now prints minChainWork (or "unset") and extraCheckpoint (or "none"). #38: buildConfig accepted any --genesis>=0 with no warning, so `--network mainnet --genesis 0` silently scans ~667k pointless pre-ION blocks. config.ProfileGenesisHeight exposes the per-network ION-activation default; buildConfig logs a WARN when the resolved genesis is below it. Warning (not error): a low genesis is wasteful, not incorrect; a higher-than-default genesis is fine (skips old DIDs). Test: TestProfileGenesisHeight (mainnet 667000, testnet 1764000, dev 0, unknown errors). go test -race ./... green. Co-authored-by: Liran Cohen <liranlasvegas@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Closes audit findings #25 and #38 (operator visibility in the config path).
ion-node configomittedMinChainWork(the eclipse/fake-chain floormarkSyncedenforces) and any augmenting--checkpoint.runConfignow printsminChainWork(orunset) andextraCheckpoint(ornone).buildConfigaccepted any--genesis >= 0, so--network mainnet --genesis 0silently scans ~667k pointless pre-ION blocks.config.ProfileGenesisHeight(network)exposes the per-network ION-activation default;buildConfiglogs a WARN when the resolved genesis is below it. Warning, not error — a low genesis is wasteful, not incorrect; a higher-than-default genesis is fine (skips old DIDs).Tests
TestProfileGenesisHeight(mainnet 667000, testnet 1764000, dev 0, unknown errors).go test -race ./...green (26 packages).Post-Deploy Monitoring & Validation
ion-node configand confirmminChainWorkis the expected non-default floor andextraCheckpointmatches intent. A"genesis height is below the network's ION activation"WARN at boot flags a misconfigured--genesis.--genesis(or remove it to use the profile default).Closes #107
🤖 Generated with Claude Code