Skip to content

Improve indexer failure handling and reduce relay log noise - #953

Open
dangershony wants to merge 1 commit into
mainfrom
fix/indexer-timeout-relay-noise
Open

Improve indexer failure handling and reduce relay log noise#953
dangershony wants to merge 1 commit into
mainfrom
fix/indexer-timeout-relay-noise

Conversation

@dangershony

Copy link
Copy Markdown
Member

Follow-up to a user bug report on v0.2.34 (Fedora rpm): founder couldn't pay for project deployment — the deploy screen showed 'We couldn't start watching for your payment because the wallet wasn't ready' and the Receive modal hung on Loading.... Root cause: the primary indexer was timing out (10s HttpClient timeout), so GetNextReceiveAddress never produced an address, and the log never said which indexer failed. The log was also flooded with relay disconnect stack traces every minute.

Changes

Indexer failure handling

  • Log which indexer is in use and include the indexer host in address-balance/UTXO failure messages (Indexer <host> did not respond: ...) so future reports name the endpoint (MempoolSpaceIndexerApi).
  • Timeout 10s → 30s for the wallet indexer client — cold Fulcrum/electrs can be slow to answer address queries and the gap-scan fans out many requests at once; one slow response failed the whole receive-address generation.
  • Clearer user-facing errors in PaymentFlowViewModel: indexer/network failures now tell the user to check their connection or switch indexers in Settings (with the failure detail), instead of the misleading 'unlock the wallet' / 'wallet wasn't ready' text. The generic 'no receive address available' message no longer overwrites the real cause.

Relay log noise

  • Removed yakihonne relays (nostr-01/nostr-02.yakihonne.com) from the default mainnet relay lists in both the SDK and the webapp — they were returning 502s continuously. Note: existing installs keep them in saved settings; only fresh profiles get the new defaults.
  • Demoted relay disconnect logging: a single-line warning (type + reason) instead of an error with a full stack trace fired on every reconnect attempt (once a minute per dead relay); EOSE/OK tracking messages demoted from warning to debug.

Validation

  • Angor.Shared, Angor.Sdk, App (design) and Angor.Client (webapp) all build with 0 errors.

Not in this PR (known follow-ups)

  • The deploy screen requests a hardcoded 10,000 sats while the actual creation transaction pays AngorCreateFeeSats (10,001) + miner fee — paying exactly the requested amount leaves the wallet short.
  • Optional migration to prune yakihonne relays from existing users' saved settings.
  • Optional indexer-selection popup when the indexer is unreachable (kept to a better inline error for now).

- Remove yakihonne relays from default mainnet relay lists (SDK + webapp)
- Demote relay disconnect logging: single-line warning instead of
  error + stack trace on every reconnect attempt; EOSE/OK tracking
  messages demoted to debug
- Log which indexer is in use and include the indexer host in
  address-balance/UTXO failure messages so bug reports name the endpoint
- Increase indexer HttpClient timeout from 10s to 30s (cold Fulcrum/
  electrs can be slow; the gap-scan fans out many requests at once)
- PaymentFlow: distinguish indexer/network failures from wallet issues
  in the user-facing error (point to Settings to switch indexer) and
  stop overwriting the real cause with 'wallet wasn't ready'
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.

1 participant