feat!: drop bootstrap_cache wrapper and CLI surface#85
Draft
mickvandijke wants to merge 2 commits intomainfrom
Draft
feat!: drop bootstrap_cache wrapper and CLI surface#85mickvandijke wants to merge 2 commits intomainfrom
mickvandijke wants to merge 2 commits intomainfrom
Conversation
saorsa-core removed BootstrapManager, BootstrapConfig, and the cache delegation methods on P2PNode. saorsa-node's own BootstrapCacheConfig existed only to plumb that wrapper from the ant-node CLI through NodeConfig and into BootstrapManager::with_config. With the wrapped type gone, the entire layer becomes dead code. Removes saorsa-node::config::BootstrapCacheConfig (the local struct with `enabled`, `cache_dir`, `max_contacts`, `stale_threshold_days`), its NodeConfig field, the lib.rs re-export, and the build_bootstrap_manager construction path in node.rs (including the bootstrap_manager field on RunningNode and the shutdown-time stats log). The ant-node CLI loses --disable-bootstrap-cache, --bootstrap-cache-dir, and --bootstrap-cache-capacity along with their environment-variable fallbacks (ANT_BOOTSTRAP_CACHE_DIR, ANT_BOOTSTRAP_CACHE_CAPACITY). Bootstrap is now exclusively close-group cache (Priority 0) plus configured CLI / config-file bootstrap peers (Priority 1). The payment-cache (CacheStats / VerifiedCache in src/payment/cache.rs) is unrelated and stays. BREAKING CHANGE: ant_node::BootstrapCacheConfig and NodeConfig::bootstrap_cache no longer exist. Operators using --disable-bootstrap-cache, --bootstrap-cache-dir, --bootstrap-cache-capacity, ANT_BOOTSTRAP_CACHE_DIR, or ANT_BOOTSTRAP_CACHE_CAPACITY must drop those flags / env vars from service definitions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rap-cache branches Pulls in matching upstream branches where the bootstrap cache and its surrounding wiring were removed. saorsa-core transitively pulls saorsa-transport from the same branch name. Required for this saorsa-node branch to build, since BootstrapManager, BootstrapConfig, and the cache-delegation methods on P2PNode no longer exist. Co-Authored-By: Claude Opus 4.7 (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
BootstrapCacheConfigfromsrc/config.rs(different struct from saorsa-transport's, fieldsenabled/cache_dir/max_contacts/stale_threshold_days) and thebootstrap_cachefield onNodeConfig.pub use config::BootstrapCacheConfigre-export fromlib.rs.build_bootstrap_manager, thebootstrap_manager: Option<BootstrapManager>field onRunningNode, and the shutdown-time stats log line fromnode.rs.--disable-bootstrap-cache,--bootstrap-cache-dir, and--bootstrap-cache-capacityCLI flags from theant-nodebinary, plus theANT_BOOTSTRAP_CACHE_DIRandANT_BOOTSTRAP_CACHE_CAPACITYenv-var fallbacks.ant-protocolandsaorsa-coreto track the corresponding branches.Anyone with these flags or env vars baked into systemd unit files / Docker entrypoints / deploy scripts must remove them before rolling out the new binary, or the process will fail at startup with clap's unknown-argument error.
Depends on
(both transitively pin feat!: remove bootstrap_cache module saorsa-labs/saorsa-transport#73)
Backwards compatibility
Capabilitiesstruct unchanged, DHT/chunk/payment unchanged).[bootstrap_cache]sections still parse —NodeConfigdoes not set#[serde(deny_unknown_fields)], so serde silently drops the unknown section.config/production.tomlin this repo still has a stale[bootstrap_cache]example block; harmless but worth a follow-up cleanup.Test plan
cargo check --all-targetscargo clippy --all-targets --all-features -- -D warningscargo test --lib(448 of 449 passed; one pre-existing flakytest_bootstrap_peers_discover_env_varenv-var-race fails on plainmaintoo)🤖 Generated with Claude Code