Skip to content

Keep claiming coins until the chain can actually be seen - #224

Open
valentunn wants to merge 3 commits into
mainfrom
fix/long_background_claim
Open

valentunn wants to merge 3 commits into
mainfrom
fix/long_background_claim

Conversation

@valentunn

@valentunn valentunn commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #223

  • Silent subscriptions in background: remote storage subscriptions now hold the chain connection while collected, so they're answered even when the app is in background.
  • Give-up on silence: a claim no longer closes its window before the chain has answered at least once.
  • Claim timeout: chat payment claims no longer have a deadline (Instant.DISTANT_FUTURE).

A payment received while the app sat in the background could be given
up on with its coins on chain: the claim's storage subscription was left
on a paused socket, the window ran out overnight, and the payment was
marked failed.

- Remote storage subscriptions now hold the chain connection while they
  are collected, so they are answered in the background too.
- A claim no longer closes its window before the chain has answered at
  least once.
- Chat payment claims no longer have a deadline.

Fixes #223

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@valentunn
valentunn requested a review from mikyar as a code owner October 2, 2026 13:06
valentunn and others added 2 commits October 2, 2026 17:25
The rebuild deadline is stored with each claim transaction, so passing
the caller's endless window through would persist one nothing could
ever change. It is now the earlier of the caller's window and six hours
from submission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts the finite rebuild deadline: a rebuild past it would claim into
a new coin each time, so a stuck claim could mint many. Notes that a
future change to the deadline needs a migration of the stored ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coinage payment claim might give up in background while the coins are on-chain

1 participant