Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
101 changes: 95 additions & 6 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion ant-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tower-http = { version = "0.6.8", features = ["cors"] }
# under `ant_protocol::{evm, transport, pqc}`. This is the ONE pin for
# those three deps — do not add direct evmlib/saorsa-core/saorsa-pqc
# deps here or the version can skew between ant-client and ant-node.
ant-protocol = "2.0.1"
ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol.git", branch = "mick/remove-bootstrap-cache" }
xor_name = "5"
self_encryption = "0.35.0"
futures = "0.3"
Expand Down
2 changes: 0 additions & 2 deletions ant-core/src/data/client/adaptive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
//!
//! - Not a payment-batching controller. Wave / batch sizes are
//! orthogonal (gas-economics tradeoff, not throughput).
//! - Not a peer-quality scorer. That lives in `peer_cache` and feeds
//! `BootstrapManager`. Outcomes flow into both, separately.

use serde::{Deserialize, Serialize};
use std::collections::VecDeque;
Expand Down
14 changes: 1 addition & 13 deletions ant-core/src/data/client/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! Chunks are immutable, content-addressed data blocks where the address
//! is the BLAKE3 hash of the content.

use crate::data::client::peer_cache::record_peer_outcome;
use crate::data::client::Client;
use crate::data::error::{Error, Result};
use ant_protocol::transport::{MultiAddr, PeerId};
Expand All @@ -15,7 +14,7 @@ use ant_protocol::{
use bytes::Bytes;
use futures::stream::{FuturesUnordered, StreamExt};
use std::future::Future;
use std::time::{Duration, Instant};
use std::time::Duration;
use tracing::{debug, warn};

/// Data type identifier for chunks (used in quote requests).
Expand Down Expand Up @@ -237,12 +236,6 @@ impl Client {
)
.await;

// No RTT recorded on the PUT path: the wall-clock is dominated by
// the ~4 MB payload upload, which reflects the uploader's uplink
// rather than the peer's responsiveness. Quote-path and GET-path
// RTTs still feed quality scoring.
record_peer_outcome(node, *target_peer, peer_addrs, result.is_ok(), None).await;

result
}

Expand Down Expand Up @@ -412,7 +405,6 @@ impl Client {
let addr_hex = hex::encode(address);
let timeout_secs = self.config().store_timeout_secs;

let start = Instant::now();
let result = send_and_await_chunk_response(
node,
peer,
Expand Down Expand Up @@ -462,10 +454,6 @@ impl Client {
)
.await;

let success = result.is_ok();
let rtt_ms = success.then(|| start.elapsed().as_millis() as u64);
record_peer_outcome(node, *peer, peer_addrs, success, rtt_ms).await;

result
}

Expand Down
1 change: 0 additions & 1 deletion ant-core/src/data/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub mod data;
pub mod file;
pub mod merkle;
pub mod payment;
pub(crate) mod peer_cache;
pub mod quote;

use crate::data::client::adaptive::{AdaptiveConfig, AdaptiveController, ChannelStart, Outcome};
Expand Down
137 changes: 0 additions & 137 deletions ant-core/src/data/client/peer_cache.rs

This file was deleted.

9 changes: 1 addition & 8 deletions ant-core/src/data/client/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! Handles requesting storage quotes from network nodes and
//! managing payment for data storage.

use crate::data::client::peer_cache::record_peer_outcome;
use crate::data::client::Client;
use crate::data::error::{Error, Result};
use ant_protocol::evm::{Amount, PaymentQuote};
Expand All @@ -13,7 +12,7 @@ use ant_protocol::{
ChunkQuoteResponse, CLOSE_GROUP_MAJORITY, CLOSE_GROUP_SIZE,
};
use futures::stream::{FuturesUnordered, StreamExt};
use std::time::{Duration, Instant};
use std::time::Duration;
use tracing::{debug, info, warn};

/// Compute XOR distance between a peer's ID bytes and a target address.
Expand Down Expand Up @@ -105,7 +104,6 @@ impl Client {
let node_clone = node.clone();

let quote_future = async move {
let start = Instant::now();
let result = send_and_await_chunk_response(
&node_clone,
&peer_id_clone,
Expand Down Expand Up @@ -147,11 +145,6 @@ impl Client {
)
.await;

let success = result.is_ok();
let rtt_ms = success.then(|| start.elapsed().as_millis() as u64);
record_peer_outcome(&node_clone, peer_id_clone, &addrs_clone, success, rtt_ms)
.await;

(peer_id_clone, addrs_clone, result)
};

Expand Down
Loading
Loading