<!-- XE-13265 · [Re-report] XE-0072 still unfixed at HEAD 89a542e: GET /accounts does full-lattice work regardless of ?limit= · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13265>. The page is the record; this is the same page for reading.*

XE-13265 · Bounty

# \[Re-report\] XE-0072 still unfixed at HEAD 89a542e: GET /accounts does full-lattice work regardless of ?limit\=

Closed · invalid
—claimed High
[xe#402](https://github.com/xeprotocol/xe/issues/402)
filed 2026-11-11 18:57 UTC
by zvsvev

Verdict
:   Notice

Tier
:   —

Claimed
:   High

Area
:   Node / API

Duplicate of
:   —

Tracked
:   internally

Updated
:   2026-11-20 00:25 UTC

Told
:   2026-11-20 00:24 UTC

### Patches

None linked.

### History

- [549056](https://bounty.xe.network/log/549056) 2026-11-20 00:24 UTC reply.mirrored
- [548715](https://bounty.xe.network/log/548715) 2026-11-20 00:24 UTC reply.sent
- [544633](https://bounty.xe.network/log/544633) 2026-11-20 00:09 UTC github.state\_pushed
- [544629](https://bounty.xe.network/log/544629) 2026-11-20 00:09 UTC github.labels
- [544502](https://bounty.xe.network/log/544502) 2026-11-20 00:08 UTC proposal.adopted
- [544447](https://bounty.xe.network/log/544447) 2026-11-20 00:08 UTC proposal.adopted
- [544446](https://bounty.xe.network/log/544446) 2026-11-20 00:08 UTC ticket.status new → closed
- [544342](https://bounty.xe.network/log/544342) 2026-11-20 00:08 UTC proposal.adopted
- [544341](https://bounty.xe.network/log/544341) 2026-11-20 00:08 UTC ticket.facts area
- [544340](https://bounty.xe.network/log/544340) 2026-11-20 00:08 UTC proposal.adopted
- [544339](https://bounty.xe.network/log/544339) 2026-11-20 00:08 UTC ticket.facts
- [544338](https://bounty.xe.network/log/544338) 2026-11-20 00:08 UTC proposal.adopted

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

### Report

# \[Re-report\] XE-0072 still unfixed at HEAD 89a542e: GET /accounts does full-lattice work regardless of ?limit\=

**Original ticket:** [XE-0072](https://bounty.xe.network/XE-0072) — "api: GET /accounts does full-lattice work regardless of ?limit\=, and a single client wedges the node's own health sampler (High)"
**Original status:** awarded, verdict valid, assessed High, award 3,500 XE (GitHub issue xeprotocol/xe#70, internal ref xeprotocol/core#1030)
**This report:** re-report — the defect is still present in the public repo snapshot. It is NOT a new bug. Filed in the style of XE-0608 (patched-but-still-broken).

## Claimed fix and why it did not land

The ticket's only patch ref is xeprotocol/xe PR #124 ("fix(api,node,store): optimize GET /accounts pagination, prevent full-chain deserialization, and align pagination contract (#70, #78)").
Verified 2026-11-11: **PR #124 is still OPEN, never merged** (`gh pr view 124`, state OPEN, mergedAt null). The parallel fix fork was never PR'd. No fix symbols exist in the repo: grep for `GetAccountsPage|GetAccountChainLength|accountsSortCache` returns 0 results.

## Still broken at HEAD 89a542e ("release: testnet-0005 quorum withhold fix")

- `api/handler.go:628-646` (`handleGetAllAccounts`): calls `h.node.GetAllAccounts()` first, then sorts the full result and slices `[offset:end]`. `?limit=` does not reduce the work.
- `node/node.go:993` (`GetAllAccounts()`): iterates every frontier and calls `n.Ledger.GetChain(account)` \+ `n.Ledger.GetAssetBalances(account)` per account — a full read \+ JSON unmarshal of every block in every chain (`core/ledger.go:2374`).
- `node/observability.go:195`: the node's own health sampler calls the same `GetAllAccounts()`, so one client can wedge the node's own health reporting.
- No caching, no pagination pushdown, no snapshot anywhere on this path.

## Reproduction (read-only, single requests — do not loop)

```
curl -w "HTTP %{http_code}, total %{time_total}s, size %{size_download} bytes" \
  "https://ldn.core.test.network/accounts?limit=1"
```

Measured on testnet-0005, 2026-11-11 (three independent measurements):

- 2.89 s for one 276-byte row
- 1.65 s for one 276-byte row
- **1.03 s for one 276-byte row (this filing, 2026-11-11 \~23:5x WIB)**

`?limit=1000` takes near-identical time, proving the cost is the full scan, not the response size. Live testnet has \~30,170 accounts (per XE-0818). The read rate limiter allows 200 req/s/IP (burst 1000), so a single IP can keep the node permanently re-reading the lattice.

## Impact

Same as the original assessment: unauthenticated, sustained CPU \+ Badger-read saturation degrading consensus/block ingestion on a public core node, plus wedging the node's own health sampler. Suggested severity: **High** (same defect, same impact as the original 3,500 XE award).

## Duplicate check performed 2026-11-11

Board API `/v1/tickets?q=accounts&status=open&limit=200` — 126 tickets scanned. Only per-endpoint variants exist (XE-6825 `/frontiers`, XE-5964 `/balance`, XE-6204 `POST /blocks/*`, XE-6827 `/providers`, XE-5753 `/pending/{address}`, XE-4637 `/node`, XE-0220 `/blocks/recent`); no re-report of the `GET /accounts` list endpoint. XE-2992 is a campaign notice for `/accounts/{address}/chain`, not this endpoint. Residual risk, stated honestly: tickets beyond the board's search index cannot be fully excluded.

## Environment

- Repo: `github.com/xeprotocol/xe`, HEAD `89a542e`, Go 1.25
- Node: `ldn.core.test.network`, network testnet-0005

### Thread

**XE desk**team2026-11-20 00:24 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13265 and says what; it is read like any other.
