{"id":"XE-4502","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":968,"title":"openapi: /blocks/recent omits `source` (the receive->send link), `amount`, `destination`, `signature`, and declares `finalized` which is never returned","area":"sdk-docs-web","claimed_tier":"medium","assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-11T02:26:11.639818+00:00","updated_at":"2026-11-15T19:13:40.282805+00:00","source_created_at":null,"told_at":"2026-11-15T17:42:50.467735+00:00","status_changed_at":"2026-11-15T17:42:37.696687+00:00","url":"https://bounty.xe.network/XE-4502","body":"## Summary\r\n\r\n`GET /blocks/recent` is specified as returning objects with\r\n`{account, asset, balance, finalized, hash, pow_nonce, previous, pub_key, representative,\r\ntimestamp, type}`. The node returns the raw block instead: a send carries `amount` and\r\n`destination`, a receive carries `source`, and every block carries `signature` - none of\r\nwhich is documented - while `finalized` is documented and never returned.\r\n\r\n## Steps to reproduce (read-only, no auth)\r\n\r\n```\r\ncurl -s 'https://ldn.core.test.network/blocks/recent?limit=1000'\r\n```\r\n\r\nPresence over 1000 returned blocks:\r\n\r\n| field | present | documented |\r\n|---|---|---|\r\n| signature | 1000/1000 | no |\r\n| amount | 824/1000 | no |\r\n| destination | 824/1000 | no |\r\n| source | 176/1000 | no |\r\n| finalized | 0/1000 | yes |\r\n| pub_key | 3/1000 | yes |\r\n| representative | 61/1000 | yes |\r\n\r\nFull key set per type as returned:\r\n\r\n```\r\nsend   : account, amount, asset, balance, destination, hash, pow_nonce, previous, signature, timestamp, type\r\nreceive: account, asset, balance, hash, pow_nonce, previous, signature, source, timestamp, type\r\n```\r\n\r\n## Expected vs actual\r\n\r\n1. `source` is missing from the schema. It is the only field that says which send a receive\r\n   settles. A client built from the spec cannot walk the lattice or reconcile balances from\r\n   this feed: the link is simply not in the contract.\r\n2. `amount`, `destination`, `signature` are returned and undocumented.\r\n3. `finalized` is documented and never returned (0 of 1000). A consumer that gates on it\r\n   treats every block as unfinalized forever.\r\n\r\n## Impact\r\n\r\nThe block feed is the endpoint an indexer or explorer is built on. Following the published\r\ncontract, such a client silently loses the receive->send link and finality, and gets no\r\nerror: HTTP 200, well-formed JSON, absent fields. This is a correctness gap in the public\r\nAPI contract with a concrete wrong-data outcome for generated clients, not a remote code\r\npath.\r\n\r\n## Not a duplicate (checked)\r\n\r\nScanned all 891 public tickets for `blocks/recent`, `finalized`, `pub_key`, `representative`.\r\nXE-0220 covers the endpoint's rebuild cost (~12 s per request), XE-0227 is a closed volume\r\npre-notice. Neither covers the response schema.\r\n\r\n## Suggested fix\r\n\r\nPublish the same block schema the POST block endpoints use, so `source`/`amount`/\r\n`destination`/`signature` appear, and remove `finalized` from this response schema unless\r\nthe endpoint actually emits it (it belongs to the block-detail route, `api/handler.go:483`).","patch_refs":[],"thread":[{"id":2580,"source":"web","source_ref":"reporter:968:dd2abf4a07e869a8","author":"flavyn","team":false,"body":"**Refinement of this ticket: `finalized` is dropped by one serializer, not \"never returned\"**\n\nThe title of this report says `finalized` is \"declares `finalized` which is never returned\". That framing is too broad, and it is worth correcting here before triage does it for you. `finalized` **is** returned by two other read paths for the very same blocks; only `/blocks/recent` omits it.\n\nRe-measured 2026-11-13 on `ldn.core.test.network`.\n\n**Same block, three paths**\n\nTwo `send` blocks taken from the recent feed and then fetched by hash: `65ce5e22b489ad29…`, `1308f1942bf98b11…`\n\nPath A — `GET /blocks/{hash}` → HTTP 200, both samples, keys:\n\n```\ntype, account, previous, balance, timestamp, asset, representative,\ndestination, amount, signature, hash, pow_nonce, finalized\n```\n\n`finalized: true` on both.\n\nPath B — `GET /blocks/recent` → the same blocks, keys:\n\n```\ntype, account, previous, balance, timestamp, asset, representative,\ndestination, amount, signature, hash, pow_nonce\n```\n\n`finalized`: key absent.\n\nPath C — `GET /accounts/{address}/chain?limit=2` for the account of recent item 0 (`2f5ee5a9…a14f`) → block 0 carries `finalized: true`.\n\n**Presence across the whole 1000-item feed**\n\n```\nsource          107\ndestination     893\namount          893\nrepresentative  242\npub_key           8\nmemo              8\nfinalized         0\n```\n\nEvery field that any block kind carries does reach the feed. `finalized` is the only one at zero.\n\n**Why this matters for the report**\n\nThe A-vs-B difference for one hash is exactly this single key, which rules out the reading \"the feed returns a deliberately narrower projection\". The feed's serializer omits a field its sibling paths include. Two consequences:\n\n1. The defect is narrower than \"never returned\" — it is endpoint-specific, and stating it that way makes it harder to refute with `curl /blocks/{hash}`.\n2. The impact is sharper: a client using the bulk feed (the only high-volume path) can never observe finality, while a client using the per-account chain always can. Identical blocks are represented differently depending on which read path is used.\n\n`Block.required` is only `[\"type\",\"account\",\"hash\"]`, so omitting `finalized` is schema-legal and response validation cannot catch it.","created_at":"2026-11-13T00:30:21.668722+00:00"},{"id":6473,"source":"desk","source_ref":"reply:5113","author":"Joseph Denne","team":true,"body":"Thanks for the report. We have read it and are checking the published API description against what the node returns. This ticket will be updated as it moves.","created_at":"2026-11-15T17:42:16.598376+00:00"}]}