{"id":"XE-13386","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"545","source_url":"https://github.com/xeprotocol/xe/issues/545","reporter_id":2487,"title":"[Bug Bounty] Conflict resolution deadlocks when the lowest-hash sibling block is missing: 5 accounts stuck 2–4 days","area":"consensus","claimed_tier":"medium","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:14.890345+00:00","updated_at":"2026-11-20T13:01:19.649301+00:00","source_created_at":"2026-11-13T08:07:07+00:00","told_at":"2026-11-20T13:00:22+00:00","status_changed_at":"2026-11-20T13:00:09.147583+00:00","url":"https://bounty.xe.network/XE-13386","body":"Suggested tier: Medium\n\n## Summary\nWhen an account produces two sibling blocks for the same previous hash (a fork, e.g. a wallet retry or client bug), the network must pick one winner by representative vote. The vote rule is a deterministic lowest-hash tiebreak — but if the lowest-hash sibling block is not held by the voting node, the representative casts **no vote at all**, and there is no fallback to the next-lowest held block. Votes for a block a node does not hold also count for **zero weight** in the tally. The result: the conflict can never resolve, and the account is stuck indefinitely. Five real accounts have been in this state for 2–4 days.\n\n## Mechanism (public source: github.com/xeprotocol/xe @ 89a542e)\n- `VoteManager.castVoteLocked` (`core/finalization.go`): the representative's preference is `pref := lowestHash(eligible)`. Then `prefBlock := ledger.GetBlockOrStaged(pref); if prefBlock == nil { return }` — if the lowest-hash block is not held locally (not on-chain, not staged), the representative returns **without voting**. It does not fall back to the next-lowest held block.\n- `gatherCandidates` collects seed hashes + existing votes + conflict-record hashes — it does **not fetch** missing blocks from peers.\n- `QuorumManager.finalTally` (`core/quorum.go`): only FINAL votes count toward weight, and only if `GetBlockOrStaged(v.BlockHash) != nil` — a vote for a block the node does not hold contributes **zero weight on that node**.\n- `promotable`: a hash is promotable only if already on-chain at the right height, or staged + validates. A missing block is never promotable, so `confirmConflict` can never promote it. There is no timeout, no fallback, and no recovery path in the code.\n- Note: the stale-conflict re-tally (`staleConflictAge` = 10 s, `Retally`) re-checks votes, but it cannot create votes that were never cast.\n\n## Evidence (live, 2026-11-13 ~15:00 WIB, testnet-0005)\n1. `GET /conflicts` on ldn: 5 open conflicts, detected 2026-11-09 and 2026-11-11, still open. ffm and nyc show the same 4 conflicts (ldn additionally holds `46635bb7…`). In **every** conflict, the LOWEST hash is the block MISSING from the node, while the other sibling(s) are present:\n   - `46635bb7…` (9 Nov): `898a8691…` FOUND (send, XE, 90000), `5e2a4311…` MISSING (lowest).\n   - `a438e930…` (11 Nov): `b8d2799d…` FOUND (send, XE, 100), `4fccb2e7…` MISSING (lowest).\n   - `b5996072…` (11 Nov): `f35c84c5…` FOUND (send, XE, 10000), `0ce905d5…` MISSING (lowest).\n   - `b8a5a88c…` (11 Nov): `201bd9cc…` FOUND (send, XE, 1), 3 others MISSING (lowest `120e2abe…`).\n   - `e4ed7b83…` (9 Nov): `01066172…` FOUND (send, XE, 10000), `00a007f5…` MISSING (lowest).\n   (`GET /blocks/<hash>` returns the block for the FOUND hashes and `{\"error\": \"block not found\"}` for the MISSING ones.)\n2. The affected accounts have not advanced: chain head of `46635bb7…` is the present sibling `898a8691…` (3 blocks, head time 1794223582) — no blocks after it in 4 days.\n3. Voting power is concentrated in one representative: `GET /delegation` — 20 representatives, total weight 41,150,636,105,900 micro-XE; representative `a06e32c72e3b744e…` holds 41,150,601,198,405 = 99.9999%. `GET /ready` (ldn): `active_representatives: 1`, `quorum_reachable: margin 0.330 above the 67% threshold, 1/20 representatives voting`, `conflicts_open: 5`. Finality itself is advancing (`watermark advanced 9s ago`, `finality_advances: 1360`) — the stall is specific to conflict resolution, not general finality.\n\n## Impact\nAny account that double-signs two sibling blocks (wallet retry, client bug) where the lowest-hash sibling is not widely propagated freezes permanently: no representative can vote for the position, and even a vote for the missing block counts for zero on nodes that lack it. There is no timeout or recovery. **Limitation, stated plainly:** this is self-inflicted only — only the account owner can sign their own blocks, so nobody can freeze someone else's account this way. Hence Medium, not higher.\n\n## Reproduction\n```\ncurl -s https://ldn.core.test.network/conflicts | python3 -c \"import json,sys; [print(c['account_address'][:12], c['detected_at'][:10], c['block_hashes']) for c in json.load(sys.stdin)]\"\n# for each hash in a conflict:\ncurl -s https://ldn.core.test.network/blocks/<hash>   # FOUND returns the block; MISSING returns {\"error\": \"block not found\"}\ncurl -s https://ldn.core.test.network/delegation | python3 -c \"import json,sys; d=json.load(sys.stdin); print(sorted(d['weights'].items(), key=lambda x:-x[1])[:2])\"\ncurl -s https://ldn.core.test.network/ready | python3 -c \"import json,sys; d=json.load(sys.stdin); print(d['active_representatives'], d['conflicts_open'])\"\n```\n\n## XE address for the reward\n`d9724eecb2a4fb22f353637b05abfe6a831c0a12713d7c5a5c8d046dbc1f93a7`","patch_refs":[],"thread":[{"id":3148,"source":"github","source_ref":"6849267091","author":"abangdwie","team":false,"body":"Update (2026-11-13 ~16:24 WIB): two more conflicts appeared today following the exact same pattern — the lowest hash is the missing block in both:\n- `14d39de6422c` (detected 2026-11-13 08:51 UTC): `31310f181bcf` FOUND (send, XE, 1), `2aca82f5243e` MISSING (lowest), `846688a84d44` MISSING.\n- `6df8ad6b1525` (detected 2026-11-13 08:54 UTC): `3ca982b02d23` FOUND (send, XE, 1), `043d2130e0b8` MISSING (lowest).\nOpen conflicts on ldn are now 7 (was 5 when this issue was filed); unfinalized positions 10 (was 9). Active representatives still 1. The deadlock is still growing — new accounts keep freezing the same way.","created_at":"2026-11-13T09:32:02+00:00"},{"id":14504,"source":"github","source_ref":"7040169274","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-13386 and says what differs; it is read like any other.","created_at":"2026-11-20T13:00:22+00:00"}]}