Conversation
V2-834 Part D. Part D of the traffic-accounting ground truth. Three new process-global counter tables, same relaxed-atomic style as the V2-623 replication table, emitted on the existing 300s summary loop. - storage::traffic — the largest attribution gap by volume: chunk RPC bytes were indistinguishable from DHT messaging in `wire_tx_bytes`. Inbound bytes are counted at `ChunkMessage::decode` by request kind (get / put / quote variants / other / decode_error); outbound bytes at send-success in `answer_one_request`, keyed by kind × outcome (get: success/not_found/error; put: success/already_exists/payment_required/ error) via a `traffic_key` carried on `HandledChunkRequest`; failed sends itemised separately. `chunk rpc traffic summary (cumulative)` in two `group`s, target `ant_node::storage::traffic`. - upgrade::traffic — archive / binary / signature / manifest response body sizes across all three reqwest clients; the releases poll now reads `bytes()` then `serde_json::from_slice` so the body length is observable. `upgrade traffic summary (cumulative)`. - payment::traffic — EVM RPC call counts and outcomes at the two on-chain read sites. Bodies are serialised inside alloy behind a fresh per-call evmlib provider, so bytes are not observable from ant-node; EVM RPC is HTTPS/TCP and outside the UDP reconciliation invariant. `evm rpc summary (cumulative)`. Test evidence: `cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used` clean, `cargo clippy --all-targets -- -D warnings` clean apart from the pre-existing `file_store.rs:2005` lint on main, `cargo fmt --check` clean, new `storage::traffic` unit tests pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jacderida
force-pushed
the
chrisoneil/v2-834-traffic-accounting-final-ground-truth-instrumentation
branch
from
September 16, 2026 21:49
77c6a6e to
601740f
Compare
dirvine
approved these changes
Sep 16, 2026
dirvine
left a comment
Member
There was a problem hiding this comment.
Approving. Genuinely observability-only: chunk-RPC attribution (rx at decode by kind, tx at send-success by kind×outcome, failed sends itemised), upgrade download body sizes, and EVM RPC call counts. The response.json() → response.bytes() + from_slice refactor is behaviour-equivalent with size checks preserved. Non-blocking note: this sits on the chunk-serving hot path (2 relaxed atomic adds per inbound + 2 per outbound on shared global arrays) — consistent with the existing replication table and dwarfed by chunk decode + ML-DSA verify, but worth revisiting with sharded/thread-local counters if it ever shows up at peak. Note: Security Audit CI failure is pre-existing baseline, not introduced here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
V2-834 Part D.
Part D of the traffic-accounting ground truth. Three new process-global
counter tables, same relaxed-atomic style as the V2-623 replication
table, emitted on the existing 300s summary loop.
bytes were indistinguishable from DHT messaging in
wire_tx_bytes.Inbound bytes are counted at
ChunkMessage::decodeby request kind(get / put / quote variants / other / decode_error); outbound bytes at
send-success in
answer_one_request, keyed by kind × outcome (get:success/not_found/error; put: success/already_exists/payment_required/
error) via a
traffic_keycarried onHandledChunkRequest; failedsends itemised separately.
chunk rpc traffic summary (cumulative)in two
groups, targetant_node::storage::traffic.body sizes across all three reqwest clients; the releases poll now
reads
bytes()thenserde_json::from_sliceso the body length isobservable.
upgrade traffic summary (cumulative).on-chain read sites. Bodies are serialised inside alloy behind a
fresh per-call evmlib provider, so bytes are not observable from
ant-node; EVM RPC is HTTPS/TCP and outside the UDP reconciliation
invariant.
evm rpc summary (cumulative).Linear issue
Closes V2-834
Risk tier
Counters and INFO lines on the existing replication summary loop. The releases poll now reads the body with
bytes()thenserde_json::from_sliceinstead of.json()— same parse, body length made observable.Compatibility
pub(crate);HandledChunkRequestgains apub(crate)field)Semver impact
Test evidence
cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used(CLAUDE.md): cleancargo clippy --all-targets -- -D warnings: clean apart from the pre-existingfile_store.rs:2005redundant_pub_cratelint onmaincargo fmt --check: cleanstorage::trafficunit tests (2) passNew dependency
none
ADR
n/a
Mitigation / rollback
Revert the PR. Purely additive counters and INFO summary lines at the existing 300s cadence; no config, no wire, no storage change — nothing to migrate.
🤖 Generated with Claude Code