Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8f941b8
chore(release): cut rc-2026.6.2
jacderida Jun 8, 2026
8bc7f84
fix(storage): disk-space pre-check before payment verification in PUT
jacderida Jun 8, 2026
0dc5926
fix(replication): disk-space pre-check before payment verification on…
jacderida Jun 8, 2026
f4e4ec5
fix: address Copilot review comments on disk-space pre-check
jacderida Jun 8, 2026
0d10a85
Merge pull request #133 from jacderida/v2-411
jacderida Jun 9, 2026
fb5eb31
feat!: depend on bootstrap-cache removal chain
mickvandijke May 28, 2026
c3032ff
chore: update Cargo.lock after rebase
jacderida Jun 4, 2026
c188cbe
chore: update Cargo.lock after rebase
jacderida Jun 5, 2026
5928d9a
Merge pull request #119 from WithAutonomi/codex/remove-bootstrap-cache
jacderida Jun 9, 2026
d04c5aa
fix(pruning): tolerate one lagging peer in the prune proof gate
grumbach Jun 11, 2026
11976d9
fix(pruning): keep paid prune cursor internal
mickvandijke Jun 11, 2026
03d91e8
fix(replication): require aged repair hints before audits
mickvandijke Jun 11, 2026
bdbfdfc
fix(replication): make repair proof pruning test deterministic
mickvandijke Jun 11, 2026
1570733
fix(pruning): bound paid prune verification
mickvandijke Jun 11, 2026
479aced
chore(pruning): clean up paid prune review nits
mickvandijke Jun 11, 2026
692a4a0
feat(payment): accept flexible single-node proof bundles
mickvandijke Jun 11, 2026
d74a7e3
fix(payment): use configured client put membership checks
mickvandijke Jun 12, 2026
a8f5c9a
Merge pull request #134 from grumbach/quorum-based-prune-gate
jacderida Jun 12, 2026
5e54ef6
fix(payment): enforce local admission before proof verification
mickvandijke Jun 12, 2026
63ff5ce
Merge remote-tracking branch 'upstream/rc-2026.6.2' into fix/audit-re…
jacderida Jun 12, 2026
cafc27b
Merge pull request #136 from mickvandijke/feat/flexible-single-quote-…
jacderida Jun 12, 2026
d66ed8b
Merge pull request #135 from mickvandijke/fix/audit-repair-hint-min-age
jacderida Jun 12, 2026
8cb2c9f
fix(replication): widen local storage admission range
mickvandijke Jun 12, 2026
e16ffe1
Merge pull request #137 from mickvandijke/feat/storage-admission-margin
jacderida Jun 12, 2026
dbce099
chore(release): promote rc-2026.6.2 to 0.12.1
jacderida Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ant-node"
version = "0.12.0"
version = "0.12.1"
edition = "2021"
Comment on lines 1 to 4
authors = ["David Irvine <david.irvine@maidsafe.net>"]
description = "Pure quantum-proof network node for the Autonomi decentralized network"
Expand Down Expand Up @@ -39,10 +39,10 @@ mimalloc = "0.1"
# Until then, the git pin tracks the matching saorsa-core lineage
# (the rc-2026.4.2 branch) so Cargo can unify the wire types here
# with ant-protocol's re-exports.
ant-protocol = "2.1.2"
ant-protocol = "2.1.3"

# Core (provides EVERYTHING: networking, DHT, security, trust, storage)
saorsa-core = "0.24.5"
saorsa-core = "0.25.0"
saorsa-pqc = "0.5"

# Payment verification - autonomi network lookup + EVM payment
Expand Down
2 changes: 0 additions & 2 deletions docs/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ use saorsa_core::{
P2PNode, NodeConfig, NodeMode,
adaptive::trust::TrustEngine,
adaptive::dht::AdaptiveDhtConfig,
BootstrapConfig, BootstrapManager,
IPDiversityConfig,
identity::peer_id::PeerId,
};
Expand All @@ -194,7 +193,6 @@ pub struct RunningNode {
shutdown_sender: watch::Sender<bool>,
// USE ANT-CORE DIRECTLY - NO REIMPLEMENTATION!
node: Arc<P2PNode>, // Integrates ALL components
bootstrap: Arc<BootstrapManager>, // 30,000 peer cache
// Events
node_events_channel: NodeEventsChannel,
root_dir_path: PathBuf,
Expand Down
24 changes: 2 additions & 22 deletions src/bin/ant-node/cli.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Command-line interface definition.

use ant_node::config::{
BootstrapCacheConfig, BootstrapPeersConfig, BootstrapSource, EvmNetworkConfig, NetworkMode,
NodeConfig, PaymentConfig, UpgradeChannel,
BootstrapPeersConfig, BootstrapSource, EvmNetworkConfig, NetworkMode, NodeConfig,
PaymentConfig, UpgradeChannel,
};
use clap::{Parser, ValueEnum};
use std::net::SocketAddr;
Expand Down Expand Up @@ -133,18 +133,6 @@ pub struct Cli {
/// that will restart the process automatically.
#[arg(long)]
pub stop_on_upgrade: bool,

/// Disable persistent bootstrap cache.
#[arg(long)]
pub disable_bootstrap_cache: bool,

/// Directory for bootstrap cache files.
#[arg(long, env = "ANT_BOOTSTRAP_CACHE_DIR")]
pub bootstrap_cache_dir: Option<PathBuf>,

/// Maximum peers to cache in the bootstrap cache.
#[arg(long, default_value = "10000", env = "ANT_BOOTSTRAP_CACHE_CAPACITY")]
pub bootstrap_cache_capacity: usize,
}

/// Upgrade channel CLI enum.
Expand Down Expand Up @@ -282,14 +270,6 @@ impl Cli {
metrics_port: self.metrics_port,
};

// Bootstrap cache config
config.bootstrap_cache = BootstrapCacheConfig {
enabled: !self.disable_bootstrap_cache,
cache_dir: self.bootstrap_cache_dir,
max_contacts: self.bootstrap_cache_capacity,
..config.bootstrap_cache
};

// Determine bootstrap source and apply auto-discovery if needed.
let bootstrap_source = if cli_bootstrap_provided {
BootstrapSource::Cli
Expand Down
103 changes: 26 additions & 77 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ pub struct NodeConfig {
#[serde(default)]
pub payment: PaymentConfig,

/// Bootstrap cache configuration for persistent peer storage.
#[serde(default)]
pub bootstrap_cache: BootstrapCacheConfig,

/// Storage configuration for chunk persistence.
#[serde(default)]
pub storage: StorageConfig,
Expand Down Expand Up @@ -282,7 +278,6 @@ impl Default for NodeConfig {
testnet: TestnetConfig::default(),
upgrade: UpgradeConfig::default(),
payment: PaymentConfig::default(),
bootstrap_cache: BootstrapCacheConfig::default(),
storage: StorageConfig::default(),
close_group_cache_dir: None,
max_message_size: default_max_message_size(),
Expand Down Expand Up @@ -405,63 +400,6 @@ const fn default_staged_rollout_hours() -> u64 {
24 // 24 hour window for staged rollout
}

// ============================================================================
// Bootstrap Cache Configuration
// ============================================================================

/// Bootstrap cache configuration for persistent peer storage.
///
/// The bootstrap cache stores discovered peers across node restarts,
/// ranking them by quality metrics (success rate, latency, recency).
/// This reduces dependency on hardcoded bootstrap nodes and enables
/// faster network reconnection after restarts.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BootstrapCacheConfig {
/// Enable persistent bootstrap cache.
/// Default: true
#[serde(default = "default_bootstrap_cache_enabled")]
pub enabled: bool,

/// Directory for cache files.
/// Default: `{root_dir}/bootstrap_cache/`
#[serde(default)]
pub cache_dir: Option<PathBuf>,

/// Maximum contacts to store in the cache.
/// Default: 10,000
#[serde(default = "default_bootstrap_max_contacts")]
pub max_contacts: usize,

/// Stale contact threshold in days.
/// Contacts older than this are removed during cleanup.
/// Default: 7 days
#[serde(default = "default_bootstrap_stale_days")]
pub stale_threshold_days: u64,
}

impl Default for BootstrapCacheConfig {
fn default() -> Self {
Self {
enabled: default_bootstrap_cache_enabled(),
cache_dir: None,
max_contacts: default_bootstrap_max_contacts(),
stale_threshold_days: default_bootstrap_stale_days(),
}
}
}

const fn default_bootstrap_cache_enabled() -> bool {
true
}

const fn default_bootstrap_max_contacts() -> usize {
10_000
}

const fn default_bootstrap_stale_days() -> u64 {
7
}

// ============================================================================
// Storage Configuration
// ============================================================================
Expand Down Expand Up @@ -537,8 +475,6 @@ pub const BOOTSTRAP_PEERS_ENV: &str = "ANT_BOOTSTRAP_PEERS_PATH";
/// Bootstrap peers loaded from a shipped configuration file.
///
/// This file provides initial peers for first-time network joins.
/// It is separate from the bootstrap *cache* (which stores quality-ranked
/// peers discovered at runtime).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BootstrapPeersConfig {
/// The bootstrap peer socket addresses.
Expand Down Expand Up @@ -583,24 +519,37 @@ impl BootstrapPeersConfig {
/// Returns `None` if no file is found in any location.
#[must_use]
pub fn discover() -> Option<(Self, PathBuf)> {
let candidates = Self::search_paths();
for path in candidates {
if path.is_file() {
match Self::from_file(&path) {
Ok(config) if !config.peers.is_empty() => return Some((config, path)),
Ok(_) => {}
Err(err) => {
crate::logging::warn!(
"Failed to load bootstrap peers from {}: {err}",
path.display(),
);
}
}
if let Ok(env_path) = std::env::var(BOOTSTRAP_PEERS_ENV) {
return Self::load_non_empty_candidate(PathBuf::from(env_path));
}

for path in Self::search_paths() {
if let Some(discovered) = Self::load_non_empty_candidate(path) {
return Some(discovered);
}
}

None
}
Comment on lines 521 to 533

fn load_non_empty_candidate(path: PathBuf) -> Option<(Self, PathBuf)> {
if !path.is_file() {
return None;
}

match Self::from_file(&path) {
Ok(config) if !config.peers.is_empty() => Some((config, path)),
Ok(_) => None,
Err(err) => {
crate::logging::warn!(
"Failed to load bootstrap peers from {}: {err}",
path.display(),
);
None
}
}
}

/// Build the ordered list of candidate paths to search.
fn search_paths() -> Vec<PathBuf> {
let mut paths = Vec::new();
Expand Down
10 changes: 6 additions & 4 deletions src/devnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::payment::{
EvmVerifierConfig, PaymentVerifier, PaymentVerifierConfig, QuoteGenerator,
QuotingMetricsTracker,
};
use crate::replication::config::ReplicationConfig;
use crate::storage::{AntProtocol, LmdbStorage, LmdbStorageConfig};
use evmlib::Network as EvmNetwork;
use evmlib::RewardsAddress;
Expand Down Expand Up @@ -550,9 +551,11 @@ impl Devnet {
};

let rewards_address = RewardsAddress::new(DEVNET_REWARDS_ADDRESS);
let replication_config = ReplicationConfig::default();
let payment_config = PaymentVerifierConfig {
evm: evm_config,
cache_capacity: DEVNET_PAYMENT_CACHE_CAPACITY,
close_group_size: replication_config.close_group_size,
local_rewards_address: rewards_address,
};
let payment_verifier = PaymentVerifier::new(payment_config);
Expand Down Expand Up @@ -611,10 +614,9 @@ impl Devnet {
*node.state.write().await = NodeState::Running;

if let (Some(ref p2p), Some(ref protocol)) = (&node.p2p_node, &node.ant_protocol) {
// Wire the P2PNode into the payment verifier for merkle-closeness checks.
protocol
.payment_verifier_arc()
.attach_p2p_node(Arc::clone(p2p));
// Wire P2P into AntProtocol for direct PUT responsibility and
// payment-proof closeness checks.
protocol.attach_p2p_node(Arc::clone(p2p));

let mut events = p2p.subscribe_events();
let p2p_clone = Arc::clone(p2p);
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub use client::{
compute_address, hex_node_id_to_encoded_peer_id, peer_id_to_xor_name, xor_distance, DataChunk,
XorName,
};
pub use config::{BootstrapCacheConfig, NodeConfig, StorageConfig};
pub use config::{NodeConfig, StorageConfig};
pub use devnet::{Devnet, DevnetConfig, DevnetEvmInfo, DevnetManifest};
pub use error::{Error, Result};
pub use event::{NodeEvent, NodeEventsChannel};
Expand Down
Loading
Loading