waved: reuse cached identity in GetInfo - #1133
Conversation
📝 Doc drift advisory —
|
|
Physical-device validation confirms this issue and the proposed change, but With #1133 included in the iOS framework, the receive path's The request subsequently blocked at I have left the PR draft because the end-to-end device scenario still depends |
GetInfo derived the stable daemon identity on every request. For btcwallet-backed wallets, that derivation opens a wallet database write transaction. A read-only status request can therefore wait behind other wallet work. Use the cached identity after mailbox startup publishes it. Keep the existing derivation fallback for earlier requests. Synchronize descriptor publication and reads because GetInfo is callable during startup. Cover both the no-wallet cached path and concurrent publication with regression tests.
20ef2e3 to
0bf5ddc
Compare
|
Applied the documentation advisory in commit 0bf5ddc. Both |
|
@claude review |
|
Claude finished @bhandras's task in 1m 36s —— View job Code Review —
|
What changed
GetInfonow returns the daemon identity that startup already derived andcached. It only derives the key itself when startup has not published the
cached value yet.
The cached descriptor is protected by a read/write lock because
GetInfocanrun while wallet startup is publishing it. All production readers use the same
synchronized snapshot.
Why
For btcwallet-backed wallets, deriving this key opens a wallet database write
transaction. Doing that for every status request could make a read-only
GetInfocall wait behind unrelated wallet work.This matters to mobile clients because the receive readiness check calls
GetInfo. On a physical iPhone, the readiness stage dropped from a 20-secondtimeout to 47.583 microseconds with this change.
The later timeout found in the receive authentication stage has a different
cause and is tracked in #1134. This PR remains a focused fix for status calls;
it does not claim to fix that separate wallet recovery stall.
Safety
family, index 0.
GetInfois running.Fixes #1132.
Validation
make fmt-changed-check base=origin/mainmake tidy-module-checkmake commitmsg-lint range='origin/main..HEAD'make lint-changed-local base=origin/maingo test ./wavedgo test -race ./wavedgo test -tags='wavewalletrpc swapruntime' ./swapwalletGetInforeadiness stage