Report
XE Bounty — Laporan siap file (temuan pass 3 #3)
File issue baru di: https://github.com/xeprotocol/xe/issues/new Paste judul + isi di bawah. Akun GitHub: Gib230223.
Judul
[Low-Medium] Failed lease auto-accept is never retried by the watch loop
Isi
Summary
In node/node.go, autoAcceptLease records the outcome of each accept attempt in acceptSched. The retry flag is set true only on attestation-gather failure and on retryable AddBlock errors. Every other failure — policy reject, insufficient XUSD stake, certificate error, VM provision failure, non-retryable AddBlock error — records done=true, and due() is then false forever while the lease stays pending. So a provider who tops up XUSD, renews its certificate, or frees VM capacity never re-attempts that lease under normal operation.
Evidence
// node/node.go:1465 (autoAcceptLease)
retry := false
defer func() { n.acceptSched.record(leaseBlock.Hash, retry, time.Now()) }()
// node/node.go:1726-1740 (record)
if !retry { st.done = true; return }
// (retry==true only: delay := acceptRetryDelay(st.failures); st.next = now.Add(delay))
// node/node.go:1719-1724 (due)
return !ok || (!st.done && !now.Before(st.next))
// node/node.go:1670-1680 (leaseWatchTick)
if !n.acceptSched.due(p.SendHash, now) || n.acceptRunning(p.SendHash) { continue }
retry is set true only on attestation-gather failure and retryable AddBlock errors. Policy reject, no stake, cert error (acceptCertificateHash), VM provision failure ("VM provision failed, not accepting"), and non-retryable AddBlock errors all leave retry == false, so record sets done = true and due() returns false forever.
Impact (Low-Medium, liveness)
A lease whose first auto-accept failed for a transient reason (provider out of XUSD, expired cert, VM capacity full) is never re-attempted by the watch loop even after the provider recovers — the provider silently loses that lease. Nuance: the lease can still be re-attempted if the lease block is re-gossiped/received (handleIncoming, node.go:725, calls autoAcceptLease directly, bypassing due()), e.g. after a restart/re-sync — so this is "no retry under normal operation", not "never, ever". That makes it liveness, not a stuck-funds bug (escrow still settles/expires via the normal paths).
Reproduction (PoC)
Unit test against acceptSchedule (node package):
BUG: after one non-retryable accept failure, due()=false forever; leaseWatchTick will never re-attempt this lease even if stake/cert/VM recovers
Lease abc123: retrying accept in 5s
retryable failure does schedule a retry (control case OK)
--- PASS: TestPoc3AcceptScheduleDoneForever
record(h, false, now) → due(h, now+1h) is false; control record(h, true, …) does schedule a retry.
Suggested fix
Do not mark the lease done on failures whose cause can change (policy, stake, cert, VM capacity): either re-arm due() when the underlying condition changes, or schedule a bounded retry (with backoff) for all accept failures instead of only attestation-gather / retryable-AddBlock ones.
Novelty note
No ticket covers the accept-retry schedule. Board "retry" search (High+Medium and Minor views) returns only HTTP-retryable flags, sync retry loops, and SDK retry counts — none about the lease auto-accept schedule. GitHub repo issue search for the auto-accept schedule returns only #175 (emission terms) and #283 (MaxConcurrent race) — neither about retry gating. Checked the live bounty board and the GitHub repo issues, 2026-11-12.
Repo: github.com/xeprotocol/xe, HEAD 89a542e, testnet-0005.
Thread
Thanks. This is the same finding as https://bounty.xe.network/XE-0748, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-13350 and says what differs; it is read like any other.