Repository navigation
Merge master into feat/kotlin-sdk-phase-1 (v11.9.1, DashSpend lost-reply recovery ported to SDK) - #1616
Merged
HashEngineering merged 6 commits intoOct 27, 2026
Conversation
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.
Merges
masterintofeat/kotlin-sdk-phase-1, bringing master's 4 commits (v11.9.1) onto the Kotlin SDK Phase 1 branch.Where the diff size comes from (what to review)
The merge adds +9,312 / −729 lines against
feat/kotlin-sdk-phase-1. Almost all of it is master's own content, already reviewed on master:#1560 by itself is +5,735 / −380 on master (3,370 of it tests).
Lines written during conflict resolution (
git show --remerge-diff 28f6b74f1, i.e. lines that match neither side) total about +1,390. Of those, about 600 are payments source, and that is the new code to focus on:payments/SendCoinsTaskRunner.ktpayments/PendingDirectPaymentVerifier.ktpayments/PendingPaymentEngine.kt(new)common/.../SendPaymentService.ktPaymentProtocolViewModel,DashSpendViewModel,FakeDashSpendService,AppModule,SendPaymentServiceExt,WalletSendPaymentServiceAbout 740 of the resolution lines are tests, mainly
SendCoinsTaskRunnerBIP70Test(+271, rewritten for the SDK harness) andPendingDirectPaymentVerifierTest(+150, SDK engine cases). The rest is the username and invite merges.What's coming from master
fedb593e43b5079b97ef552d410a8de1f079Preserving master's fixes
I checked this mechanically: every line master added in
bde52b520..a8de1f079is either in the merge result, ported, or deliberately dropped below.Build config
build.gradle: both sides already had dashj22.0.5and dpp4.0.1. This branch'sdashSdkVersionis kept.wallet/build.gradle: kept this branch's12000019/12.0.0-sync. Master's11.9.1would move a v12 branch backwards.minSdk 29is unchanged.AppDatabase
TransactionRecordsDaoand one accessor, but no schema change. It sits beside this branch'sinstantSendLockDao().Sha256HashtoTxIdto match this branch's entities. Room's compile-time query check and the real-RoomTransactionRecordsDaoTestpass.#1560, ported onto the SDK send path
New
payments/PendingPaymentEngine.kt. ThePendingPaymentEngineinterface andSdkPendingPaymentEnginegive the verifier what it needs from the SDK: whether the engine has observed the tx (L1SendProbeService.observedTxContext), whether the cutover has committed, a commit throughSdkBridgedTransactionFactory, and broadcast or release of the SDK reservation.PendingDirectPaymentVerifierkeeps master's design:awaitRestoredbarrierforgetTransactionand the wipe guardsunresolvedSubmissionForDifferences on the SDK path:
isSynced()instead of the dashj peer count. That peer group never connects after the cutover, so without this, payments would never release.SendCoinsTaskRunnerwas rebuilt from this branch's version, with master's submission semantics ported in:NonCancellablesubmission, an OkHttp client with no retries, and a one-shot bodyPaymentSubmissionPendingExceptionawaitRestoredon every payment entry pointThis branch's 20s
awaitServerBroadcastObservedrescue is removed, because the verifier now does that job.Bip70AckedDisplayExceptionnow extendsPaymentSubmissionPendingException.Neutral API.
PaymentSubmissionPendingExceptionisopenand carries a hex txId. There is a newPaymentRecoveryMetadata.payWithDashUrl*andpayAndGetTxIdtakerecoveryand asuspend (String)onTransactionCreated. Master'soriginWallet: Walletparameter is gone, because dashj types can't cross into feature modules; the runner captures the wallet itself.DashSpend. Submission state,
payAndRecordOrderand the suspendingsaveGiftCardDummywere ported to String/TxId.PurchaseGiftCardConfirmDialogis master's file with this branch's neutral-type edits re-applied.PaymentProtocolViewModel: the duplicate-invoice guard runs before the prebuilt SDK reservation is submitted, and gives the reservation back when the invoice is already outstanding.BlockchainServiceImpl
awaitPreviousInstanceCleanupshouldStopForMemoryPressurelevelsscheduleRecoveryRestart/cancelRecoveryRestartandBlockchainServiceRecoveryAlarmTest. Master's alarm uses request code 1, the same PendingIntent as this branch'sALARM_REQUEST_CODE_RESTART, so it would replace it. This branch's replay-restart alarm, with its retire policy and cancel-on-wipe, already covers it.isMixingOrPausedand master's notification hunk. CoinJoin is removed here, and that code moved intoupdateSyncNotification.v11.9.1 lock screen / activities
onCreateWithWalletwas already ported on this branch.finishedWithoutWalletis folded into this branch'sfinishedForNoWallet.setupKeyboardBottomMargin,hasNavBar, layout and dimens) and theisInitializedguard inTransactionResultActivity.onDestroy.Username request
checkedUsername/hasAvailableResultForusernameBlockedinusernameSubmitButtonStateInvites (#1587)
InvitationLinkDatakeeps the shielded variant and gainslooksLikeUrl.InviteShareLinklong link with single encoding. One leftover double-encode was removed.InviteCreatedFragmentsharesshieldedLink ?: viewModel.shareLink.Kept deleted
CoinJoinService,CoinJoinActivity,NetworkMonitorActivityandCoinJoinMixingStartTest. Mixing was removed in83ce13ca1, and the network monitor is SDK-backed infe04cc120.SendCoinsViewModelAssetLockTest, becausesignAndSendAssetLockwas removed (Buy Credits is SDK-only).Tests
InvitationLinkDataTest,RequestUserNameViewModelTest(add/add): both suites merged. Master's username cases were moved onto this branch's harness.SendCoinsTaskRunnerBIP70Test: rewritten on the SDK harness, with 9 new cases for master's semantics. 7 new verifier cases cover the SDK engine.PaymentProtocolDuplicateSubmissionTest/PaymentProtocolViewModelRaceTest: rewritten for the SDK flow.DashSpendSubmissionStateTest: ported, minus master's twooriginWallettests.sdk = [29].Open questions (why this is a draft)
Bip70AckedDisplayExceptionnow shows that same generic message, which is slightly off for an acked payment that couldn't be shown.dash:URI gift cards after the cutover (PiggyCards). The SDK builds, signs and sends in one step, so the order is recorded after the broadcast. A process death in that window loses the order. Fixing it means routing these sends through the SDK's deferred build.isSynced()plus a recent chain tip, because the dashj peer count means nothing then. That's a judgement call.forgetTransactiononly checks the dashj wallet. The verifier asks the engine before discarding anything, and DashSpend callsforgetTransactiononly when nothing was sent.WalletApplication.hasWallet()merged in from master but has no caller.wallet/CHANGESv11.9.1 entry merged in as-is.Verification
:wallet:compile_testNet3DebugKotlinand:wallet:compileProdDebugKotlinpass, as do both variants' Java/Hilt compilation and their unit-test compilation, unit-test compilation for common, exploredash, uphold, coinbase, crowdnode and maya, and:integration-android/:sample-integration-android.PlatformSyncEngineRestartTest > resume_isRearmableAcrossRepeatedStopRestartCycles. It is pre-existing and flaky: it fails 2/2 in isolation on unmerged phase-1 and passed in the first merged run.SendCoinsTaskRunnerBIP70Test24,SendCoinsTaskRunnerSdkRoutingTest7,SendCoinsTaskRunnerSelfSpendGraceTest3,SendCoinsTaskRunnerTest2PendingDirectPaymentVerifierTest42,PendingDirectPaymentWipeTest10,PendingDirectPaymentConfigTest27TransactionRecordsDaoTest3InvitationLinkDataTest15,InviteShareLinkTest7RequestUserNameViewModelTest68WalletTransactionMetadataProviderGiftCardTest9,WalletTransactionMetadataProviderObserveTest5PaymentProtocolDuplicateSubmissionTest2,PaymentProtocolViewModelRaceTest3-Drobolectric.conscryptMode=OFF. Without it, every Robolectric test fails withno conscrypt_jniboth before and after the merge. Nothing in the repo was changed for this.ktlintCheckpasses. It covers exploredash, crowdnode, maya and uphold only.feat/kotlin-sdk-phase-1has since gained #1613, a one-line dark-mode label fix in a file this merge doesn't touch, so it still merges cleanly.🤖 Generated with Claude Code