Bounty
XE-0227 · Bounty

Volume test pre-notice: bounded GET /blocks/recent rebuild-cost and health-sampler measurement on testnet-0005

Closed · answered — web filed 2026-11-02 14:22 UTC by xe:8e7bb03e

Report

Volume test pre-notice: bounded GET /blocks/recent rebuild-cost and health-sampler measurement on testnet-0005

Pre-notification of a bounded, single-source, read-only measurement against the public testnet nodes, per the Rules on /bounty:

Volume testing against the public testnet nodes is authorized; open an issue before a sustained campaign so we can watch it and attribute the results to you.

This is a campaign notice, not a bug report and not a claim of a vulnerability.

What will be measured

GET /blocks/recent rebuilds its snapshot inside the request and applies ?limit only to the finished slice, so the server-side work is independent of the page size. The rebuild walks every account in the lattice (api/handler.go:655 → core/ledger.go:2415) and re-sorts the result slice once per account.

The question this campaign answers is whether that rebuild interferes with the node's own health sampler. node/observability.go:195 shows the sampler calls o.node.GetAllAccounts() — the same per-account chain walk — every SampleInterval (15 s), and /health and /ready fail when the newest sample is older than 3 × SampleInterval = 45 s (node/observability.go:483), with the message "the node's internal loops are wedged or blocked on the ledger".

Already known — not claimed here

  • XE-0220 — the defect report for this endpoint ("[Medium] api: GET /blocks/recent rebuilds the snapshot synchronously (~12s per request) and ?limit= does not reduce the cost"), filed by us on 2026-11-02. This notice covers the volume measurement only; no new defect is claimed.
  • XE-0072 / xe#70 — GET /accounts does full-lattice work regardless of ?limit=, and a single client wedges the node's own health sampler (assessed High). Different endpoint, different code path, no cache and no mutex.
  • XE-0128 / xe#215 — GET /frontiers does full-lattice work regardless of ?limit=, with no result cache. Different endpoint. Its pre-notices are XE-0110, XE-0111 (accounts) and XE-0127 (frontiers).

Measurements already taken (read-only, single source IP, no writes)

Node xe/4f19518 on ldn.core.test.network, network testnet-0005, lattice ≈ 26,500 accounts and growing (26,493 on 2026-11-02).

Every GET route in the node's OpenAPI document (60 paths, 42 GET operations) was enumerated and timed twice. Exactly three routes walk the lattice:

route                          median latency (2026-11-02)
GET /blocks/recent             11.6 - 13.1 s
GET /accounts                  11.2 - 12.7 s
GET /frontiers                 11.9 - 12.5 s
GET /pending?limit=1            1.1 -  2.2 s
every other GET route (39/42)     185 ms   (TLS + RTT baseline)

Page size does not change the cost:

GET /blocks/recent?limit=1     -> 11650 ms
GET /blocks/recent?limit=1000  -> 12221 ms

?limit is applied after the rebuild, so a client asking for one block still pays for the 1,000-block working set.

The endpoint is single-flight: recentMu is held across the rebuild, so extra callers queue behind one rebuild instead of adding one.

3 concurrent GET /blocks/recent -> 12214 / 12194 / 12175 ms, wall 12214 ms   (one rebuild served all three)
3 concurrent GET /accounts      -> 15867 / 16023 / 16014 ms, wall 16023 ms   (no cache, no mutex: each request walks the lattice)

That asymmetry is why this endpoint needs its own measurement: /accounts multiplies the lattice walks with concurrency, /blocks/recent serialises them. Whether the remaining load is enough to push the sampler toward its 45 s budget is exactly what is not yet known.

The sampler's own baseline, measured live. GET https://ldn.core.test.network/health polled once a second for 56 s, reported age:

14 -> 15 -> 17 -> 18 ->  4 ->  5 ->  7 ->  8 ->  9 -> 10 -> 12 -> 13 -> 14 -> 15 -> 17 ->  3 ->  4 ->  6 -> ...

The age cycles between ~3 s and ~18 s on a ~15 s period. The age is stamped when the sample starts (node/observability.go:176), so this places the sampler's own full-lattice walk at roughly 3 s, against a 45 s budget. /health and /ready returned 200 throughout, with sampler_alive, sample_present and sample_fresh all passing.

What the sustained campaign will add

  1. Sampler impact — sustained GET /blocks/recent?limit=1 at concurrency 1, 4 and 12 for up to 5 minutes per arm on ldn, sampling /health and /ready every 2 s, to determine whether the sampler's sample age is driven toward or past its 45 s budget and whether the node's own health endpoints start returning 503.
  2. Cross-endpoint interaction — whether /blocks/recent load raises latency for a separate client session on /supply and /accounts/{address}/balance (both ≈185 ms when idle).
  3. Recovery — how long the sample age stays elevated after traffic stops, and how long /health stays non-OK.
  4. Rebuild-rate amplification — whether an additional client measurably increases the snapshot rebuild cadence above the baseline the public explorer's own 5-second polling already causes.

Bounds

  • ≤ 12 concurrent connections, ≤ 5 minutes per arm, ≤ 3 arms per node, single source IP.
  • Read-only GET only. No POST, no writes, no malformed input.
  • /health and /ready sampled every 2 s (the probe budget is 20 rps / 100 burst — respected).
  • No traffic to the hosting layer (nginx / DNS / website / faucet) — out of scope per the bounty page.
  • Well under the documented read budget (200 rps / 1000 burst per IP).

Attribution

Wallet 64e3ca3f6e9378cd549032de9f087b5496fd4100516c7bdb46c17b00d4220cd4 (testnet-0005, self-funded from faucet.test.network). GitHub: targammm. Desk reporter account: sumun24@gmail.com. Same reporter as XE-0220, XE-0128 and XE-0127.

Results will be posted as a comment on this notice whether or not anything is found, including the raw measurements and the measurement script, so the team can reproduce them.

Thread

xe:8e7bb03e2026-11-02 14:41 UTCweb

Campaign results — bounded GET /blocks/recent volume measurement (notice XE-0227)

As promised in the notice, here are the results — including the question that did not reproduce.

Method. Node xe/4f19518 on ldn.core.test.network, network testnet-0005, 2026-11-02 14:23–14:37 UTC. Read-only GET only, single source IP, no writes, no malformed input. Three arms plus one A/B control, inside the bounds declared in the notice (≤ 12 concurrent, ≤ 5 min per arm, ≤ 3 arms per node). The monitor sampled /health, /ready and /supply every 2 s (probe budget 20 rps / burst 100 — respected). Script attached to this notice: campaign.mjs; analysis in analyze.mjs; the A/B in control-arm.mjs.

arm duration requests p50 p95 max /health non-200 /ready non-200 max sample age
c1 60 s 20 196 ms 13,202 ms 13,202 ms 0 / 16 0 / 16 14 s
c4 120 s 158 195 ms 12,533 ms 12,945 ms 0 / 25 0 / 25 15 s
c12 180 s 729 195 ms 12,126 ms 12,635 ms 0 / 38 0 / 38 16 s

1. The health-sampler question — it did not reproduce

/health and /ready returned 200 on all 79 samples across the three arms. The reported sample age peaked at 14 / 15 / 16 s against the 45 s budget — the same 3–18 s band we measured idle before the campaign. No 503, and never the "the node's internal loops are wedged or blocked on the ledger" message.

The reason is in the code already quoted in the notice: recentMu is held across the rebuild, so the endpoint is single-flight. Concurrency scales client-visible latency, not server-side work — c1 / c4 / c12 issued 20 / 158 / 729 requests and the p95 stayed at 12.1–13.2 s in all three arms, because the extra clients queue behind the same rebuild instead of starting their own.

So the High-tier argument from #70 / XE-0072 does not transfer to this endpoint. We are not claiming "a single client wedges the node's own health sampler" for /blocks/recent: on this endpoint it does not wedge it.

2. What did reproduce — the client-visible stall, and contention on the other lattice walk

  • Client-visible stall (bimodal). p50 ≈ 195 ms (cache hit) against p95 ≈ 12.5 s (rebuild). A client that misses the 1-second TTL waits out the whole lattice walk, and because the rebuild happens inside the request, every caller queues behind it. The documented contract — "served from a snapshot rebuilt at most once per second" — does not describe what a client actually experiences.
  • Contention on the other lattice walk. core/supply.go SupplyAuditor.walk() re-walks every account chain when its cache expires, so /supply is a second lattice-walking endpoint, not a free control. A/B phase — no traffic from us, then traffic from us, then recovery:
idle      balance p50=186ms | health p50=184ms | supply p50=1690ms max=4568ms
loaded    balance p50=188ms | health p50=185ms | supply p50=5030ms max=8345ms
recovery  balance p50=185ms | health p50=184ms | supply p50=1580ms max=5762ms

/accounts/{address}/balance — a genuinely O(1) endpoint — was unaffected (185 → 188 → 185 ms), and /health was unaffected (184 → 185 → 184 ms). /supply went 1,690 ms → 5,030 ms p50. That is contention between two concurrent lattice walks, not a broad node slowdown.

Caveat, stated plainly: our "idle" phase means no traffic from us, not no traffic at all — the public explorer polls this endpoint every 5 s on its own (as noted in XE-0220).

3. Conclusion

This supports the Medium tier already claimed in XE-0220 ("measurable slowdown under volume") and does not support High: the node's own health signal stayed green, the cheap endpoints stayed at 185 ms, and the observable damage is (a) the ~12 s client-visible stall and (b) a roughly 3× slowdown of the other lattice-walking endpoint while a rebuild is in flight.

We are not filing a separate ticket for this. The defect is XE-0220; this notice is the pre-notification and the measurement record for it.

Raw arm logs (arm-c1.txt, arm-c4.txt, arm-c12.txt, control-ab.txt) and the analysis scripts are available on request.

— reporter sumun24, wallet 64e3ca3f…0cd4, GitHub targammm

XE deskteam2026-11-14 22:49 UTCdesk

Thanks for the report. We have read it and answered what it raises.

This report is closed as answered. If there is more to it, file a new report that links https://bounty.xe.network/XE-0227; it is read like any other.