Skip to content

bug: on-chain payment waits up to 20 s on the connecting screen after resume #978

Open

Description

@ovitrif

Refs:

What happened?

When Bitkit returns from the background and the Electrum server has dropped the connection while an on-chain wallet sync was waiting on it, that sync stays stuck until its 20 s timeout (BDK_WALLET_SYNC_TIMEOUT_SECS in ldk-node). Every later sync waits for it, so an on-chain payment opened right after resume sits on the "Connecting to network" screen for up to 20 s. ldk-node already rebuilds the connection within about a second (synonymdev/ldk-node#127), but the stuck sync still holds the wait.

Expected behavior

After the connection is rebuilt, a new on-chain sync runs on it without waiting for the stuck one, so the payment screen opens within a few seconds of resume.

Steps to Reproduce

  1. Leave Bitkit in the background until the Electrum server drops the idle connection, with an on-chain sync in flight.
  2. Open a Pubky Shop on-chain payment right after returning.
  3. The connecting screen shows for about 20 s.

Logs / Screenshots / Recordings

Recording in #975: the connecting screen shows from 15:16:55 to 15:17:15 UTC, ended by the first sync after the stuck one's timeout.

Bitkit Version

3.0.0 RC3 (ldk-node 0.7.0-rc.76)

Device / OS

iOS, all devices

Reproducibility

Whenever the stuck call on the dropped connection is the on-chain sync; a stuck fee update or balance lookup recovers in 1-3 s.

Additional context

The fix is in ldk-node: abandon or bypass an in-flight on-chain sync once its client has been replaced, instead of making later syncs wait for it. Android shows no post-resume wait screen, so this is only a latency there (about 10 s before the next sync in a device gate on synonymdev/bitkit-android#1532).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions