Skip to content

feat!: drop bootstrap_cache wrapper and CLI surface#85

Draft
mickvandijke wants to merge 2 commits intomainfrom
mick/remove-bootstrap-cache
Draft

feat!: drop bootstrap_cache wrapper and CLI surface#85
mickvandijke wants to merge 2 commits intomainfrom
mick/remove-bootstrap-cache

Conversation

@mickvandijke
Copy link
Copy Markdown
Collaborator

Summary

  • Removes saorsa-node's own BootstrapCacheConfig from src/config.rs (different struct from saorsa-transport's, fields enabled / cache_dir / max_contacts / stale_threshold_days) and the bootstrap_cache field on NodeConfig.
  • Drops the pub use config::BootstrapCacheConfig re-export from lib.rs.
  • Removes build_bootstrap_manager, the bootstrap_manager: Option<BootstrapManager> field on RunningNode, and the shutdown-time stats log line from node.rs.
  • Removes the --disable-bootstrap-cache, --bootstrap-cache-dir, and --bootstrap-cache-capacity CLI flags from the ant-node binary, plus the ANT_BOOTSTRAP_CACHE_DIR and ANT_BOOTSTRAP_CACHE_CAPACITY env-var fallbacks.
  • Bumps ant-protocol and saorsa-core to track the corresponding branches.

⚠️ Operator-facing breakage

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

Backwards compatibility

  • Wire-level: unchanged. Mixed networks of upgraded and non-upgraded nodes interoperate freely (PROTOCOL_VERSION = 1 untouched, on-wire Capabilities struct unchanged, DHT/chunk/payment unchanged).
  • Old config files with [bootstrap_cache] sections still parse — NodeConfig does not set #[serde(deny_unknown_fields)], so serde silently drops the unknown section.
  • config/production.toml in this repo still has a stale [bootstrap_cache] example block; harmless but worth a follow-up cleanup.

Test plan

  • cargo check --all-targets
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --lib (448 of 449 passed; one pre-existing flaky test_bootstrap_peers_discover_env_var env-var-race fails on plain main too)

🤖 Generated with Claude Code

mickvandijke and others added 2 commits April 29, 2026 13:19
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant