fix: extract bootstrap_peers.toml from archive during node add#36
Merged
jacderida merged 1 commit intorc-2026.4.1from Apr 14, 2026
Merged
Conversation
When adding nodes via `ant node add`, the binary is downloaded from a GitHub release archive and placed in each node's data directory. However, the `bootstrap_peers.toml` file — which ships alongside the binary in the same archive — was being discarded during extraction. Without this file, nodes cannot discover production network peers on startup. This updates the archive extraction to also extract `bootstrap_peers.toml` when present, cache it alongside the binary with a versioned name, and copy it into each node's data directory next to the binary. - Update `extract_tar_gz` and `extract_zip` to extract `bootstrap_peers.toml` alongside the binary - Cache the bootstrap file with a versioned name (e.g., `ant-node-0.3.4.bootstrap_peers.toml`) - Copy bootstrap_peers.toml into each node's data directory during `add_nodes` - Check for bootstrap_peers.toml next to local binaries in `resolve_local` - Add `ResolvedBinary` and `ExtractionResult` structs for cleaner return types - Add tests for bootstrap peers extraction and cached bootstrap peers resolution Test results: 130 unit tests passed, all integration tests passed. Clippy and fmt clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
80cc682 to
b3c93ec
Compare
Nic-dorman
approved these changes
Apr 14, 2026
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
ant node adddownloads a node binary from a GitHub release archive, thebootstrap_peers.tomlfile that ships alongside the binary was being discarded duringextraction. Without this file, nodes cannot discover production network peers on startup.
extract_tar_gzandextract_zipto also extractbootstrap_peers.tomlwhen presentin the archive, caches it alongside the binary with a versioned name, and copies it into each
node's data directory next to the binary.
bootstrap_peers.tomlnext to local binaries when using--path.Test plan
cargo test -p ant-core --lib)extract_tar_gz_finds_bootstrap_peersverifies extraction from tar.gz archivesresolve_version_uses_cached_bootstrap_peersverifies cached bootstrap file lookupextract_tar_gz_finds_binaryupdated to assert no bootstrap file when absent🤖 Generated with Claude Code