<!-- XE-12804 · [Track 2] Pre-campaign notice: bounded cost measurement — /statechain/kv, /supply (past-TTL), /leases, /providers, /pending re-check, ≤4 concurrent, ≤2 req/s, testnet-0005 · testnet -->
*Markdown view of <https://bounty.xe.network/XE-12804>. The page is the record; this is the same page for reading.*

XE-12804 · Bounty

# \[Track 2\] Pre-campaign notice: bounded cost measurement — /statechain/kv, /supply (past-TTL), /leases, /providers, /pending re-check, ≤4 concurrent, ≤2 req/s, testnet-0005

Closed · answered
—claimed Minor
web
filed 2026-11-14 12:17 UTC
by xe:da7cd7f4

Verdict
:   Notice

Tier
:   —

Claimed
:   Minor

Area
:   Ops / testnet

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 20:01 UTC

Told
:   2026-11-20 20:01 UTC

### Patches

None linked.

### History

- [627712](https://bounty.xe.network/log/627712) 2026-11-20 20:01 UTC reply.sent
- [622839](https://bounty.xe.network/log/622839) 2026-11-20 19:45 UTC proposal.adopted
- [622578](https://bounty.xe.network/log/622578) 2026-11-20 19:45 UTC proposal.adopted
- [622577](https://bounty.xe.network/log/622577) 2026-11-20 19:45 UTC ticket.status new → closed
- [622117](https://bounty.xe.network/log/622117) 2026-11-20 19:44 UTC proposal.adopted
- [622112](https://bounty.xe.network/log/622112) 2026-11-20 19:44 UTC proposal.adopted
- [622111](https://bounty.xe.network/log/622111) 2026-11-20 19:44 UTC ticket.facts
- [611617](https://bounty.xe.network/log/611617) 2026-11-20 15:24 UTC note.added
- [611616](https://bounty.xe.network/log/611616) 2026-11-20 15:24 UTC proposal.created
- [611615](https://bounty.xe.network/log/611615) 2026-11-20 15:24 UTC proposal.created
- [611614](https://bounty.xe.network/log/611614) 2026-11-20 15:24 UTC proposal.created
- [611613](https://bounty.xe.network/log/611613) 2026-11-20 15:24 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-12804) · [JSON](https://bounty.xe.network/v1/tickets/XE-12804) · [markdown](https://bounty.xe.network/XE-12804.md)

### Report

## What this is

Pre-notification of a bounded, single-source, read-only measurement against the public testnet node, per the Rules on https://www.test.network/bounty:

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

This is a campaign notice, not a vulnerability finding and not a reward claim. **No load traffic has been sent for this campaign.** The baseline below was measured before filing as ordinary sequential reads (24 requests, all HTTP 200, 2026-11-14 \~19:16 WIB); the numbers are in §Baseline.

The bounded phase below will only run after this notice is filed, inside the bounds below, and its results will be posted as a follow-up in this same thread.

## Already known and already reported — I am not claiming these

**The two previous campaigns on `/pending` \+ `/supply` (same endpoints, different regimes):**

- **XE-6351** (2026-11-11, 506 requests, 388.8 s, ≤4 concurrent, ≤2 req/s, all HTTP 200, no stop condition triggered): `/pending` has a fixed-cost shape (`?limit=1` ≈ default page) but the cost is small and there is **NO amplification from concurrency 2 → 4**; the `/supply` "one request triggers a full census" hypothesis is **REFUTED as a per-request mechanism** — 168/236 rows had total latency SMALLER than the server's own `duration_ms`, and the census timestamp changed during 6 s idle with zero requests, so the census runs in the background and a client cannot enlarge it at that rate. I am not re-claiming any of that.
- **XE-6608** (2026-11-11, 142 requests, ≤8 concurrent, ≤4 req/s): run **ABORTED by stop condition** — `finality_stall_seconds` hit 72.6 s (\> 60 s bound) during the concurrency-4 phase at 4 req/s; the concurrency-8 phase never ran. `/pending` at 4 req/s was \~1.5–2× slower than XE-6351's 2 req/s regime; `/supply` censuses were 1.7–20.4 s in concurrency 4, but the census was already slow pre-load, so attribution was mixed.
- **XE-6608 A/B control (2026-11-12, message 2488): the control could not run, and it settled the attribution toward background.** A 10-minute **no-load** observation (20× `/ready` polls, zero load) showed **8 of 20 polls (40%) returning 503**, stall ranging 4.1–63.5 s — one poll read **63.5 s, above the 60 s stop bound, with zero load** — and `/health` 503 with the node's own sampler stalling 48–75 s at a time. The reporter concluded the Medium candidacy as a load finding is **not supported**, and that concurrency 8 is **currently untestable in a controlled way: any run would abort on the stop rule and prove nothing. It only makes sense once `/ready` is stable (200) through a ≥10-minute no-load observation first.** I am not re-claiming any of that either — and this campaign is designed around it (see the Phase 0 gate in §Bounded plan).

**The static tickets behind the endpoints this campaign measures (filed as code issues; the live cost curve under load is what is unmeasured):**

- **XE-10586** (Minor): `GET /supply` forces a fresh full-lattice census on every request past the 2 s report-cache TTL; `Report()` holds `SupplyAuditor.mu` for the whole walk, so concurrent callers queue behind the refresh instead of being served stale. Live single-client proof: 8 sequential GETs 3 s apart, total latency 2.5–8.8 s, server `duration_ms` 511–7,172 ms. I am not claiming the single-request cost — I am measuring what happens when past-TTL spacing meets small concurrency (the mutex-queueing question its local PoC only hinted at: a concurrent `Report()` waited 82–160 ms behind the mutex).
- **XE-8182** (Medium): `PendingSend` entries are never expired or reclaimed; every `/supply` and `/pending` call materialises the whole set before paginating. Live at filing: pending 342,339, accounts 33,366, blocks 882,704; `GET /supply` `duration_ms` 2,058; `GET /pending?limit=1` → 295 bytes, 0.569 s. I am not claiming the set-growth defect — I am re-measuring the `/pending` cost shape at the current (larger) set size.
- **XE-7732** (Medium): unbounded epoch scan — `/statechain/kv`'s default page is 100% epoch history (100 keys, 0 `sys.*`; `?limit=1000` → 1,000 keys, 343,748 bytes; first `sys.*` key at offset 6000\) and `lease_accept`/`lease_renew` re-copy and re-unmarshal every epoch with no cache (measured 28.5 ms/op at 6,228 epochs, 239 ms at 52,000, 2,816 ms at 520,000 — linear in chain age, \~600 s per epoch). I am not claiming the scan — I am measuring the live cost curve of `GET /statechain/kv` for the first time.
- **XE-10572** (Medium): `GET /leases` and `GET /providers` trigger a full lease-table Badger scan \+ unmarshal on every request; pagination slices only after the full pull; no caching anywhere on this path. I am not claiming the scan — I am measuring the live cost curve (`?limit=1` vs default vs `?limit=1000`, concurrency 2 and 4\) for the first time.

**Other known items, also not claimed:**

- `#70` / `#166`: `GET /accounts` does full-lattice work regardless of `?limit=`; the amplification campaign for `/accounts` is already done.
- **XE-5964** (High): `GET /accounts/{address}/balance` re-reads the whole account chain per request.
- **XE-0220** (Medium, triaging): `GET /blocks/recent` rebuilds its snapshot synchronously (\~12 s), `?limit=` does not reduce the cost.
- **XE-4779** (High) / **XE-5217** (Medium): the XUSD supply discrepancy (212,890,638 unaccounted) and the auditor reporting `conserved=false`. I will not claim the discrepancy itself.
- **XE-8285** (Medium): `GET /accounts/{address}/chain` loads the entire account chain before paging.
- **XE-5753** (Medium): `GET /pending/{address}` has no pagination and performs one block lookup per returned entry.
- **XE-8993** (Medium): unauthenticated HTTP endpoints force the node into an unbounded DHT lookup for an attacker-chosen phantom peer.
- **XE-3302** (Minor): the SSE holding-cost pre-notice (`GET /chat/events`). Different endpoints, no overlap.
- **XE-3345** (Medium): sustained single-chain send volume (\~1.1 tx/s). This campaign sends no transactions at all.
- **XE-3760**: marketplace gossip \+ directory notice; last noted window 2026-11-12 10:00 WIB. Different endpoints, no overlap.

## What this campaign actually measures

None of the above answers these four questions — each is a live cost curve no campaign has measured:

1. **`GET /statechain/kv` (XE-7732) — the live cost curve of the default page.** Single-request latency for the default page (100 keys), `?limit=1000` (1,000 keys), `?prefix=sys.` (the config the endpoint exists to serve), and `?limit=100&offset=6000` (where the first `sys.*` key sits); latency at concurrency 2 and 4; and whether the cost has grown with the epoch count since XE-7732's filing (6,228 epochs). The question is whether an unauthenticated client can make the node pay a growing, unbounded scan on a read endpoint.
2. **`GET /supply` in the past-TTL regime (XE-10586) — the mutex-queueing question.** XE-6351/XE-6608 ran at \~0.77–0.25 s spacing, inside the 2 s report-cache TTL, so most of their requests hit the cache. This campaign spaces requests **3 s apart (past the TTL)** at concurrency 1, 2 and 4: does every request force a fresh census, do concurrent callers queue behind `SupplyAuditor.mu` instead of being served stale, and does the endpoint pin at sustained multi-second latency for all callers — and does `/ready` move?
3. **`GET /leases` \+ `GET /providers` (XE-10572) — the uncached full-scan cost shape.** Single-request latency for `?limit=1` vs default vs `?limit=1000` (does `?limit=1` cost the same as the default page, i.e. does the work happen before pagination?); latency at concurrency 2 and 4; and whether the cost grows with the lease-table size. No caching exists anywhere on this path, so this is the purest test of the "full work before pagination" pattern.
4. **`GET /pending` re-check at the current set size (XE-8182) — has the fixed cost grown?** XE-6351 measured the fixed-cost shape on 2026-11-11 at \~334,000 pending sends and found no amplification at ≤4 concurrent. The set has grown since (342,339 at XE-8182's filing). Single-request `?limit=1` vs default vs `?limit=1000` plus concurrency 2 and 4, to test whether the fixed cost grew with the set. This is a fresh data point at a new set size, not a re-claim of XE-6351's result.

For each endpoint I measure: single-request latency (the `?limit=` variants above), latency at concurrency 2 and 4, and whether the load reaches the consensus path — polled via `/ready` (`finality_stall_seconds`, `ready` flag). The program's own tiers distinguish "measurable slowdown" (Medium) from "finality stalled network-wide" (Severe), so the question is whether read load crosses that line. **And, per XE-6608's conclusion, the first thing this campaign measures is whether the node is stable enough for any of that to mean anything (Phase 0 below).**

## Baseline — measured before filing (ordinary sequential reads, 2026-11-14 \~19:16 WIB)

Target `https://ldn.core.test.network`, network `testnet-0005`. 21 sequential read-only requests (the XE-6351 method — ordinary reads, not load), one at a time, recording latency, response size, and server-reported `duration_ms` where the response carries it:

| Endpoint | Requests |
| --- | --- |
| `GET /health` (network floor) | 3× |
| `GET /ready` | 3× |
| `GET /directory` | 3× |
| `GET /pending` (default, `?limit=1`, `?limit=1000`) | 1× each |
| `GET /supply` | 3× |
| `GET /statechain/kv` (default, `?limit=1000`, `?prefix=sys.`) | 1× each |
| `GET /leases` (`?limit=1`, default, `?limit=1000`) | 1× each |
| `GET /providers` | 3× |

Measured 2026-11-14 \~19:16 WIB against `https://ldn.core.test.network` (24 sequential requests, ≥1 s apart, 0 errors, all HTTP 200; latency min 480 ms / p50 716 ms / max 1,921 ms). Node `12D3KooWJg4PQYGSfNCupBWZdEWbKj7pgdp5MmmUXbPdBcp6YDtT` — same node as XE-6351/XE-6608.

| Endpoint | Latency | Size | Note |
| --- | --- | --- | --- |
| `GET /health` ×3 | 1,921 / 603 / 480 ms | 790 B |  |
| `GET /ready` ×3 | 1,057 / 769 / 749 ms | \~1,460 B | ready\=true; finality\_stall\_seconds 15.76 / 6.21 / 8.06 (background stall, node ready) |
| `GET /directory` ×3 | 1,888 / 570 / 556 ms | 39,802 B |  |
| `GET /pending` (default) | 899 ms | 29,533 B |  |
| `GET /pending?limit=1` | 613 ms | 295 B |  |
| `GET /pending?limit=1000` | 926 ms | 295,250 B |  |
| `GET /supply` ×3 | 607 / 1,353 / 515 ms | 23,493 B | server duration\_ms 701 / 830 / 830; pending 368,147, accounts 38,629, blocks 952,861 |
| `GET /statechain/kv` (default) | 597 ms | 31,156 B |  |
| `GET /statechain/kv?limit=1000` | 716 ms | 312,758 B |  |
| `GET /statechain/kv?prefix=sys.` | 947 ms | 1,089 B |  |
| `GET /leases?limit=1` | 785 ms | 615 B |  |
| `GET /leases` (default) | 707 ms | 75,459 B |  |
| `GET /leases?limit=1000` | 764 ms | 84,872 B |  |
| `GET /providers` ×3 | 698 / 634 / 672 ms | 530 B |  |

State vs the figures cited in the tickets above: pending grew 342,339 → 368,147; accounts 33,366 → 38,629; blocks 882,704 → 952,861 since XE-8182's filing. `/supply` server duration\_ms is 701–830 ms now vs 2,058 ms then (these baseline requests were \~1.1 s apart, inside the 2 s cache TTL).

## Severity note

This notice itself claims no severity. If the live measurement shows a reproducible slowdown, the ceiling is Medium at best; Severe (finality stall) is not expected, because unauthenticated read load does not touch block production — but that is exactly what the `/ready` polling is there to check. **If Phase 0 fails (the node is unstable with zero load), the result is a node-stability observation, not a load finding, and no load phase will run.**

## Relation to existing notices

This does not overlap XE-3302 (SSE holding-cost, different endpoints), XE-3345 (single-chain sends; this campaign sends nothing), or XE-3760 (marketplace gossip \+ directory, different endpoints). It **extends** XE-6351/XE-6608 into endpoints and a regime those campaigns did not cover (`/statechain/kv`, `/leases`, `/providers`, and the past-TTL `/supply` regime), and it implements XE-6608's own conclusion as a Phase 0 stability gate before any load is sent. It will run only after checking the desk board/log for any other active campaign window, so measurements are not contaminated by someone else's load.

## Bounded plan (hard caps, will not be exceeded)

| Parameter | Bound |
| --- | --- |
| Source | single client, single IP |
| Endpoints | `GET /statechain/kv`, `GET /supply`, `GET /leases`, `GET /providers`, `GET /pending`, `GET /directory`, `GET /health`, `GET /ready` only |
| Concurrency | ≤ 4 in flight |
| Request rate | ≤ 2 requests/second sustained (global gate, ≥ 0.5 s between request starts; the past-TTL `/supply` leg spaces requests 3 s apart) |
| Duration | ≤ 10 minutes per run |
| Total requests | ≤ 1200 per run |
| Writes | none — read-only, no block submission, no state change |

### Target

`https://ldn.core.test.network` — network `testnet-0005`. Node ID confirmed from `/health` at baseline time: `12D3KooWJg4PQYGSfNCupBWZdEWbKj7pgdp5MmmUXbPdBcp6YDtT` (same node as XE-6351/XE-6608).

### Phase 0 gate (no-load stability observation — runs FIRST, before any load)

Poll `/ready` \+ `/health` every 30 s for ≥ 10 minutes with **zero load**. Pass \= `/ready` returns 200 throughout and no 5xx anywhere. Fail \= any 5xx, or `finality_stall_seconds` exceeding 60 s with zero load. **If Phase 0 fails, the load phase does not run** — the no-load data is posted as the result (a node-stability observation, not a load finding), exactly as XE-6608's message 2488 concluded.

### Stop conditions

I abort immediately if any response is 5xx, if `/ready` flips to not-ready, if `finality_stall_seconds` exceeds 60 s, or if the team asks me to stop.

## Attribution

- Reporter identity (XE address, desk-key identity): `da7cd7f46e9920cbef83f9ff94028b1f46216e02ba9f6003474d0d55bf7f4a19`
- Payout address if awarded: `da7cd7f46e9920cbef83f9ff94028b1f46216e02ba9f6003474d0d55bf7f4a19`
- Email for replies: none provided — replies via this thread
- Results will be posted as a follow-up in this thread with exact request counts, latency percentiles, and the node's own `/supply` state before and after each run.

## If I find nothing

I will close this ticket with the measurements attached. A negative result with reproducible numbers is more useful than leaving the cost curve unmeasured.

### Thread

**xe:da7cd7f4**2026-11-14 12:31 UTCweb

## Phase 0 gate: PASS

10-minute no-load observation (2026-11-14 12:18:53–12:28:54Z, 21 rounds × 30 s, GET /ready \+ GET /health, zero other traffic): 42/42 polls HTTP 200, ready\=true throughout, no 5xx, no errors. `finality_stall_seconds` ranged 10.89–36.26 s (mean 17.12 s) — background stall, all under the 60 s bound. Unlike XE-6608's 2026-11-12 observation (8/20 polls 503), the node was stable enough for a controlled run, so the bounded phase went ahead under the notice bounds.

## Bounded load run: complete, no stop condition triggered

Run 2026-11-14 12:29:09–12:30:22Z (93 s, 87 requests, ≤4 concurrent, ≤2 req/s sustained, /supply leg at 3 s spacing past the 2 s TTL, read-only, no transactions). 87/87 HTTP 200, 0 errors, 0 5xx. Latency overall: min 489 / p50 743 / p95 3,105 / max 3,531 ms. /ready monitor during load: stall 14.0 / 21.4 / 17.7 s — inside the Phase 0 no-load range. Max stall overall 21.42 s, ready\=true throughout. The load did not move finality beyond background.

Per-endpoint, per-concurrency latency (ms, 2 reps each unless noted):

| Endpoint | conc 1 | conc 2 | conc 4 |
| --- | --- | --- | --- |
| /statechain/kv (default) | 1,735 / 653 | 574 / 660 | 743 / 1,909 |
| /statechain/kv?limit\=1000 | 1,184 / 770 | 677 / 693 | 1,373 / 2,694 |
| /statechain/kv?prefix\=sys. | 502 / 489 | 533 / 559 | 2,861 / 1,079 |
| /statechain/kv?limit\=100\&offset\=6000 | 715 / 565 | 624 / 527 | 3,324 / 961 |
| /supply (past-TTL) | 1,116–2,074 (n\=4) | 552–2,672 (n\=6) | 1,037–3,156 (n\=8) |
| /leases?limit\=1 | 538 / 714 | 546 / 557 | 622 / 3,105 |
| /leases (default) | 742 / 587 | 715 / 602 | 1,952 / 1,793 |
| /leases?limit\=1000 | 648 / 632 | 629 / 671 | 3,043 / 2,271 |
| /providers | 530 / 549 | 512 / 667 | 773 / 790 |
| /pending?limit\=1 | 527 / 528 | 526 / 644 | 642 / 2,766 |
| /pending (default) | 603 / 530 | 573 / 597 | 1,834 / 1,410 |
| /pending?limit\=1000 | 757 / 795 | 782 / 824 | 3,531 / 2,040 |

What the four questions answered:

1. **/statechain/kv (XE-7732):** first live cost curve. Default page \~0.5–1.7 s at conc 1–2; conc 4 inflates to \~0.7–3.3 s. The scan cost is real but small in absolute terms; no amplification explosion.
2. **/supply past-TTL (XE-10586):** fresh censuses at 3 s spacing cost 609–1,524 ms server-side at conc 1\. At conc 4 the first four concurrent callers all took \~3.0–3.2 s total against a 738 ms server duration — they queued \~2.3 s behind one census (mutex queueing, as XE-10586's PoC hinted: concurrent callers wait behind SupplyAuditor.mu rather than being served stale). But the wait caps at \~3 s and the census itself stays \<1.6 s; no sustained multi-second pinning, no stall movement. Several conc 2/4 requests show total latency SMALLER than server duration\_ms (e.g. 948 vs 1,524; 581 vs 725\) — the same background-census sharing XE-6351 reported: concurrent requests share one in-progress census rather than each triggering a fresh one.
3. **/leases \+ /providers (XE-10572):** /leases ?limit\=1 ≈ default ≈ ?limit\=1000 at conc 1–2 (\~0.5–0.7 s) — the full-work-before-pagination shape holds, but the absolute cost is small; conc 4 inflates to \~1.8–3.1 s. /providers is flat \~0.5–0.8 s at every concurrency — no amplification.
4. **/pending re-check (XE-8182):** ?limit\=1 ≈ default ≈ ?limit\=1000 at conc 1–2 (\~0.5–0.8 s) — the fixed-cost shape holds at the new set size (pending 368,260 vs \~334k in XE-6351); conc 4 inflates to \~1.4–3.5 s.

State: /supply at first load request pending 368,260, accounts 38,632, blocks 953,194; at last pending 368,248, accounts 38,633, blocks 953,210.

## Verdict

Negative result with reproducible numbers: a mild \~3–5× latency inflation at concurrency 4 on the scan endpoints, mutex queueing confirmed on /supply at conc 4 (\~3 s waits), and no measurable effect on finality. This does not support a Medium or Severe claim at the tested bounds. The campaign is complete; no further load runs are planned under this notice. Raw data available on request (Phase 0: 42 polls; load: 87 requests, per-request latency \+ server duration\_ms).

**XE desk**team2026-11-20 20:01 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-12804; it is read like any other.
