Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions ant-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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 = { git = "https://github.com/WithAutonomi/ant-protocol", branch = "rc-2026.6.2" }
ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol", branch = "feat/witnessed-transcript-policy" }
xor_name = "5"
self_encryption = "0.36"
futures = "0.3"
Expand All @@ -61,11 +61,11 @@ sysinfo = { version = "0.32", default-features = false, features = ["system"] }
# Must track the same `saorsa-core` / `ant-protocol` line as the
# `ant-protocol` pin above — a version skew pulls a second copy of
# `saorsa-core` into the graph and makes `ant_node`'s and `ant_protocol`'s
# `MultiAddr` mutually incompatible in `node/devnet.rs`. During an RC the
# runtime `ant-protocol` pin above points at a git rc branch, so this
# ant-node must point at the matching ant-node rc branch (carrying the same
# saorsa-core / ant-protocol lineage) rather than a released version.
ant-node = { git = "https://github.com/WithAutonomi/ant-node", branch = "rc-2026.6.2", optional = true }
# `MultiAddr` mutually incompatible in `node/devnet.rs`. While the runtime
# `ant-protocol` pin above points at a git branch, this ant-node must point at
# the matching ant-node branch carrying the same saorsa-core / ant-protocol
# lineage rather than a released version.
ant-node = { git = "https://github.com/WithAutonomi/ant-node", branch = "feat/witnessed-transcript-policy", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[target.'cfg(unix)'.dependencies]
Expand Down Expand Up @@ -93,7 +93,7 @@ devnet = ["dep:ant-node"]
# always compile even without the `devnet` feature. Pinned to the same
# version as the runtime dep so there is a single ant-node /
# saorsa-core version across the whole graph.
ant-node = { git = "https://github.com/WithAutonomi/ant-node", branch = "rc-2026.6.2" }
ant-node = { git = "https://github.com/WithAutonomi/ant-node", branch = "feat/witnessed-transcript-policy", features = ["test-utils"] }
serial_test = "3"
anyhow = "1"
alloy = { version = "1.6", features = ["node-bindings"] }
Expand Down
12 changes: 5 additions & 7 deletions ant-core/src/data/client/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,23 +243,21 @@ impl Client {
let data_size = u64::try_from(content.len())
.map_err(|e| Error::InvalidData(format!("content size too large: {e}")))?;

let quotes_with_peers = match self
.get_store_quotes(&address, data_size, DATA_TYPE_CHUNK)
let quote_plan = match self
.get_store_quote_plan(&address, data_size, DATA_TYPE_CHUNK)
.await
{
Ok(quotes) => quotes,
Ok(plan) => plan,
Err(Error::AlreadyStored) => {
debug!("Chunk {} already stored, skipping", hex::encode(address));
return Ok(None);
}
Err(e) => return Err(e),
};
let quotes_with_peers = quote_plan.quotes;

// Capture all quoted peers for close-group replication.
let quoted_peers: Vec<(PeerId, Vec<MultiAddr>)> = quotes_with_peers
.iter()
.map(|(peer_id, addrs, _, _)| (*peer_id, addrs.clone()))
.collect();
let quoted_peers = quote_plan.put_peers;

// Build peer_quotes for ProofOfPayment + quotes for SingleNodePayment.
// Use node-reported prices directly — no contract price fetch needed.
Expand Down
10 changes: 5 additions & 5 deletions ant-core/src/data/client/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ impl Client {
debug!("Collecting quotes for address {}", hex::encode(address));

// 1. Collect quotes from network
let quotes_with_peers = self.get_store_quotes(address, data_size, data_type).await?;
let quote_plan = self
.get_store_quote_plan(address, data_size, data_type)
.await?;
let quotes_with_peers = quote_plan.quotes;
let median_quote_issuer =
median_paid_quote_issuer(&quotes_with_peers).ok_or_else(|| {
Error::Payment(
Expand All @@ -57,10 +60,7 @@ impl Client {
})?;

// Capture all quoted peers for replication by the caller.
let quoted_peers: Vec<(PeerId, Vec<MultiAddr>)> = quotes_with_peers
.iter()
.map(|(peer_id, addrs, _, _)| (*peer_id, addrs.clone()))
.collect();
let quoted_peers = quote_plan.put_peers;

// 2. Build peer_quotes for ProofOfPayment + quotes for SingleNodePayment.
// Use node-reported prices directly — no contract price fetch needed.
Expand Down
Loading
Loading