{"id":"XE-13253","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"383","source_url":"https://github.com/xeprotocol/xe/issues/383","reporter_id":2479,"title":"Volume test pre-notice: bounded sync-stream resource measurement on testnet-0005","area":"ops-testnet","claimed_tier":null,"assessed_tier":null,"verdict":"notice","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"answered","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:03.883096+00:00","updated_at":"2026-11-20T00:25:42.532213+00:00","source_created_at":"2026-11-11T12:43:36+00:00","told_at":"2026-11-20T00:24:37+00:00","status_changed_at":"2026-11-20T00:08:43.543278+00:00","url":"https://bounty.xe.network/XE-13253","body":"This is a campaign notice, not a bug report. I am pre-notifying a bounded volume measurement against the public testnet, as required, so the team can watch and attribute the traffic. If the measurements show nothing, I will close this issue with the numbers attached. If they show reproducible degradation, I will file a separate finding with the measurements as evidence.\n\nAttribution: blacktokyo (X @blacktokyo).\n\nAlready known — NOT what this campaign claims:\n\n•XE-1624 (filed by another researcher): the sync client resets its 10 MiB response cap per page (requestSync, net/sync.go). This campaign does NOT measure, exercise, or claim anything about the client-side cap. It measures only server-side resource use under concurrent sync streams (bytes/time per request, node health, finality).\n•Issue #70: GET /accounts does full-lattice work regardless of ?limit=. Not touched by this campaign (no /accounts traffic beyond a handful of baseline reads).\n•PR #343 / issue #297: chat PoW difficulty floor. Not touched — no chat traffic in this campaign.\n•Issue #59: net/sync no in-flight guard on sync rounds (client-side first-sync memory/CPU — ordinary first sync reaches 1.9 GB RSS, OOM on a 2 GB node). Not touched — this campaign measures server-side resource use under concurrent sync streams, not client-side sync ingestion.\n•The maxServerBlocks = 10,000 cap itself is a known constant. The campaign measures what happens when concurrent streams approach it together, not the cap's existence.\n\nWhat the campaign measures:\n\n•Per-request server cost of a sync stream: blocks returned, bytes, time-to-first-byte, total time — for the request shape below.\n•The concurrency ceiling: how health (/health latency), readiness (/ready), and finality advancement (finality_advances, block_count from /node) respond as concurrent sync streams step from 1 → 2 → 4 → 8.\n•Whether any degradation is reproducible and clears after the run (cool-down check).\n\nBaseline already measured (light probes, no degradation): a single sync request with a 5-frontier map returned 10,000 blocks / ~5.75 MB in 1.7–3.8 s (TTFB 0.66–0.79 s across 3 runs); /health after a stream 0.135–0.141 s; /ready true throughout. The server sends full chains for accounts the requester does not list, up to maxServerBlocks, so a fresh/partial peer's request is near the cap by construction.\n\nHard bounds (this campaign will not exceed any of these):\n\n•  Source: Single client, single IP, one libp2p peer identity per run (fresh ephemeral key; identity recorded in the run log)\n\n•  Target: https://ldn.core.test.network node 12D3KooWJg4PQYGSfNCupBWZdEWbKj7pgdp5MmmUXbPdBcp6YDtT (testnet-0005, xe/3019b76), direct libp2p /ip4/45.77.226.208/tcp/9000\n\n•  Endpoints: /xe/sync/1.0.0 streams; plus read-only GET /health, /ready, /node, /supply (1 Hz sampling during runs)\n\n•  Request shape: Fixed: 5 known frontiers (learned live from GET /frontiers), pageSize 64 — the same shape as the baseline\n\n•  Concurrency: ≤ 8 concurrent sync streams (the per-IP libp2p connection limit); steps 1 → 2 → 4 → 8, separate runs\n\n•  Stream rate: ≤ 1 stream per 5 s per peer identity (respecting the server's own sync cooldown)\n\n•  Duration: ≤ 10 min per run; 2-min cool-down + baseline re-check between runs\n\n•  Total volume: ≤ 120 streams per run (≤ 1.2 M blocks, ≤ ~700 MB egress per run, worst case)\n\n•  Writes: None — sync requests only; no blocks submitted, no state changed, no faucet, no funds\n\n•  Out of scope (never touched): Hosting layer (nginx/DNS/website/faucet), /accounts, chat/SSE, any other node\n\nAbort criteria (any one stops the run immediately): /ready returns false; /health p95 > 5 s sustained 60 s; finality_advances stalls > 60 s; sync-stream failure rate > 10%.\n\nWhat counts as a finding vs noise: a finding is reproducible, monotonic degradation with concurrency (health-latency growth, readiness flip, finality stall, TTFB growth) that clears on cool-down. Noise is single-sample latency spikes, first-sample cold effects (~1 s), transient dial timeouts (1 of 3 baseline dials timed out at 15 s; retries succeeded), and sync-total variance (1.7–3.8 s across identical requests).\n\nPlanned second campaign (separate notice, not covered here): chat/SSE connection holding — streams are capped at ~60 s by the node's own WriteTimeout, so that campaign measures concurrent streams under continuous re-open. It will be pre-notified separately before it runs.\n\nIf nothing is found: I will close this issue with the full measurements attached.","patch_refs":[],"thread":[{"id":3124,"source":"github","source_ref":"6798648398","author":"blacktokyo96","team":false,"body":"Campaign complete closing with the measurements, as promised in the notice. No finding filed.\n\nVerdict: clean negative. No reproducible, monotonic degradation with concurrency. Health, readiness and finality were never degraded by the load.\n\nWhat ran (all within the notice bounds — single client/IP, one fresh ephemeral peer identity per run, 5 frontiers + pageSize 64 = 10,000 blocks / ~5.75 MB per stream, ≤1 stream/5 s per peer, ≤10 min/run, no writes):\n\n- C=1: 42/42 streams ok. TTFB p50/p95 844/1,612 ms, total 5,959/6,946 ms, health p50 136 ms, finality 252,614→252,748. Aborted — finality stalled >60 s at 252,748 (run cut to 256 s).\n- C=2: 52/52 ok. TTFB 697/4,550 ms, total 3,465/9,017 ms, health p50 203 ms, finality 253,358→253,549. No abort.\n- C=4: 56/56 ok. TTFB 700/1,321 ms, total 3,738/4,451 ms, health p50 156 ms, finality 253,782→253,817. No abort.\n- C=8 (partial): 35/36 ok — the 1 failure is a VM-restart artifact, not a server failure. Medians ~4,700 ms TTFB / ~10,000 ms total. Runner killed mid-run by a VM restart.\n- C=8 (re-run): 56/56 ok. TTFB 783/1,656 ms, total 4,126/8,099 ms, health p50 164 ms, finality 253,884→253,920. No abort.\n\nTotal: 247 streams ok, ~2.47M blocks, ~1.42 GB served. /ready true in every sample of every run. Health p50 flat within every run-vs-cool-down pair.\n\nThe two anomalies, and why neither is a finding:\n\n1. C=1 finality stall (~70 s at 252,748) — genuine, cleared on cool-down, but never reproduced at C=2, C=4, or C=8. Later windows showed the testnet's finality rate is bursty on its own (C=4: ~0.11/s with a 59 s near-stall gap persisting through cool-down). Most parsimonious reading: a natural quiet period that coincided with the C=1 run. One unreproduced event is not a reproducible finding.\n2. C=2 slowdown (2 s → 10 s within the run) and the C=8-partial elevation (~10 s) — both fail monotonicity (C=4 was completely flat at baseline for the full 5 min) and reproducibility (the C=8 re-run came back at baseline medians). The partial run's wave-1 stream 0 started alone yet took 16 s, then later streams in the same wave ran at baseline — this tracks background sync load from the node's other peers, not my concurrency.\n\nThe only reproducible concurrency effect is mild and bounded: at 2 concurrent streams, per-stream transfer time rises ~1.7× while TTFB, health, readiness and finality are unaffected. The server's own 5 s per-peer sync cooldown already caps one peer at ~2 concurrent streams. That is a capacity observation, not a vulnerability — no finding filed.\n\nClosing this issue with the numbers above, as promised. Thanks for the testnet.","created_at":"2026-11-11T14:34:45+00:00"},{"id":13024,"source":"github","source_ref":"7026258173","author":"XE desk","team":true,"body":"Thanks for the report. We have read it and answered what it raises.\n\nThis report is closed as answered. If there is more to it, file a new report that links\nhttps://bounty.xe.network/XE-13253; it is read like any other.","created_at":"2026-11-20T00:24:37+00:00"}]}