Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 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
29ad6a5
fix(payment): widen paid-quote issuer admission to close group + margin
jacderida Jun 12, 2026
ff1195e
Merge pull request #139 from jacderida/fix/widen-issuer-admission-margin
jacderida Jun 12, 2026
c30a197
chore(release): roll rc-2026.6.2 to 0.12.1-rc.2
jacderida Jun 12, 2026
c7dd880
fix(payment): use XOR-only local lookup for close-group verification
jacderida Jun 12, 2026
2cf8ad2
Merge pull request #140 from jacderida/fix/xor-only-closeness-verific…
jacderida Jun 13, 2026
cc7aec0
chore(release): roll rc-2026.6.2 to 0.12.1-rc.3
jacderida Jun 13, 2026
73cb220
fix(payment): verify single-node issuer closeness against over-query …
jacderida Jun 13, 2026
68a212f
style(payment): rustfmt the issuer-closeness network fallback match
jacderida Jun 13, 2026
d797cb8
Merge pull request #141 from jacderida/fix/single-node-issuer-closene…
jacderida Jun 13, 2026
710d1da
chore(release): roll rc-2026.6.2 to 0.12.1-rc.4
jacderida Jun 13, 2026
febd681
revert(payment): revert #141 single-node issuer over-query window
jacderida Jun 14, 2026
b3c9606
Merge pull request #143 from jacderida/chore-revert_139_141
jacderida Jun 14, 2026
7f72735
chore(release): cut rc-2026.6.2
jacderida Jun 14, 2026
9ba96e2
chore(release): roll rc-2026.6.2 to 0.12.1-rc.6
jacderida Jun 14, 2026
dfaa086
chore(release): roll rc-2026.6.2 to 0.12.1-rc.7
jacderida Jun 15, 2026
4b2c232
feat(replication): prioritize new close peers in neighbor sync
mickvandijke Jun 15, 2026
6a2c220
fix(replication): prune departed peers from neighbor sync
mickvandijke Jun 16, 2026
4774fc1
fix(payment): accept paid quote issuers within K closest peers
mickvandijke Jun 16, 2026
6110d14
docs(replication): align neighbor sync priority design
mickvandijke Jun 16, 2026
675ff50
Merge pull request #147 from mickvandijke/fix/increase-quote-issuer-v…
jacderida Jun 16, 2026
fec7063
Merge pull request #146 from mickvandijke/feat/neighbor-sync-priority
jacderida Jun 16, 2026
8f8842a
chore(lock): refresh saorsa-core to rc-2026.6.2 tip (#135)
jacderida Jun 16, 2026
5067809
chore(release): roll rc-2026.6.2 to 0.12.1-rc.8
jacderida Jun 17, 2026
86a54d3
perf(replication): reduce neighbor sync CPU spikes
mickvandijke Jun 17, 2026
afaaed3
fix(payment): lower fast verification failure logs
mickvandijke Jun 17, 2026
a56df72
fix(storage): skip direct PUT receiver responsibility gate
mickvandijke Jun 17, 2026
3d4d4df
Merge pull request #150 from mickvandijke/perf/reduce-replication-cpu…
jacderida Jun 17, 2026
1898de8
Merge pull request #152 from mickvandijke/fix/direct-put-skip-members…
jacderida Jun 17, 2026
0d174a3
chore(release): promote rc-2026.6.2 to 0.13.0
jacderida Jun 18, 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.13.0"
edition = "2021"
Comment thread
jacderida marked this conversation as resolved.
authors = ["David Irvine <david.irvine@maidsafe.net>"]
Comment on lines 1 to 5
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.2.0"

# Core (provides EVERYTHING: networking, DHT, security, trust, storage)
saorsa-core = "0.24.5"
saorsa-core = "0.26.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
60 changes: 32 additions & 28 deletions docs/REPLICATION_DESIGN.md

Large diffs are not rendered by default.

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));
}
Comment on lines 521 to +524

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

None
}

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
9 changes: 5 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,8 @@ 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 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