{"id":"XE-10160","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":730,"title":"Consensus Conflict Stall: pullPhantomBlocks calls AddBlock instead of SaveStagedBlock causing permanent phantom rejection and delayed quorum resolution","area":"consensus","claimed_tier":null,"assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-12T10:27:19.091634+00:00","updated_at":"2026-11-20T00:48:52.638010+00:00","source_created_at":null,"told_at":"2026-11-20T00:48:52.641236+00:00","status_changed_at":"2026-11-20T00:33:26.012179+00:00","url":"https://bounty.xe.network/XE-10160","body":"## Vulnerability Summary\n\nIn `node/node.go:887-907`, `pullPhantomBlocks` is registered as the node's `PhantomPullFn` (`node/node.go:584`) to retrieve missing block bodies for conflict candidates from connected peers:\n\n```go\nfunc (n *Node) pullPhantomBlocks(account, previous string, hashes []string) {\n\tif len(hashes) == 0 {\n\t\treturn\n\t}\n\twant := append([]string(nil), hashes...)\n\tn.wg.Add(1)\n\tgo func() {\n\t\tdefer n.wg.Done()\n\t\tpeers := n.Host.Network().Peers()\n\t\tif len(peers) == 0 {\n\t\t\treturn\n\t\t}\n\t\txenet.PullBlocks(n.ctx, n.Msg, peers, want, func(b *core.Block) error {\n\t\t\tif err := n.Ledger.AddBlock(b); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tn.syncTracker.MarkDirty()\n\t\t\treturn nil\n\t\t})\n\t}()\n}\n```\n\nWhen a phantom block body is retrieved from a peer:\nThe ingestion callback invokes `n.Ledger.AddBlock(b)`.\n\nHowever, by definition, a phantom block in an open conflict shares the same `Previous` hash as an already-existing block on the account's chain. In `core/ledger.go`, invoking `AddBlock(b)` on a conflicting block immediately triggers:\n`return errForkDetected` or `return errPreviousMismatch`.\n\nBecause `AddBlock` returns an error:\n1. `PullBlocks` logs an ingest failure and considers the block un-ingested (`delete(want, b.Hash)` is skipped).\n2. The block is never saved to the staged block store (`n.Store.SaveStagedBlock(b)`).\n3. On every subsequent sweep of `QuorumManager.sweepOpenConflicts()`, `qm.ledger.GetBlockOrStaged(h)` returns `nil`, classifying the block as a phantom repeatedly.\n4. The conflict is unable to resolve normally and remains stalled until the hard timeout (`phantomUnretrievableTimeout`) forces an unretrievable drop.\n\n## Impact & Severity\n\n1. Consensus Livelock: Legitimate conflict candidates successfully retrieved from the P2P network cannot be staged or evaluated by the BFT quorum engine.\n2. Delayed Finality: Accounts with conflicting transactions are blocked from settling or progressing until phantom timeouts expire.\n\n## Proposed Remediation\n\nIn `pullPhantomBlocks`, validate the block's hash and signature, then store it as a staged block rather than calling `AddBlock`:\n```go\n\t\txenet.PullBlocks(n.ctx, n.Msg, peers, want, func(b *core.Block) error {\n\t\t\tif err := core.VerifyBlockHash(b); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := core.VerifyBlockSignature(b); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := n.Store.SaveStagedBlock(b); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tn.syncTracker.MarkDirty()\n\t\t\treturn nil\n\t\t})\n```","patch_refs":[],"thread":[{"id":13369,"source":"desk","source_ref":"reply:11391","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-10160 and says what; it is read like any other.","created_at":"2026-11-20T00:48:52.638010+00:00"}]}