<!-- XE-0088 · Time-to-finality measures 10-35s (median 19.4s) against the documented ~3s; finality advances lag block production 2.5x · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0088>. The page is the record; this is the same page for reading.*

XE-0088 · Bounty

# Time-to-finality measures 10-35s (median 19.4s) against the documented \~3s; finality advances lag block production 2.5x

Accepted
claimed Medium
[xe#33](https://github.com/xeprotocol/xe/issues/33)
filed 2026-10-24 14:46 UTC
by kenmungeneskar

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   Medium

Area
:   SDK / docs / web

Duplicate of
:   —

Tracked
:   internally

Updated
:   2026-11-10 11:38 UTC

Told
:   2026-11-10 00:16 UTC

### Patches

None linked.

### History

- [61412](https://bounty.xe.network/log/61412) 2026-11-10 00:16 UTC reply.mirrored
- [61369](https://bounty.xe.network/log/61369) 2026-11-10 00:15 UTC reply.sent
- [18239](https://bounty.xe.network/log/18239) 2026-11-07 16:11 UTC proposal.adopted
- [18238](https://bounty.xe.network/log/18238) 2026-11-07 16:11 UTC ticket.award
- [18237](https://bounty.xe.network/log/18237) 2026-11-07 16:11 UTC proposal.rejected
- [6910](https://bounty.xe.network/log/6910) 2026-11-05 13:46 UTC proposal.created
- [1841](https://bounty.xe.network/log/1841) 2026-11-02 19:16 UTC proposal.created
- [1490](https://bounty.xe.network/log/1490) 2026-11-02 10:11 UTC note.added
- [815](https://bounty.xe.network/log/815) 2026-10-29 14:22 UTC note.added
- [814](https://bounty.xe.network/log/814) 2026-10-29 14:22 UTC ticket.facts area, claimed\_tier
- [611](https://bounty.xe.network/log/611) 2026-10-29 14:05 UTC github.labels
- [566](https://bounty.xe.network/log/566) 2026-10-29 14:04 UTC ticket.status triaging → accepted

[Full history](https://bounty.xe.network/log?ref=XE-0088) · [JSON](https://bounty.xe.network/v1/tickets/XE-0088) · [markdown](https://bounty.xe.network/XE-0088.md)

### Report

**Severity (suggested):** Medium — the documented finality bound does not match observable behaviour by \~6×, and a
single missed vote round costs ≥15 s. Not a stall (blocks do finalize), no fund risk.

**XE payout address:** `b68f2b4d8a062d9219590f0c2d7753d783ec9f5d43d85a125230bb0f7a41a86e`

### What the docs say

- the site header/marketing: "**\~3sFinality**", "transactions final in seconds"
- `/docs/constants`: "Lock stability window \| **3 seconds**"
- README: "Blocks finalize through representative voting … finalize … **final in seconds**"

### What we measure on `testnet-0005`

Ten ordinary 1-micro `send` blocks from one of our own wallets, each one timed from **submission** to the moment the
node reports `finalized: true` for that block hash (polling `/accounts/{addr}/chain` every 0.5 s; submit latency
excluded from the finality number):

```
[1]  finalized in  9.8s      [6]  finalized in 20.6s
[2]  finalized in 10.8s      [7]  finalized in 14.8s
[3]  finalized in 12.6s      [8]  finalized in 22.7s
[4]  finalized in 35.3s      [9]  finalized in 23.7s
[5]  finalized in 18.2s      [10] finalized in 22.7s

finalized 10/10 · min 9.8s · median 19.4s · mean 19.1s · max 35.4s · >3s: 10/10
```

Idle baseline (no load from us, 2 minutes, sampled every 5 s on `GET /node`):

```
block_count      +25   (7.7 blocks/min)
finality_advances +10  (3.1 advances/min)   → 2.5 blocks per finality advance
lag since last advance: median 9.9s · mean 11.4s · max 24.7s · 12/24 samples >10s
```

Network context at measurement time: `representatives: 1`, `peer_count: 6`, `dropped_blocks: 0`.

### Why \~19 s looks like "one missed vote round"

Votes are cast on block add (`node/node.go:279 ledger.SetBlockAddedCallback(voteMgr.OnBlockAdded)`), so a block that
reaches the representative immediately should confirm in seconds. But if that first round is missed, the retry path is
slow:

```
// node/node.go:281-292
ticker := time.NewTicker(15 * time.Second)
...
case <-ticker.C:
    voteMgr.SweepFrontiers()
```

plus `Re-vote backoff | 15 seconds` in `/docs/constants`. A median of \~19 s is consistent with "the immediate vote
round is often missed, and the 15 s sweep is what actually finalizes it" — i.e. the **effective** bound in the common
case is one sweep interval, not 3 s.

We are *not* claiming a root cause beyond that observation: we did not instrument the representative, and
`time-to-finalized` inherently includes our block reaching the rep and the vote coming back.

### Why it matters

1. **Clients that follow the docs are wrong by \~6×.** Anything that treats a payment as final after \~3 s (the
   documented promise, and the reason "settled in under a second" / "zero-fee finality" is attractive for agents)
   is accepting unfinalized state for another 10–35 s.
2. **`finalized: false` is the common state, not the exception**: 2.5 blocks per finality advance at idle means most
   blocks spend most of their life unfinalized.
3. It also means a *single* representative is the liveness dependency for finality network-wide (`representatives: 1`);
   if that key is offline, nothing finalizes. That is a design property, but it makes the documented 3 s unreachable
   rather than merely optimistic.

### Reproduction

```
# 1) submit a block with your own key, then poll until finalized:true and time it
#    (any wallet with balance can do this; see the script in our earlier comment)
# 2) network-side view, no client needed:
for i in $(seq 1 12); do
  curl -s https://ldn.core.test.network/node \
    | jq -r '"blocks=\(.block_count) finality=\(.finality_advances) lag_ms=\(((now*1000|floor) - (.last_finality_ns/1000000))|floor)"'
  sleep 5
done
```

### Suggested fix (pick one)

- Make finalization retry faster than 15 s (e.g. sweep on vote-receipt gaps, or a 2–3 s retry while a frontier has no
  quorum), so the common case matches the documented bound; or
- Keep the implementation and **state the real bound** in the docs ("finality is typically 10–35 s on testnet-0005
  with one representative; 3 s is the lock-stability window, not time-to-finality") — the current wording is what a
  client developer will code against.

If "\~3 s" is intended to describe the lock-stability window rather than time-to-finality, then this is a
documentation defect rather than a code one — either way the two need to agree, because right now a client cannot tell.

---

*Measured 2026-10-24 22:44 (\+08) against `https://ldn.core.test.network`, from our own funded testnet wallets,
1 micro per block, 10 samples. Campaign context: #32.*

### Thread

**kenmungeneskar**2026-10-25 04:10 UTCgithub

﻿**Follow-up measurement (2026-10-25) — same metric, paired design, 22 probes in one session**

To check whether the 19.4 s median was representative, I re-measured with a probe wallet that was not part of any load,
in three windows of the same session (quiet → load → quiet):

| phase | n | median | p90 | max |
| --- | --- | --- | --- | --- |
| quiet before | 7 | **5.5 s** | 7.1 s | 11.0 s |
| under load (\<\=4 tx/s, 10 wallets) | 9 | **7.3 s** | 12.2 s | 14.7 s |
| quiet after | 6 | **6.2 s** | 6.6 s | 13.2 s |

- All 22 blocks finalized; **none under 3 s** (minimum 3.7 s).
- The 19.4 s median in the report above was measured on 2026-10-24 22:44 (\+08), during a slower window — on the same
  node, \~11:33–11:44 on 2026-10-25 `finality_advances` did not move at all for about eleven minutes before catching up.

So the **direction** of this report stands (time-to-finality is consistently above the documented \~3 s, and the
3 s figure is what a client developer will code against), but the **magnitude is condition-dependent**: roughly
5.5–7.3 s median in a normal window, \~19 s in a slow one. The better-case number is the one to quote; I would rather
give you both than the flattering one.

**BoomGone**2026-10-28 12:36 UTCgithub

Data point from a bounded single-client re-measurement on the current build (node xe/74eeec5), per notice #132.

25 sequential send blocks, one at a time (well under 1 tx/s), timing submit to finalization via final\_height:

- finality: median 3.5s, min 3.2s, max 4.2s (documented \~3s)
- submit latency: avg 357ms

Caveat so this is not misread: this is single-client sequential load and does NOT reproduce the multi-wallet concurrent conditions here (#34 used \~1 tx/s across 30 wallets). It is a baseline, not a refutation. It shows single-client finality on xe/74eeec5 sits close to the documented 3s; I have not yet measured the multi-wallet degradation on this build.

**XE desk**team2026-11-10 00:16 UTCgithub

Read and accepted. It is tracked internally and the fix will land in a public PR; this issue is
updated when it does, and the tier and award follow the fix. The desk entry is https://bounty.xe.network/XE-0088.

**fauzilukman**2026-11-12 11:44 UTCgithub

Load-dependence data point for this issue, measured 2026-11-11 on testnet-0005 (public node ldn.core.test.network, own test wallets, 1-micro sends, campaign notice XE-5390):

- At 1 tx/s sustained (60 s, n\=59): finality median 4.0 s, p95 10.2 s, max 11.0 s.
- At \~3.3 tx/s sustained (120 s, n\=500, repeated twice): finality median \~20 s, p95 32–51 s, max 46–55 s. Submit latency median rose 0.69 s → \~2 s (p95 \~1.4 s → \~10–14 s). Unfinalised positions 3–6 → 24–26 (stable, not growing).
- 0 errors, 0 stalls \> 60 s, everything finalised, node healthy throughout (/ready 200, quorum margin 0.33, 1/7 reps); full recovery to \~4 s median within minutes of the load stopping.

So the \~19 s median in this issue looks load-dependent: at low rate the immediate vote round usually lands (\~4 s); under sustained load it is usually missed and the 15 s sweep is what finalises. The 3.3 tx/s ceiling here was our generator host's CPU, not the network — the network's breaking point is still above that.
