Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1e8eb94
feat(payment)!: enforce the close-group price floor on every node
grumbach Oct 21, 2026
a044676
fix(replication): drop in-memory price-contested marks a later write …
grumbach Oct 22, 2026
7a735be
docs(adr): count the reconciliation mutations in ADR-0006
grumbach Oct 22, 2026
2252074
docs(adr): say a fan-out, not the record, reads the current view
grumbach Oct 29, 2026
16e1fc7
test: name the tokio types the new test helpers use by import
grumbach Oct 29, 2026
efa4a57
Merge upstream main into price-floor-live-enforcement
grumbach Nov 5, 2026
ce05871
test(replication): pin that eviction takes a price-contested mark wit…
grumbach Nov 5, 2026
813b103
docs(adr): ADR-0006 follows pressure-gated retention
grumbach Nov 5, 2026
ada05dd
fix(replication): hint a stored price-contested key at any distance
grumbach Nov 5, 2026
7bbe0e1
fix(replication): hint every stored paid key far away while the marks…
grumbach Nov 5, 2026
6051640
fix(replication): keep the paid entry of a record that cannot be read…
grumbach Nov 5, 2026
04513a8
perf(replication): find far marked keys among the stored keys, not ev…
grumbach Nov 5, 2026
e9728f5
docs(adr): ADR-0006 records that a marked copy is never a repair source
grumbach Nov 5, 2026
7b66a6c
fix(replication): send a far marked paid hint only where a replica hi…
grumbach Nov 5, 2026
8d12c17
docs(adr): ADR-0006 narrows the repair-source limit to copies outside…
grumbach Nov 5, 2026
06eea79
docs(adr): ADR-0006 counts the mutations run on the merged code
grumbach Nov 5, 2026
3e87bef
fix(replication): keep the paid entry of a record admitted while evic…
grumbach Nov 6, 2026
5fd1281
docs(adr): ADR-0006 records that eviction keeps the entries of record…
grumbach Nov 6, 2026
298c8b3
Merge upstream main into price-floor-live-enforcement
grumbach Nov 6, 2026
75b0501
test(replication): let the put-check eviction test finish the PUT whe…
grumbach Nov 6, 2026
73e15bb
docs(adr): ADR-0006 counts the mutations run on the eviction and admi…
grumbach Nov 6, 2026
3901df3
fix(storage): keep a client PUT's paid entry from its check to its store
grumbach Nov 6, 2026
c797212
docs(adr): ADR-0006 counts the client PUT as one admission from its c…
grumbach Nov 6, 2026
c19b075
docs(storage): say what still waits for payment in the PUT handler's …
grumbach Nov 6, 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
558 changes: 556 additions & 2 deletions docs/adr/ADR-0006-receiver-side-revenue-floor.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docs/adr/ADR-0008-storage-economics-and-payment-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ and a node that was actually paid is nominated for a first audit.
| Node re-verification of **non-paid** quotes in the bundle | not done (bad signature on an unpaid quote is accepted) |
| Node rejection of off-curve quotes (`QUOTE_ARITHMETIC_RECHECK_ENABLED`) | **enforced**, on every quote in the bundle |
| Quote/commitment mismatch reported to trust | off (telemetry only) |
| Receiver-side price floor (ADR-0006) | shadow (`ANT_PRICE_FLOOR_ENFORCE`, 65% tolerance), priced against the **close group's median** committed count, not the receiver's own; the own-price basis was withdrawn after canary measurement |
| Receiver-side price floor (ADR-0006) | **enforced** on every node at 30% of a reference price: the **close group's median** committed-count price, capped at the receiver's own; covers client PUT, fresh replication and paid-list admission; no per-node switch (ADR-0006 Amendment 2) |
| Payee eligibility gate (ADR-0005) | **not merged**; observe-only on its branch (`ADR5_ENFORCE`) |
| Client pays the 3× multiplier on the merkle path | **enforced** by the published client, immediately and unconditionally (no flag, no date) |
| Storer requires it (`MERKLE_PARITY_ENFORCED_FROM_UNIX`) | **enforced** by upgraded nodes, for receipts stamped from 2026-08-04 15:00 UTC onward |
Expand Down Expand Up @@ -452,7 +452,9 @@ indistinguishable from a single receipt.
mechanism to reprice.
- **Median-of-K is only as honest as the quote set the client presents.** A
modified client can shop the neighbourhood and settle the cheapest valid
quote; the receiver-side floor is the counterweight and is not yet enforcing.
quote. The receiver-side floor, enforced on every node (ADR-0006 Amendment
2), is the counterweight: it refuses near-empty quotes, but not the
cheapest member of the close group.

### Neutral / Operational

Expand Down
3 changes: 1 addition & 2 deletions src/devnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::ant_protocol::CHUNK_PROTOCOL_ID;
use crate::config::{default_root_dir, NODES_SUBDIR, NODE_IDENTITY_FILENAME};
use crate::logging::{debug, info, warn};
use crate::payment::{
EvmVerifierConfig, PaymentVerifier, PaymentVerifierConfig, PriceFloorConfig, QuoteGenerator,
EvmVerifierConfig, PaymentVerifier, PaymentVerifierConfig, QuoteGenerator,
QuotingMetricsTracker,
};
use crate::replication::config::ReplicationConfig;
Expand Down Expand Up @@ -1159,7 +1159,6 @@ impl Devnet {
cache_capacity: DEVNET_PAYMENT_CACHE_CAPACITY,
close_group_size: replication_config.close_group_size,
local_rewards_address: rewards_address,
price_floor: PriceFloorConfig::default(),
};
let payment_verifier = PaymentVerifier::new(payment_config);
let metrics_tracker = QuotingMetricsTracker::new(DEVNET_INITIAL_RECORDS);
Expand Down
13 changes: 1 addition & 12 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ use crate::event::{create_event_channel, NodeEvent, NodeEventsChannel, NodeEvent
use crate::logging::{debug, error, info, warn};
use crate::payment::metrics::QuotingMetricsTracker;
use crate::payment::wallet::parse_rewards_address;
use crate::payment::{
EvmVerifierConfig, PaymentVerifier, PaymentVerifierConfig, PriceFloorConfig, QuoteGenerator,
};
use crate::payment::{EvmVerifierConfig, PaymentVerifier, PaymentVerifierConfig, QuoteGenerator};
use crate::replication::config::ReplicationConfig;
use crate::replication::fresh::FreshWriteEvent;
use crate::replication::ReplicationEngine;
Expand Down Expand Up @@ -514,16 +512,7 @@ impl NodeBuilder {
cache_capacity: config.payment.cache_capacity,
close_group_size,
local_rewards_address: rewards_address,
// Shadow mode by default; enforcement is a per-node canary opt-in
// via ANT_PRICE_FLOOR_ENFORCE (see PriceFloorConfig).
price_floor: PriceFloorConfig::from_env(),
};
if payment_config.price_floor.enforce {
info!(
"Price floor ENFORCEMENT enabled (tolerance {}%)",
payment_config.price_floor.tolerance_percent
);
}
let payment_verifier = PaymentVerifier::new(payment_config);
let metrics_tracker = QuotingMetricsTracker::new(0);
let mut quote_generator = QuoteGenerator::new(rewards_address, metrics_tracker);
Expand Down
5 changes: 2 additions & 3 deletions src/payment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ pub use ant_protocol::payment::verify::{
};
pub use single_node::SingleNodePayment;
pub use verifier::{
EvmVerifierConfig, PaymentStatus, PaymentVerifier, PaymentVerifierConfig, PriceFloorConfig,
VerificationContext, MAX_PAYMENT_PROOF_SIZE_BYTES, MIN_PAYMENT_PROOF_SIZE_BYTES,
PRICE_FLOOR_ENFORCE_ENV, PRICE_FLOOR_TOLERANCE_ENV,
EvmVerifierConfig, PaymentStatus, PaymentVerifier, PaymentVerifierConfig, VerificationContext,
MAX_PAYMENT_PROOF_SIZE_BYTES, MIN_PAYMENT_PROOF_SIZE_BYTES, PRICE_FLOOR_TOLERANCE_PERCENT,
};
pub use wallet::{is_valid_address, parse_rewards_address, WalletConfig};
Loading
Loading