Repository navigation
Description
Observed on CI run 29881984765 (PR #1366). Re-running the same job passed with no code change; the test also passes 3/3 locally. Unrelated to that PR's diff — filing so it is tracked rather than silently re-run away.
Failure:
crates/e2e/tests/smoke.rs:138
left: 2105280
right: 2097152
right is the 2 MiB payload (2 * MIB). left is 2105280 = 2097152 + 8128, and 8128 is exactly the bao proof overhead for that payload: 2 MiB / 16 KiB = 128 chunk groups → 127 parent nodes × 64 B. So the on-chain accumulator held the wire byte count (content + interleaved proof) while the assertion expects the content byte count.
The assertion:
let expected_served = U256::from(payload.len());
let served = poll(Duration::from_secs(90), || async {
let b = chain.served_bytes(node.operator_addr()).await?;
Ok(if b >= expected_served { Some(b) } else { None })
}).await?...;
assert_eq!(served, expected_served);The poll returns the first reading at or above the payload size, then demands exact equality. If the redeemed cumulative is the wire total, the equality can never hold — so whether this passes depends on which cumulative the poll happens to observe.
Note ChainFixture::served_bytes (crates/e2e/src/chain.rs:559) reads FeeRouter.bytesPerEpoch(operator, epoch) with the epoch derived from the latest block timestamp at read time, which adds a second timing dependency (redemptions landing either side of an epoch boundary).
There is already a commit specifically about this poll — "test(e2e): wait for full served-bytes total in smoke redeem poll" in 0c92aed — so this is at least the second time it has bitten.
Worth settling: which quantity is FeeRouter supposed to accumulate under ADR 036 — delivered content bytes, or metered wire bytes? ADR 038 §Payment metering has clients paying for wire bytes, which would make bytesPerEpoch a wire-byte counter and the assertion's expected_served simply the wrong constant (it should be aligned_wire_len, which crates/client-pull/src/lib.rs:1205 already computes). If content bytes are intended, then something on the redeem path is over-reporting by exactly the proof overhead, which is the more interesting bug.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix(e2e): bound smoke served-bytes to [content, wire] (#1381)