<!-- XE-0035 · Public release (master @ 9787859) never syncs 289 lease-family blocks ("lease not found"), retried every cycle; 18 vs 101 leases against bootstrap nodes · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0035>. The page is the record; this is the same page for reading.*

XE-0035 · Bounty

# Public release (master @ 9787859\) never syncs 289 lease-family blocks ("lease not found"), retried every cycle; 18 vs 101 leases against bootstrap nodes

Accepted
claimed Minor
[xe#57](https://github.com/xeprotocol/xe/issues/57)
filed 2026-10-25 11:55 UTC
by greenblood33333

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   Minor

Area
:   Ops / testnet

Duplicate of
:   —

Tracked
:   internally

Updated
:   2026-11-16 10:23 UTC

### Patches

- [xe#150](https://github.com/xeprotocol/xe/pull/150) open by arturbarszcz78
  fix(net): quarantine unresolvable sync blocks, rate-limit warnings, and fix pagination hasMore (#57)

### History

- [15416](https://bounty.xe.network/log/15416) 2026-11-06 21:28 UTC proposal.adopted
- [15415](https://bounty.xe.network/log/15415) 2026-11-06 21:28 UTC ticket.award
- [15414](https://bounty.xe.network/log/15414) 2026-11-06 21:28 UTC proposal.rejected
- [6878](https://bounty.xe.network/log/6878) 2026-11-05 13:45 UTC proposal.created
- [1802](https://bounty.xe.network/log/1802) 2026-11-02 19:16 UTC proposal.created
- [1457](https://bounty.xe.network/log/1457) 2026-11-02 10:11 UTC note.added
- [899](https://bounty.xe.network/log/899) 2026-10-29 14:22 UTC github.labels
- [818](https://bounty.xe.network/log/818) 2026-10-29 14:22 UTC note.added
- [817](https://bounty.xe.network/log/817) 2026-10-29 14:22 UTC ticket.status patched → accepted
- [816](https://bounty.xe.network/log/816) 2026-10-29 14:22 UTC ticket.facts area
- [612](https://bounty.xe.network/log/612) 2026-10-29 14:05 UTC github.labels
- [368](https://bounty.xe.network/log/368) 2026-10-29 14:04 UTC note.added

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

### Report

**Suggested severity:** Minor (log noise, incomplete lease state on a fully synced node); Medium if the divergent `/supply` figure counts as an accounting inconsistency.
**Area:** `net/sync.go`, lease validation (`core/ledger.go` `lease_*` paths), release process
**Version:** node built from public `master` @ `9787859` (reports `xe dev`); bootstrap nodes report `xe/92d83d1`, which is not in the public history
**Network:** `testnet-0005`
**Host:** Linux x86\_64 VPS, 2 vCPU / 3.7 GB, node running \>12 h with 5–8 peers (all three bootstraps plus DHT-discovered peers)

## Observation

A node built from the public tree syncs accounts and balances fine (5,542 accounts vs 5,548 on `nyc` at the time of comparison, growing in lockstep since), but it never catches up on leases, and it retries the same blocks every sync cycle:

```
sync: 289 block(s) could not be added after retries; reasons: map[lease not found: 06a4147c4e62...:2 lease not found: 0ad7493f775d...:2 lease not found: 0ad756700740...:2 lease not found: 1171ad4f666b...:2 ...]
```

- The count has been **exactly 289** for the whole observation window (\>3 h across several samples), i.e. these blocks never resolve.
- The warning is logged \~16–25 times a minute: 763 lines in 30 min, 239 lines in the last 15 min.
- `GET /leases?limit=1000`: **18** on my node, **101** on `nyc.core.test.network` (and `ffm`).
- `GET /ready` fails only on `finality_advancing` / `quorum_reachable`, which fails on the bootstrap nodes at the same moments, so this is not a peering or quorum problem on my side.
- `block_count` stays \~300–450 behind `nyc` (e.g. 31,675 vs 32,110; 36,055 vs 36,5xx), consistent with a fixed set of unsyncable blocks plus their dependants.
- The reason strings are all `lease not found: <hash>`, i.e. the `lease_accept`/`lease_renew`/`lease_settle` blocks arrive but the referenced lease is never present locally. The dependency retry in `net/sync.go` (`maxRetries = 10`, then the "could not be added" summary) runs again on every periodic sync, so the same 289 blocks are re-validated every \~10 s forever.

Side effect: `GET /supply` on my node reports an XUSD discrepancy of **−4,654** while `nyc`/`ffm` report **−32,318** (the latter is #4, finding 3: the sum of renewal costs). The figure depends on which leases a node happens to know, so two nodes on the same network disagree about supply.

## Why it matters

Anyone who follows Getting Started / `docs/run-a-node.md` and builds the public tree ends up with a node that disagrees with the network about leases, lags in block count, and floods its log. If the public release is expected to lag production (`92d83d1` is not public), the docs should say which commit the live network runs and whether a `9787859` build is supposed to be fully compatible.

## Reproduce

```
git clone https://github.com/xeprotocol/xe && cd xe && make build      # 9787859
./xe node --data ./data --genesis-dir ./genesis/testnet-0005 \
  --dial <three bootstrap multiaddrs from the README> --port 9000 --api --api-port 8080
# wait for accounts to match nyc, then:
curl -s "localhost:8080/leases?limit=1000" | jq length                      # 18
curl -s "https://nyc.core.test.network/leases?limit=1000" | jq length       # 101
journalctl -u xe-node --since "15 min ago" | grep -c "could not be added"   # ~240
```

## Suggested fixes

1. Publish (or tag) the commit the bootstrap nodes actually run, so a from-source build is known-compatible.
2. If a lease block's `source` lease is unknown, request it directly from the peer (`block_request`-style targeted pull) instead of waiting for frontier sync to deliver it.
3. Quarantine blocks whose dependency has not arrived after N full sync passes, and rate-limit the "could not be added" summary (once per change, not every cycle).

Payout address: `ead8ad792b4452de17e897155ed6efe9f928d0c8b07bdf6a9cbf4f4d67941dd2`

### Thread

Nothing public yet.
