{"id":"XE-13265","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"402","source_url":"https://github.com/xeprotocol/xe/issues/402","reporter_id":2481,"title":"[Re-report] XE-0072 still unfixed at HEAD 89a542e: GET /accounts does full-lattice work regardless of ?limit=","area":"node-api","claimed_tier":"high","assessed_tier":null,"verdict":"notice","duplicate_of":null,"tracked":true,"internal_ref":"#1030","internal_url":"https://github.com/xeprotocol/core/issues/1030","status":"closed","closed_reason":"invalid","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:05.599309+00:00","updated_at":"2026-11-20T00:25:44.224042+00:00","source_created_at":"2026-11-11T18:57:25+00:00","told_at":"2026-11-20T00:24:43+00:00","status_changed_at":"2026-11-20T00:08:43.716040+00:00","url":"https://bounty.xe.network/XE-13265","body":"# [Re-report] XE-0072 still unfixed at HEAD 89a542e: GET /accounts does full-lattice work regardless of ?limit=\n\n**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)\"\n**Original status:** awarded, verdict valid, assessed High, award 3,500 XE (GitHub issue xeprotocol/xe#70, internal ref xeprotocol/core#1030)\n**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).\n\n## Claimed fix and why it did not land\n\nThe 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)\").\nVerified 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.\n\n## Still broken at HEAD 89a542e (\"release: testnet-0005 quorum withhold fix\")\n\n- `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.\n- `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`).\n- `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.\n- No caching, no pagination pushdown, no snapshot anywhere on this path.\n\n## Reproduction (read-only, single requests — do not loop)\n\n```\ncurl -w \"HTTP %{http_code}, total %{time_total}s, size %{size_download} bytes\" \\\n  \"https://ldn.core.test.network/accounts?limit=1\"\n```\n\nMeasured on testnet-0005, 2026-11-11 (three independent measurements):\n- 2.89 s for one 276-byte row\n- 1.65 s for one 276-byte row\n- **1.03 s for one 276-byte row (this filing, 2026-11-11 ~23:5x WIB)**\n\n`?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.\n\n## Impact\n\nSame 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).\n\n## Duplicate check performed 2026-11-11\n\nBoard 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.\n\n## Environment\n\n- Repo: `github.com/xeprotocol/xe`, HEAD `89a542e`, Go 1.25\n- Node: `ldn.core.test.network`, network testnet-0005\n","patch_refs":[],"thread":[{"id":13031,"source":"github","source_ref":"7026260568","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-13265 and says what; it is read like any other.","created_at":"2026-11-20T00:24:43+00:00"}]}