Repository navigation
fix(dashpay): floor contact-account coverage on our own requests (MO-1131) - #1708
HashEngineering wants to merge 1 commit into
Conversation
…1131) Post-cutover, no contact payment address is handed out until every DIP-15 receiving account is in the SDK's backfill record, covered from no later than the account's floor. The app computed that floor as the earliest contact request in EITHER direction, while the SDK covers an account from the earliest request WE sent (receiving_scan_checkpoint): the contact pays to the xpub inside our request, so their request to us bounds nothing. When the contact's request came first, the app demanded coverage from below the height the SDK covers from, so the account never read covered. The check is wallet-wide, so Pay to every contact stayed disabled, silently and permanently. Reproduced on testnet 12.0.2: incoming 1591826, outgoing 1591833, covered from 1591833, required 1591826. - sentRequestFloors(): floors from our outgoing requests only - the uncovered reason names each account with its coveredFrom and the height it needs, so a field log tells a missing entry from a mismatch - regression test with the device's heights Verified on the device: with this change Pay enables for both contacts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Final review complete — no blockers (commit 73a0463) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The change correctly aligns contact-account coverage floors with the SDK's outgoing-request checkpoint rule while preserving fail-closed behavior for incomplete discovery, missing accounts, unreadable records, missing entries, and late coverage. The helper, production caller, and regression test are consistent, and the CI build and check jobs passed. No actionable in-scope findings were identified.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a contained behavioral fix to wallet-wide contact payment eligibility and coverage validation, with meaningful SDK synchronization logic and regression tests, but it does not change a critical surface such as funds movement, cryptography, consensus, or storage migration. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer
Problem (MO-1131)
Post-cutover,
ContactPaymentAddressProviderhands out no contact payment address until every DIP-15 receiving account in the wallet is in the SDK's backfill record, covered from no later than the account's floor (contactHistoryUncoveredBecause, added in #1608).The app computed that floor as the earliest contact request in either direction. The SDK covers a receiving account from the earliest request we sent (
receiving_scan_checkpoint): the contact pays to the xpub inside our request, so their request to us bounds nothing.Whenever the contact's request came first, the app demanded coverage from below the height the SDK covers from, so the account never read covered. The check is wallet-wide, so Pay to every contact stayed disabled, silently (one "Error loading identity" toast) and permanently — no sync, restart or resync clears it.
Reproduced on testnet 12.0.2 (12000204), SDK store read from the device:
coveredFromPay was disabled for both contacts, because the first one fails the wallet-wide check.
Change
sentRequestFloors(): a contact's coverage floor comes from our outgoing requests only (the SDK's own rule). Still fails closed: a receiving account exists only for a contact we sent a request to, so every account has a floor; unfinished discovery, a missing account, an unreadable record, a missing entry and coverage starting too late all still refuse.coveredFrom, required height), so a field log tells a missing entry from a floor mismatch.contactHistoryCovered_whenTheContactsRequestCameFirst).Verification
ContactPaymentAddressProviderTest83/83,SdkWalletBinderTest138/138.source=SDK, and Send enables at 0.001 DASH for both. Nothing was sent./pre-review(gpt-6.1-sol) on this range: 0 blocking, 0 suggestions, 0 nitpicks.Not in this PR
ContactRequests.get→platform_mobile::fetch_documents_with_query_and_sdk) can block with no timeout, wedging contact sync ("already running") until the app restarts.🤖 Generated with Claude Code
Summary by CodeRabbit