Repository navigation
Coinbase integration - #1015
Merged
Merged
Coinbase integration#1015
Conversation
* Add coin base module * Update to use Hilt * Coinbase NetworkingModule * Coinbase Update common with explore branch * refactor coinbase to integrations folder * feat: DI and design system styles and elements * fix: removing wrong text styles * fix: name of used text style * add login service * Coinbase integration * feat: revoke token * feat: clear session and CookieManager * feat:Update connection stats Co-authored-by: synmcj <[email protected]>
# Conflicts: # common/build.gradle # common/src/main/res/values/styles.xml # wallet/src/de/schildbach/wallet/ui/BuyAndSellLiquidUpholdActivity.kt # wallet/src/de/schildbach/wallet/ui/PaymentsPayFragment.kt
* fix: replace currency code with symbols regarding fiat format
#848) * feat: payment method picker * feat: more payment methods and credit card icons * feat: enter amount view * chore: moving currency drawables to common * feat: currency picker * chore: moving card icon resolver in an util class for easier access * fix: kapt build error * chore: converting ExchangeRate to kotlin * fix: duplicated method
* fix: don't show .00 in the input * fix: keeping dash amount static when toggling
merge master to feature-coinbase-integration
Merge master into feature-coinbase-integration
- refactor CoinBaseRepository.kt -> define an interface for the repository and an implementation for the interface - set up web services for payment_methods, place_buy_order, commit_order and send_funds_to_wallet - set Mapper.kt class to map remote data model to the corresponding ui models - update implementation in CoinBaseRepository.kt and CoinbaseServicesViewModel.kt to for buy/commit/send flows * Change Scope to allow read payment-method * Integrate with payment methods * remove duplicate call to set dash amount in CoinbaseServicesFragment.kt - change user authorization scope for coinbase in CoinBaseWebClientActivity.kt - inject wallet data provider in WalletDataProviderModule.kt - update calls to get payment methods, place/commit buy orders and send funds to dash wallet * remove launching of progress dialog from IO dispatcher * Integrate the buy order * Change dialog to base dialog Fragment * Handle Buy Coinbase * Change dialog to base dialog Fragment * Handle transaction success * Handle transaction error * set up unit test for coinbase repository * - merge changes and fix conflicts from `NMA-1131` branch * fix CoinBaseRepositoryTest.kt: remove `quote` field from placeBuyOrder unit test * fix CoinbaseBuyDashOrderReviewViewModel.kt: ensure `_transactionCompleted` is false for `transactionStatusType != completed` * update Constants.kt: set "DASH" string as a constant * set dialog to display more infos on conbase fee * show dialog to show help information regarding coinbase fees * display retry button with icon to retry failed purchase * show loader on failed transfer screen when retrying the transfer of funds to wallet * ensure no instance of exists before loading a new one * hide currency selector/picker during buy dash flow * update implementation to refresh token * hide currency selector in AmountView.kt for buy & sell dash flow * bugfix: refresh timer and text label after countdown is reached * fix empty strings as default values for PlaceBuyOrderUIModel properties if any of those are found to be empty * use custom dialog to confirm the cancelling of a transaction when buying dash * update design for cancel and confirm/retry buttons * update ui for coinbase fee info * use NavController to handle navigation in CancelTransactionDialog.kt and CoinbaseFeeInfoDialog.kt * update CoinbaseBuyDashOrderReviewFragment.kt -> update click handling to display coinbase fee help webpage * remove duplicate setting of background for CancelTransactionDialog.kt and CoinbaseFeeInfoDialog.kt * refresh access token for any failed request * use response code to check the state of the transaction * resume EnterAmount screen for a failed/cancelled dash purchase * handle CoinBaseErrorDialog.kt using navcontroller * set the click on the `retry` button to attempt to get a new buy order * redirect to EnterAmount screen when user clicks on `cancel` button * set error message for failed purchase from order preview flow * redirect to main portal screen when user clicks close button after a failure * disable usage of local access & refresh tokens * set coinbase amount limit to $500/month * redirect to coinbase portal upon successful login via coinbase * redirect to wallet home screen after successful transfer of dash wallet * set min_amount and send_limit_period for coinbase client * resume home screen upon successful purchase & transfer to wallet * update CoinbaseServicesViewModel creation instance * ensure safe navigation from fragment to CoinbaseErrorDialog * remove FancyAlertDialogViewModel.kt * update FancyAlertDialog event listener * update other style names having color code red300 * update style name Headline5_Bold_Red to Headline5_Bold_Red300 * update implementation to hide/show currency selector in EnterAmount UI Co-authored-by: hadia <[email protected]>
…om a service (#860) * remove vertical padding in Buy & Sell Dash UI * observe coinbase logout with livedata * update implementation to open Coinbase portal upon coinbase authentication * disable the Disconnected state for failure in coinbase login * handle scrolling behavior for services on which user is logged in
# Conflicts: # wallet/src/de/schildbach/wallet/ui/SetPinActivity.kt
* feat: payment method picker * feat: more payment methods and credit card icons * Change Scope to allow read payment-method * Integrate with payment methods * remove launching of progress dialog from IO dispatcher * Integrate the buy order * Change dialog to base dialog Fragment * Handle Buy Coinbase * Change dialog to base dialog Fragment * Handle transaction success * Handle transaction error * set up unit test for coinbase repository * set dialog to display more infos on conbase fee * - show dialog to show help information regarding coinbase fees - display retry button with icon to retry failed purchase * show loader on failed transfer screen when retrying the transfer of funds to wallet * ensure no instance of exists before loading a new one * hide currency selector/picker during buy dash flow * - set temp values for access and refresh tokens - update implementation to refresh token - hide currency selector in AmountView.kt for buy & sell dash flow * - provide new access and auth tokens - bugfix: refresh timer and text label after countdown is reached - fix empty strings as default values for PlaceBuyOrderUIModel properties if any of those are found to be empty * - use custom dialog to confirm the cancelling of a transaction when buying dash - update design for cancel and confirm/retry buttons - use NavController to handle navigation in CancelTransactionDialog.kt and CoinbaseFeeInfoDialog.kt - refresh access token for any failed request - refactor flow to send dash to wallet * resume EnterAmount screen for a failed/cancelled dash purchase * set error message for failed purchase from order preview flow * redirect to main portal screen when user clicks close button after a failure * disable usage of local access & refresh tokens * Create VerticalSegmentedPicker * Add Swap Services to repo * Add convert and preview UI * Update permission scope * Update To use coil * Update To ConvertView * Update UI * disable keyboard button * solve convert issue * add buy coinbase Dialog * update token * Add check * Fix search index * Fix back issue * fix : swap clicked * fix : Replace dash to DASH_CURRENCY
* add support for v3 transactions that come from coinbase
* fix: auth limit dialog layout * fix: lockscreenbutton copyright
…#899) * fix: Fiat decimal precision * fix: decimal point crash * fix: HeadersInterceptor * fix: fix max button issue
…drawal limit (#902) - remove unused coinbase preferences - display an appropriate error message for input amount greater than withdrawal limit - handle crash caused by ArithmeticException after user input amount to be sent - set responseMessage to null value in coinbase swap flow - update the implementation to display appropriate error message for input amount greater than withdrawal limit - reproduce implementation for Convert-Crypto flow - fix CoinBaseRepositoryTest.kt - remove unused test files from explore-dash module plus duplicate CoinBaseRepositoryTest.kt
* fix : Convert Dach to Crypto * fix : enter amount in default fiat currency * fix : BASE ID LOADING AT THE START * fix : Reload base id in case of error * fix : Rename * fix: removing loading dialog for user accounts and exhcange rates loading Co-authored-by: hadia <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 22, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 22, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 23, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 23, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 24, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
… sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
… sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
… sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 25, 2026
… sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 27, 2026
int23 is integration/v42int23 @ 60ddbf8e6c: int22 with v4.2-dev @ 2498727049 merged in (108 upstream commits, 4.2.0-beta.4) plus platform#4302, which persists the DashPay backfill record on the wallet row (Room 14 -> 15) so a relaunch resumes from the restored cursor instead of rewinding to the earliest contact's height on every launch. Engine pin d20ecf6a = int22's 9d1804d6 (e4208c90 + #979 without the durable sweep + #1035 + #1015 + #1016) + e5c74fc3 (IS-locked mined tx stays promotable) + #1059 (reject a ChainLock the list refuses) + #1063 (defer a ChainLock until the masternode lists reach it). Correction to the int22 commit message: int22 already carried #1016; the sweep was gone there too. AAR sha256 5fa7b33dc21334f1, natives arm64 750fb0bca4d374ea / x86_64 054d4b24f4695134, 271 JNI exports, per wallet-snapshots/BUILD-RECIPE-v42int23.md. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 27, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 27, 2026
… sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 27, 2026
int23 is integration/v42int23 @ 60ddbf8e6c: int22 with v4.2-dev @ 2498727049 merged in (108 upstream commits, 4.2.0-beta.4) plus platform#4302, which persists the DashPay backfill record on the wallet row (Room 14 -> 15) so a relaunch resumes from the restored cursor instead of rewinding to the earliest contact's height on every launch. Engine pin d20ecf6a = int22's 9d1804d6 (e4208c90 + #979 without the durable sweep + #1035 + #1015 + #1016) + e5c74fc3 (IS-locked mined tx stays promotable) + #1059 (reject a ChainLock the list refuses) + #1063 (defer a ChainLock until the masternode lists reach it). Correction to the int22 commit message: int22 already carried #1016; the sweep was gone there too. AAR sha256 5fa7b33dc21334f1, natives arm64 750fb0bca4d374ea / x86_64 054d4b24f4695134, 271 JNI exports, per wallet-snapshots/BUILD-RECIPE-v42int23.md. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 28, 2026
int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 28, 2026
… sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 28, 2026
int23 is integration/v42int23 @ 60ddbf8e6c: int22 with v4.2-dev @ 2498727049 merged in (108 upstream commits, 4.2.0-beta.4) plus platform#4302, which persists the DashPay backfill record on the wallet row (Room 14 -> 15) so a relaunch resumes from the restored cursor instead of rewinding to the earliest contact's height on every launch. Engine pin d20ecf6a = int22's 9d1804d6 (e4208c90 + #979 without the durable sweep + #1035 + #1015 + #1016) + e5c74fc3 (IS-locked mined tx stays promotable) + #1059 (reject a ChainLock the list refuses) + #1063 (defer a ChainLock until the masternode lists reach it). Correction to the int22 commit message: int22 already carried #1016; the sweep was gone there too. AAR sha256 5fa7b33dc21334f1, natives arm64 750fb0bca4d374ea / x86_64 054d4b24f4695134, 271 JNI exports, per wallet-snapshots/BUILD-RECIPE-v42int23.md. Co-Authored-By: Claude Fable 5.1 <[email protected]>
HashEngineering
added a commit
that referenced
this pull request
Sep 29, 2026
* fix(shielded): bound stop() so a bring-up parked in the native bind cannot hang the service shutdown Andrei, 2026-09-22 (SM-A536B, release 12000017): after a blockchain reset cleared the ready latch, the next bring-up entered bindShielded and the SDK parked it behind a resumed wallet shield waiting indefinitely for a ChainLock (shield_guard, rs-platform-wallet). When the idle detector then stopped the service, ShieldedBalanceServiceImpl.stop() waited on the bring-up mutex forever, the service's onDestroy never finished, and every later start refused itself as a "deadlock in onDestroy" — the L1 engine stayed off for four hours. Plan section 37. stop() now waits at most STOP_LOCK_TIMEOUT_MS (5 s) for the lock and tears the Kotlin side down without it. A stopGeneration counter, bumped by every stop, lets the abandoned bring-up recognise on return that it was superseded: it reports not-ready and starts nothing, and the next trigger binds afresh. Nothing is stopped natively in that branch — the sync loop is only started after the bind, which has not returned. Tests: the parked-bind case (stop returns inside its bound, stops nothing natively, the abandoned bring-up is inert, a fresh bring-up then succeeds) and the uncontended path unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(service): end the process when a refused start finds the previous cleanup stuck past 5 min in the background BlockchainServiceImpl.onCreate rightly refuses to start while a previous instance's cleanup is unfinished, but nothing ever gave up on a cleanup that was never going to finish. On 2026-09-22 twelve alarm-driven starts over four hours each logged "deadlock in onDestroy" and stopped themselves while the process lived on with the engine off. Plan section 37. The refused start now measures how long the active cleanup has been stuck (cleanupStartedAtMs, set when cleanupDeferred is created). Past CLEANUP_DEADLOCK_EXIT_MS (5 min) with the app in the background it ends the process, so the next start — the alarm or the user — begins from a clean one. Never while the app is visible: that start is the user's own, and exiting would close the app on them; they get the refusal as before. decideOnCleanupDeadlock is pure and pinned on both axes. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: section 37 — the 2026-09-22 shutdown deadlock; QA A-02; platform issue 17 drafted Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(plan): section 34 corrected — the final-batch park is dash-spv's committed-range sweep, not a stuck block fetch Andrei's 2026-09-22 engine log settles it: the final batch's 65 matched blocks were all processed within six seconds, and the batch still did not commit for seven minutes. The line in between is `Rescan committed filters (934848-2539848) … (sweep #1)`: before committing the last batch, dash-spv re-tests every filter since wallet birth against the scripts derived during the scan, inline on the filter task, with no persisted progress. At P=19, M=784931 a 13,024-script set false-matches 1.66% of all 1.6M mainnet filters — ~26,000 block fetches for nothing — and a phone never finishes before something stops the engine. Our own integration-branch commit 80e07b8f (durable pending-sweep set, #979) re-seeds the set at every start, which is why the park recurs identically after every restart. Already open upstream: rust-dashcore#1002 describes this wallet shape; rust-dashcore#1016 (dash-spv owner, draft) drops the sweep. The issue draft this section promised is retired in favour of a comment there. Also: the 06:08 watchdog restart in the same log was a device-offline stall (all peers ping-timed out, DNS down 21 min, new network at 06:21:49), not an engine defect. The four app log lines and KDocs that stated the pending-block story are reworded; no test asserted on them. Co-Authored-By: Claude Fable 5.1 <[email protected]> * build: SDK 0.1.0-v42int22-SNAPSHOT int22 is the int21 engine pin d525f431 plus two cherry-picks: rust-dashcore #1015 (key-wallet: re-apply a spend whose coin was funded after it) and the block-counter fix that stops re-applications inflating `processed`. It does NOT carry #1016: the committed-range sweep and our durable pending-sweep set are both still present, so the plan §34 final-batch park is unchanged on this build. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: 2026-09-22 evening evidence — int22 restores on both devices; the per-launch re-walk is the DashPay backfill, not a park Plan §38: emulator (debug 12000017) and Samsung (release 12000018) both restored the job flower wallet on int22 to the correct seed with no watchdog verdict, stall WARN or restart; the emulator's engine log shows no committed-range sweep this time, with the ordering hypothesis stated as such. Plan §34.1a corrected and §38.2: the 1,532,170 re-walk boundary seen on every emulator session is coreHeightCreatedAt of the wallet's earliest DashPay contact request; rs-platform-wallet's reconcile_dashpay_rescan rewinds synced_height to it at every startup behind an in-memory guard (dashpay/platform#4302, PR #4740). The mod-5,000 residue the earlier text read as a batch-boundary park is the batch grid anchored at that start. QA: A-01 gains the int22 restore evidence; A-03 records the per-launch re-walk as an SDK defect; header and summary updated. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(service): arm the periodic restart alarm at service start, not only at clean stop The alarm had one call site: WalletApplication.scheduleStartBlockchainService from onDestroy's cleanup coroutine, at the "detaching from wallet" step after the onCreate latch and the check-mutex acquisition. A kill that lands before that step leaves the wallet with no pending restart. Samsung SM-S901U, 2026-09-22: synced at 17:39, task swiped ~17:43 (deferred while the service was started), idle stop 17:47:01.0, deferred "remove task" kill at 17:47:01.2 — 600 ms into cleanup. dumpsys alarm then listed no alarm for the app's uid, and 70 minutes later there was still no process on an awake, charging, battery-exempt device. lowmemorykiller on a cached process gives no onDestroy at all and has the same effect. Plan section 36.6. onCreate now arms the alarm after the foreground promotion. The scheduler cancels and replaces its own PendingIntent, so the two arms are idempotent, and a start delivered while the service is already running is an ordinary onStartCommand. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(shielded): cancellation-safe bounded lock in stop(); fence the whole bring-up against a stop that timed out Two review findings on the bounded stop. Lock leak at the timeout boundary: `withTimeoutOrNull { lock.lock() }` can deliver ownership to this coroutine while the timeout still wins the completion, returning null with the lock held and nothing to release it — on this singleton every later bring-up would then wait forever. stop() now acquires with a tryLock poll (tryLockWithin): tryLock is non-suspending and atomic, so ownership and the result cannot disagree, and the only suspension is the poll delay, during which nothing is held. Fence: the generation guard covered configure/bind only. A bring-up past it could be parked in the native sync-loop start when stop() timed out and tore the Kotlin side down; on return it published ready and started the collectors and the pending-shield sweep over the teardown. And hasShieldedSupport()/boundWalletIdOrNull() call ensureStarted(), so a stop in that bootstrap interval was absorbed by a snapshot taken later. The generation is now sampled first and re-checked after every native step; a superseded bring-up stops the loop it started (or found running) and declines. Tests: a bring-up parked in the native loop start is superseded by stop(), stops the loop it started and declines, and a fresh bring-up is whole again; a stop during the bootstrap interval aborts the bring-up before it binds. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(shielded): the stop fallback bumps the generation again so a bring-up that took the lock mid-poll is superseded too A second bring-up queued on the lock wins the handoff over stop()'s tryLock when the first releases, and snapshots the generation stop had already produced at entry. If it then outlasts the timeout, the fallback teardown left its snapshot equal to the current generation, so it started the loop and published ready over the teardown. The fallback now bumps the generation once more before tearing down, so every snapshot taken during the poll window is stale by the time the teardown runs. Test: stop_fallbackAlsoSupersedesASecondBringUpThatTookTheLockDuringItsPoll — two bring-ups gated in their native binds around a polling stop; both decline, no loop starts, a fresh bring-up afterwards is whole. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: section 39 — Joel's upgrade to 12000017, the three rewinds, the sweep at 67,658 scripts; QA J-01 Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(plan): section 39.3 — the anchor against the binder's receivedContactFloor; the backfill gate is the no-op binding Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(service): take the per-minute memory sample off the main thread Debug.getPss() walks /proc/self/smaps, and on the reference install's 2 GB replay process that held the main thread — inside the tick broadcast receiver — for 5 s or more, four times in one evening (plan §39.6). The sample now runs on the service scope, one in flight at a time; a slow one skips ticks rather than queueing behind itself. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: int22 is the #1016 build — correct section 38's pin and its "no sweep" reading; what int22 changes for Joel's wallet The AAR's native-library hashes are the recipe's #1015 + #1016 build (9d1804d6), not the #1015-only 08c0c04e that section 38 named; the 09-22 debug APK and the 09-23 release APK were both built against it. Section 38.1's provisioning-order explanation for "no sweep tonight" was wrong: there is no sweep in int22. Section 39.4 separates the scan's own matching (438–817 blocks per batch) from the sweep's additions (up to 800), and 39.7 / QA J-01 now say what 12000018 would and would not change. Co-Authored-By: Claude Fable 5.1 <[email protected]> * feat(sync-status): the header percentage measures the session's work, in tenths Over the whole chain the figure said nothing: a rewind to 2,167,092 under a 2,544,483 tip read 95.1 → 99.9% for three hours, and the 27,000-block re-walk every launch pays sat at 99% from start to finish (Joel, 2026-09-25, plan §39.8). ShadowSyncProgress carries the session's floor — the lowest header and filter cursor reported since the engine started, a running minimum so the DashPay backfill's rewind a few seconds in lowers it — and shadowSyncPermille measures progress over [floor, target]. A fresh restore (floor 0) reads as before. The persisted percentageSync stays a whole number for its == 100 consumers; L1SyncUiStatus gains percentageTenths and the home header shows "99.1%" / "99.9%" ("100%", never "100.0%"; dashj's whole number pre-cutover). The 100 decision is unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(plan): 39.9 — topple restored on int22; the session percentage observed on screen; the balance question Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: topple's balance reconciles exactly against dashj; int22 as published carries the recipe's §5 mid-sync-kill fund loss Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: 39.10 — the int22 mid-sync kill reproduced on this build, 0.449 DASH across seven change outputs Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(plan): 39.10 correction — the resumed process runs at the default gap; the kill run was confounded by the once-only widening Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(sdk-bind): re-apply the address-window widening on every bind, not once per heal version The Rust side keeps AddressPool::gap_limit in memory only — no changeset, no persistence — so every fresh process and every re-created SDK wallet comes up at the defaults (30 for BIP44, 100 for CoinJoin). The widening to 1000 ran once per heal version, so a process killed mid-scan resumed at the defaults and never rediscovered the outputs paid to change addresses the killed session had derived past used + 30: the kill-test fund loss of 2026-09-23 and 2026-09-25 (plan §39.10), which only the now-removed committed-range sweep (rust-dashcore#1016) used to mask. The widening now runs on every bind, before the engine starts; the heal's retroactive half (the rewind to birth and the coverage invalidation) stays once per version. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: the every-bind widening proven by the kill test — store identical to the clean control Co-Authored-By: Claude Fable 5.1 <[email protected]> * build: SDK 0.1.0-v42int23-SNAPSHOT int23 is integration/v42int23 @ 60ddbf8e6c: int22 with v4.2-dev @ 2498727049 merged in (108 upstream commits, 4.2.0-beta.4) plus platform#4302, which persists the DashPay backfill record on the wallet row (Room 14 -> 15) so a relaunch resumes from the restored cursor instead of rewinding to the earliest contact's height on every launch. Engine pin d20ecf6a = int22's 9d1804d6 (e4208c90 + #979 without the durable sweep + #1035 + #1015 + #1016) + e5c74fc3 (IS-locked mined tx stays promotable) + #1059 (reject a ChainLock the list refuses) + #1063 (defer a ChainLock until the masternode lists reach it). Correction to the int22 commit message: int22 already carried #1016; the sweep was gone there too. AAR sha256 5fa7b33dc21334f1, natives arm64 750fb0bca4d374ea / x86_64 054d4b24f4695134, 271 JNI exports, per wallet-snapshots/BUILD-RECIPE-v42int23.md. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(sync): debug builds stop the SDK engines on service teardown, like release The debug-only branch kept the Kotlin-SDK SPV and shielded-sync engines running across BlockchainService teardown so a warm SPV would skip the asset-lock islock-verification delay after an idle restart. It also made a debug build's service restart a different event from release: the engines never restarted, so a normal teardown could not exercise the engine-restart path at all. The int23 contact-rewind investigation (wallet-snapshots/2026-09-25-topple-int23-run2-relaunch) needed exactly that path. Debug now tears down like release; the wipe/reset paths are unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix(anr): cut the three logcat amplifiers behind the emulator ANR kills On 2026-09-25 the testnet wallet died twice of background ANRs on Pixel_9 ("No response to onStartJob", then a sticky restart that failed process startup). The main thread was blocked in GreedyScheduler.schedule waiting for WorkManager's lock, held by a WM thread stuck in Log.println_native: logd was saturated, and the wallet itself was the source — 11,800 lines in five minutes from one process. - WorkManager minimum logging level VERBOSE -> INFO. Its debug logging runs under the scheduler lock that the main thread takes on every schedule() call. - AnrException.logProcessMap logs the unresponsive thread only, not the full ~150-thread map. The ANR supervisor re-fires every 5 s while the UI thread stays slow, so the map was ~5,000 lines per five minutes and made the stalls it reported worse. printProcessMap(PrintStream) is unchanged for reports that want everything. - SecurityGuard.logState once per process. It ran from the constructor AND every getInstance(), and the 15-second platform sync pass calls getInstance(), so the six-line key inventory landed 183 times in five minutes. Co-Authored-By: Claude Fable 5.1 <[email protected]> * build: SDK 0.1.0-v42int24-SNAPSHOT int24 is int23 (integration/v42int23 @ 60ddbf8e6c, engine d20ecf6a) plus the #4302 second pass from fix/persist-dashpay-backfill-completion-int23 @ 8fee97fe4e: the outbound contact-account marker (external_account_reference) is persisted on the contact rows, outbound registration no longer lowers synced_height, receival registration consults the backfill record and writes it in the same round it lowers, and record_pass no longer invents an extent. Device result on the topple wallet (Pixel_9, 21 contacts, restore from seed): first launch scanned once from birth and reconciled exactly against the clean control (1083 coins, 169.02812043, 21,227 watched); the cold restart did no filter walk at all — FiltersSyncComplete at the tip within a second, reconcile "record covers these contacts" with synced_height=1561118, zero external account rebuilds. int22/int23 re-walked 334,220 filters on every launch. Snapshot: wallet-snapshots/2026-09-26-topple-int24-restore/. AAR sha256 aac9ec1347901ccc, natives arm64 d3b059da45bbee6f / x86_64 fd308c0fe0525d54, 271 JNI exports; wallet-snapshots/BUILD-RECIPE-v42int24.md. Co-Authored-By: Claude Fable 5.1 <[email protected]> * build: SDK 0.1.0-v42int25-SNAPSHOT int25 is int24 (8fee97fe4e) plus 73c221cd36 (late-discovery test) and 71cee8e9da (Room schema collapse): the DashPay backfill columns and the outbound contact-account marker fold into MIGRATION_13_14, version 14, 15.json deleted. Native libraries are byte-identical to int24 (arm64 d3b059da45bbee6f / x86_64 fd308c0fe0525d54); only the Kotlin publish changed. Field installs (int22 = Room 13) migrate in one step; int23/int24 emulators need a wipe. Device result, the field upgrade path on the topple wallet (Pixel_9): an int22 Room-13 store (21 contacts, no record, no markers) dropped under this build migrated 13 -> 14 cleanly; the 8 outbound accounts rebuilt once without touching the cursor; reconcile lowered ONCE with the real pair (floor=1226329 rewound_from=1560555); killed at the 40th commit of the climb (1441329); the relaunch resumed at scan_start=1436330 = persisted+1 with the record intact, pending=true, zero rebuilds, and reached the tip 38 s later; the store reconciled exactly against the clean control. Snapshot: wallet-snapshots/2026-09-26-topple-int22-to-int25-upgrade/. Co-Authored-By: Claude Fable 5.1 <[email protected]> * build: SDK 0.1.0-v42int26-SNAPSHOT int26 is int25's line — every int carry, engine d20ecf6a, the #4302 second pass — with origin/v4.2-dev @ 2f54ec88eb merged (16 upstream commits, all drive / drive-abci / platform-version; grovedb -> dce8252f) and the Room schema collapse reverted: Room is 15 on upstream numbering again (14 = the #4829 token column, 14.json identical to upstream's; 15 = the four DashPay backfill columns), so a later rebase onto an upstream carrying the merged PR cannot hit a duplicate-column migration. Field installs (int22 = 13) migrate 13 -> 14 -> 15. Device result on the topple wallet (Pixel_9): an int22 Room-13 store under this build migrated cleanly; reconcile lowered once (floor=1226329, rewound_from=1561246); the 8 outbound accounts rebuilt once without touching the cursor; a kill at the 40th commit (1416329) resumed at scan_start=1411330 with the record intact and zero rebuilds; the final store reconciled exactly against the clean control; a cold start did no filter download. Snapshot: wallet-snapshots/2026-09-26-topple-int22-to-int26-upgrade/. AAR sha256 e9a79b40772247f1, natives arm64 ef3cc9d480f268ac / x86_64 903fa81909ff6ef4, 271 JNI exports; wallet-snapshots/BUILD-RECIPE-v42int26.md. Co-Authored-By: Claude Fable 5.1 <[email protected]> * chore: bump version code to build 19 * fix(shielded): fence the bring-up after the prover warm-up and after publishing ready warmUpProver() suspends after the last generation check. A stop() that timed out on the lock while it was outstanding had already torn the Kotlin side down; when warm-up returned, the bring-up published ready anyway, left the native loop running, and let ensureShieldedReady() restart the collectors and the pending-shield sweep over the teardown. The bring-up now re-checks the generation after warm-up and, when superseded, stops the loop it started and declines. It also verifies once more after publishing: the fallback bumps the generation before it clears the latch, so either the verify sees the bump and withdraws the publish, or the clear lands after the publish and removes it. Warm-up no longer swallows cancellation. Regression test holds warm-up open until stop()'s fallback completes; it fails on the previous code ("superseded during warm-up: not ready"). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(shielded): a timed-out stop leaves the native loop's stop owed to the lock No generation check closes the window after the last one: a bring-up that published ready and passed its final verify can still stall holding the lock (a slow log write). A stop() that times out then cleared the latch but could not reach the native loop, and nothing owed that loop a stop — later stops returned early on the null latch. The fallback now records the stop as owed and hands it to the lock: whoever releases or next takes it pays. Both sides set-then-check (the fallback sets the debt then tries the lock; a holder unlocks then checks the debt), so one of them always sees the other. A bring-up whose stop was paid on release returns false, so the caller starts no collectors or sweep. Loop ownership is tracked explicitly, so stop() also stops a loop a failed bring-up started without ever publishing ready. Regressions: park after the final check, complete the stop, release, the loop is stopped exactly once; and a start that throws after the loop began leaves a loop the next stop() stops. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(anr): label the saved stack with its own thread; test the debug teardown as it is now AnrException printed the monitored thread's stack under Thread.currentThread() — the monitor coroutine's thread — and still called Thread.getAllStackTraces() every 5 s only to count threads. It now keeps the constructor's thread and prints no count. PlatformSyncEngineTeardownTest still asserted the removed debug exemption (zero engine stops on shutdown); it now asserts both engines stop on the debug unit-test variant. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(sdk-bind): a failed widening owes a rescan to the next successful one On a wallet that healed long ago, a bind whose address-window widening failed went on to scan that session at the Rust default windows, and the next launch's successful widening skipped the heal — so outputs beyond the default window in the blocks that session covered were never looked at again (the plan §39.10 loss, through the failure branch). The failure is now persisted (SDK_GAP_WIDEN_RESCAN_OWED); the next successful widening arms the SPV rescan to birth and only then clears it. A failed arm keeps the debt; the one-shot heal's own rewind clears it too. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(shielded): widen the two-bring-up handoff test's stop timeout so a slow runner cannot reorder it The test needs stop() still polling when the first bring-up's bind returns (~150 ms in); at 400 ms a slow CI runner could time out first, after which the queued bring-up legitimately samples the post-stop generation and starts. 2 s keeps the intended interleaving. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(anr): keep the constructor's Javadoc on the constructor; tolerate a null transient thread The saved-thread field landed between the constructor and its Javadoc. The field is transient, so a deserialized copy has no thread: print its frames unlabelled instead of throwing inside the ANR logger. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(shielded): sample the bring-up generation before paying an owed stop; scope debts to their generation A queued bring-up sampled its generation only after draining an owed native stop, and that drain suspends in the native stop call. A second stop timing out during the drain was absorbed: the bring-up sampled the bumped generation, bound, started a replacement loop, published ready, paid the second debt on release (stopping that loop) and still returned true over the teardown. The sample now happens the moment the lock is taken, before the drain. The debt was also a bare flag, so paying it tore down whatever held the lock, including a bring-up that sampled after the stop. It now carries the stop's final generation, and paying it stops only a loop (and clears only a ready latch) owned by an older generation. Regression: #1 parked past its last check, stop A times out, #2 queued (UNDISPATCHED, so provably before #1 releases) pays A's debt and parks in the native stop, stop B times out; #2 must decline without binding. It fails with the old sampling order. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(shielded): scope the stop fallback's Kotlin teardown to runtimes older than the stop The fallback cleared the ready latch unconditionally. If it paused after its final generation bump, a bring-up that sampled after that bump could bind, start and publish; the teardown then cleared that newer runtime's latch while the generation-scoped debt rightly spared its loop, leaving a loop running with no readiness. Publication and teardown are now atomic with respect to each other (readyMonitor), and the fallback and the owed-stop drain clear the latch only when it was published by an older generation. Regression: park the fallback after its bump, complete a newer bring-up, resume; the newer runtime stays ready and its loop is not stopped. It fails with the unconditional teardown ("expected 2 binds but was 3"). Also: stopSdkEngines' KDoc no longer claims debug builds skip the engine stops on shutdown. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(sync): judge a filter-stall restart by whether the cursor passes the stuck height (QA D-901b) The filter-stall watchdog logged "engine restart succeeded" as soon as the new engine started. In QA run 9 it logged that twice against a filter cursor that never left 948,000. A restart now arms FilterStallRestartVerifier instead. It reports RECOVERED only when the cursor passes the stuck height (a restarted engine resumes below it from the durable watermark, so merely moving is not recovery), and NOT RECOVERED when the watchdog is about to act on a stall again, or stand down, without that having happened. The not- recovered line says whether the cursor wedged again at the same height and how many consecutive restarts failed there: the deterministic shape that points at persisted SPV state rather than a transient condition (D-901). Logging only; the restart ladder is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(shielded): an owed native stop survives its draining caller being cancelled A queued bring-up pays an owed stop in its caller's context. The drain cleared the debt and the loop ownership BEFORE the native stop ran, and the SDK dispatches that stop through withContext(Dispatchers.IO), which a cancelled caller skips. Cancelled at that point (a view-model scope going away), both markers were gone with the loop still running, and every later stop() returned early. The native stop now runs non-cancellably. Loop ownership is cleared only once the SDK call returns successfully, so a failed stop is retried by the next stop(). The debt is cleared by compare-and-set after the attempt, so a newer debt recorded meanwhile survives. Regressions: cancel the queued bring-up while it is inside the native stop of its drain, and the loop still ends up stopped; a failed native stop is retried by the next stop(). Both fail on the previous code. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(shielded): pay an owed stop on a cancelled lock handoff; start collectors and the sweep only for the committed runtime Two remaining gaps in the bring-up/stop protocol, found in an adversarial pass over it: - A queued bring-up cancelled AFTER the mutex was handed to it: kotlinx's prompt-cancellation path releases the lock itself, skipping releaseLock(), and the previous holder's handoff had already lost its tryLock to that handoff. A debt from a timed-out stop then sat unpaid with the lock free and the old loop running. The acquisition now pays any owed stop before rethrowing the cancellation. - ensureShieldedReady() started the collectors and the pending-shield sweep after the lock was released, so a stop landing in between could be followed by them starting anyway, and the untracked sweep could resume a wallet shield after that stop. They now start under readyMonitor and only while the runtime this pass committed is still the published one; the sweep's Job is tracked and cancelled by teardown. (Pre-existing window, now closed.) Regressions for both; each fails on the previous code. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(shielded): wait for the sweep callback to end before asserting it was cancelled The sweep-cancellation test slept a fixed 200 ms before asserting, so on a slow runner an uncancelled sweep could still set its flag afterwards and the test would pass. The callback now signals completion on both outcomes and the assertion waits for it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(service): start the cleanup deadlock clock at the claim and clear it when that cleanup ends The plan §37 exit policy measured a stuck cleanup from a timestamp set only after the cleanup had waited for its instance's initialization, and never cleared. A cleanup stuck in that wait read 0 ms, so a refused start never reached the five-minute exit; and after a cleanup finished, a later refused start could be measured against the old timestamp and end the process early. CleanupDeadlockClock now starts when a cleanup claims isCleaningUp, before the initialization wait, and that same owner clears it in its finally by compare-and-set on the token start() returned, so a stale finish cannot clear a newer owner's clock. Also refreshes two comments the review flagged as stale: AnrException's logProcessMap Javadoc (it logs one thread now) and the wipe path's note about the removed debug engine-stop exemption. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(service): put the cleanup-deadlock policy KDoc back on decideOnCleanupDeadlock CleanupDeadlockClock and its KDoc had been inserted between the policy KDoc and the function it documents, leaving that block dangling. The clock now sits above it. No code change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(service): make the final foreground check and the §37 process exit one main-thread step The refused-start path read AppForegroundMonitor on Dispatchers.IO, logged, then called Runtime.exit(). Activity lifecycle callbacks update that monitor on the main thread, so an activity starting between the read and the exit could have its now-visible app closed on a stale snapshot. endProcessIfStillBackgrounded() now re-reads visibility and exits in the same main-thread task, with nothing between them; the stuck-cleanup line is logged before it. Regressions drive it on a StandardTestDispatcher: the app foregrounding after eligibility but before the main-thread decision runs is never exited; still backgrounded, it exits; below the bound it never does. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(sdk-bind): hold the SPV scan when a failed widening's rescan debt cannot be recorded On an already-healed wallet, a failed address-window widening followed by a failed DataStore write left neither wide windows nor a durable rescan obligation, yet the bind continued and SPV scanned at the default windows. The next launch's successful widening found no debt, so outputs beyond the default window in the blocks that session covered could stay missing. The debt write now reports failure, and SdkWalletBinder.ensureScanMayAdvance is the scan-start gate: while the windows are narrow and the debt is unrecorded it retries the widening, then the write, and returns false only when both fail again. L1ShadowSyncService.startIfEnabled declines the SPV start on false; its next trigger asks again. Recorded debt or wide windows leave the gate open, so the normal best-effort bind is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(sdk-bind): the scan gate widens the windows itself and a refused start retries on its own Two gaps in the widening-debt scan gate: - It was open while widening was still pending, and before any bind pass in the process. A start in that window (a shield's ensureSpvRunning during a rebind, say) could scan at the default windows before the widening failed and the flag closed. The gate now guarantees the outcome instead of checking a failure flag afterwards: it widens the loaded wallet itself when this process has not (widening needs no seed), falls back to recording the debt, and declines only when both fail. It shares a lock with the bind's own widening step, so a start during that step waits for its result. Re-creating the SDK wallet clears the per-wallet state, since the new wallet is at the defaults. - A refusal had no continuing recovery: the one-shot post-bind starter had already spent itself, so sync could stay stopped after the failures recovered. A refusal now schedules its own start retry (30 s doubling to 5 min, one in flight, cancelled by an external stop() and when the gate opens). The gate call is bounded under the engine mutex. Tests: the gate widens before any bind pass, waits for a widening in progress, and widens again after wallet re-creation; a refusal retries until the gate opens with no other trigger; stop() cancels the retry. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(sync): a scan-gate retry carries its originating start's stop generation The retry sampled externalStopGeneration when it was scheduled, after the suspending gate call. A stop() landing while an ordinary start was parked in the gate bumped the generation, cancelled the retry recorded at that moment (none), and waited for the mutex; the refusal then scheduled a new retry carrying the NEW generation, which stop() never cancelled, and SPV restarted after the stop had completed. startIfEnabled now samples the generation before any suspending work, declines to schedule when it has already moved, and hands that original generation to the retry, so any stop after the start began keeps the engine down. Regression: park a start inside the gate, stop(), release the gate with a refusal, open the gate; SPV never restarts. It fails on the previous code (1 start after the stop). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
3 of 7 tasks
4 of 8 tasks
4 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Merge coinbase into master
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: