Skip to content

feat(platform-wallet): fresh shielded addresses and an own-address check - #5888

Merged
romchornyi merged 7 commits into
v5.1-devfrom
feat/fresh-shielded-address
Nov 12, 2026
Merged

romchornyi merged 7 commits into
v5.1-devfrom
feat/fresh-shielded-address

Conversation

@romchornyi

@romchornyi romchornyi commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Closes #5869. A wallet can only hand out its default Orchard address today, so every payer of a shielded Receive pays the same address and can be linked to every other payer. The iOS wallet (dashpay/dashwallet-ios#1372) shows a fresh address per Receive session and needs two things from the SDK: a fresh diversified address, and a way to tell whether a shielded recipient is one of the wallet's own addresses (the history shows sends to own fresh addresses as internal).

What was done?

  • platform-wallet: OrchardKeySet derives a fresh payment address at a uniformly random 88-bit (11-byte) diversifier index from the OS CSPRNG, redrawing index 0 (the default address). Nothing is persisted: the incoming viewing key finds notes to every diversified address. The own-recipient test the scan already used for self-change moves to keys.rs and is shared.
  • PlatformWallet::shielded_fresh_address / is_own_shielded_address.
  • FFI: platform_wallet_manager_shielded_fresh_address and platform_wallet_manager_is_own_shielded_address, following platform_wallet_manager_shielded_default_address (43 raw bytes, out_present = false when not bound, unknown wallet → ErrorWalletOperation). The own-address check returns false for a malformed recipient.
  • Swift SDK: PlatformWalletManager.shieldedFreshAddress(walletId:account:) and isOwnShieldedAddress(walletId:account:raw43:). Both are synchronous and block the main actor, like the rest of the class.

How Has This Been Tested?

  • platform-wallet unit tests: two fresh addresses differ and never equal the default; the own-recipient test is true for default and fresh addresses and false for foreign or malformed ones.
  • Scan and restore: a note sent to a fresh address is found by the shielded scan and again after a restore from the same seed (fresh_address_scan_tests.rs).
  • platform-wallet-ffi (--features shielded): both exports on a bound wallet (43 bytes, out_present, a new address per call, own vs foreign), plus not bound, unknown wallet and null pointers. Full crate: 563 passed.
  • Swift SDK: argument guards in ShieldedFreshAddressTests; end to end through the iOS app's tests (100 fresh derivations, p95 ≈ 0.5 ms on an iOS simulator in Debug).

Breaking Changes

None — additive exports only.

Checklist:

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request
  • If I added or changed a system contract's document schemas, I checked the contract viewer link posted on this pull request

🤖 Generated with Claude Code

PR Hygiene · e87bb32

  • Bots — thepastaclaw ✓
  • Self-review — posted; again after any push
  • Build green
  • Approvals
    • rs-platform-wallet-ffi (packages/rs-platform-wallet-ffi/src/persistence.rs, packages/rs-platform-wallet-ffi/src/shielded_sync.rs, packages/rs-platform-wallet-ffi/src/test_fixtures.rs) — approved by llbartekll
    • rs-platform-wallet (packages/rs-platform-wallet/src/wallet/platform_wallet.rs, packages/rs-platform-wallet/src/wallet/shielded/cancelled_scan_tests.rs, packages/rs-platform-wallet/src/wallet/shielded/coordinator.rs and 5 more) — approved by llbartekll
    • swift-sdk — you own it

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • New Features
    • Added APIs to generate fresh shielded addresses and check whether an address belongs to a bound account. Available through the wallet and Swift SDK.
    • Fresh-address requests return no address when the wallet or account is unbound; ownership checks report when ownership is unavailable.
  • Tests
    • Added coverage for address generation, ownership checks, scanning with fresh addresses, and restored viewing keys.

romchornyi and others added 6 commits November 11, 2026 21:31
…ersifier index

AccountViewingKeys::fresh_address draws an 11-byte diversifier index from
the OS CSPRNG (index 0 redrawn), so each call returns an unlinkable address
that the scan still finds through the IVK. The own-recipient test moves to
AccountViewingKeys::is_own_recipient so the scan and the coming export share
one function.

SDD-Task: T1
SDD-AC: AC-06
SDD-AC: AC-08

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ess check

PlatformWallet::shielded_fresh_address / is_own_shielded_address answer
over the bound account's viewing keys (None when not bound), and the C
exports platform_wallet_manager_shielded_fresh_address /
platform_wallet_manager_is_own_shielded_address follow the default-address
export's WalletMissing / Unbound / Bound shape. No address is formatted
into any error message.

SDD-Task: T2
SDD-AC: AC-01
SDD-AC: AC-07
SDD-AC: AC-08

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…addresses

Drives the real coordinator against a mock pool holding notes to five
fresh addresses and one foreign address: the scan records exactly the five
own notes and their balance, a wallet restored from the same seed finds the
same notes, and it recognises every fresh address as its own. No production
change; the note builder in cancelled_scan_tests is shared via pub(super)
instead of copied.

SDD-Task: T4
SDD-AC: AC-04
SDD-AC: AC-05

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PlatformWalletManager wrappers over the new C exports, with the same guards
and nil-when-unbound mapping as shieldedDefaultAddress. Unit tests cover the
unconfigured-manager and wrong-length wallet id guards.

Test notes: the SwiftDashSDKTests suite on an iOS 27.2 simulator passes
except KeychainSignerAdditionalSigningKeysTests (two keychain XCTUnwrap
failures, unrelated to this change) and a flaky PlatformWalletProgressPollTests
case that passes on rerun.

SDD-Task: T3
SDD-AC: AC-01
SDD-AC: AC-07
SDD-AC: AC-08

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s on a bound wallet

The fresh-address export writes 43 bytes with out_present set, a new
address per call and never the default; the own-address export answers
true for a fresh address of the wallet and false for a foreign one. The
no-op viewing-key callbacks move to test_fixtures so a bound-wallet
fixture can declare SHIELDED_VIEWING_KEYS, which a seed-backed bind
requires.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PlatformWalletManager is @mainactor, so shieldedFreshAddress and
isOwnShieldedAddress cannot be called off the main actor as their doc
comments said; they run on it and block while the FFI call drives the
Rust runtime.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The wallet now derives randomized external-scope Orchard addresses and checks whether raw recipient bytes belong to a bound account. Both operations are exposed through PlatformWallet, Rust FFI, and Swift. Tests cover address derivation, binding states, API results, and scanning notes sent to fresh addresses.

Changes: Shielded Address Generation and Lookup

Layer / File(s) Summary
Derive and recognize Orchard addresses
packages/rs-platform-wallet/src/wallet/shielded/*, packages/rs-platform-wallet/src/wallet/platform_wallet.rs
Viewing keys generate fresh addresses and recognize owned recipients. Activity derivation uses the shared ownership check. Tests cover fresh-address scans, restored keys, and bound-account behavior.
Expose wallet and FFI operations
packages/rs-platform-wallet/src/wallet/platform_wallet.rs, packages/rs-platform-wallet-ffi/src/shielded_sync.rs, packages/rs-platform-wallet-ffi/src/test_fixtures.rs, packages/rs-platform-wallet-ffi/src/persistence.rs
PlatformWallet and FFI add fresh-address and ownership-query operations. FFI tests cover bound and unbound accounts, unknown wallets, pointer errors, and address classification.
Expose the operations in Swift
packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/PlatformWalletManagerShieldedSync.swift, packages/swift-sdk/SwiftTests/SwiftDashSDKTests/ShieldedFreshAddressTests.swift
The Swift manager adds fresh-address and ownership-query methods. Tests check unconfigured managers and invalid wallet ID lengths.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PlatformWalletManager
  participant RustFFI
  participant PlatformWallet
  participant AccountViewingKeys
  PlatformWalletManager->>RustFFI: request fresh shielded address
  RustFFI->>PlatformWallet: request address for account
  PlatformWallet->>AccountViewingKeys: derive fresh address
  AccountViewingKeys-->>PlatformWallet: return Orchard address
  PlatformWallet-->>RustFFI: return address or unavailable
  RustFFI-->>PlatformWalletManager: return address or unavailable
Loading

Suggested reviewers: quantumexplorer, llbartekll, zocolini

Merge Risk: Minimal · up to e87bb

The change adds fresh shielded address generation and an own-address check across the wallet, FFI and Swift SDK. The additions are non-persisting and non-breaking. No actionable merge-blocking risk was found in this review.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(platform-wallet): fresh shielded addresses and an own-address check" matches the main change. The changeset adds fresh shielded address derivation (AccountViewingKeys::fresh_address, P…
Linked Issues check Passed Directly linked issue #5869 asks for a fresh external-scope Orchard address exposed through the wallet, FFI, and Swift SDK, with a random 88-bit diversifier index, no persistence, and tests. The revie…
Out of Scope Changes check Passed All changed areas connect to the fresh-address or own-address objective:
- keys.rs, platform_wallet.rs, shielded_sync.rs, and the Swift wrapper implement the new APIs.
- is_own_recipient moves…
Full details: Title check

Explanation

The title "feat(platform-wallet): fresh shielded addresses and an own-address check" matches the main change. The changeset adds fresh shielded address derivation (AccountViewingKeys::fresh_address, PlatformWallet::shielded_fresh_address) and an ownership check (is_own_recipient, is_own_shielded_address), exposed through FFI and Swift SDK. The title is concise, specific, and follows the conventional-commit style. It names the primary change without file lists or vague terms.

Full details: Linked Issues check

Explanation

Directly linked issue #5869 asks for a fresh external-scope Orchard address exposed through the wallet, FFI, and Swift SDK, with a random 88-bit diversifier index, no persistence, and tests. The reviewed diff covers each layer:

  • Wallet: AccountViewingKeys::fresh_address in keys.rs draws an 11-byte index from the OS CSPRNG and redraws index 0. PlatformWallet::shielded_fresh_address wraps it.
  • FFI: platform_wallet_manager_shielded_fresh_address returns 43 raw bytes and sets out_present to false when the account is unbound.
  • Swift: PlatformWalletManager.shieldedFreshAddress(walletId:account:) wraps the FFI call.
  • Tests: fresh_address_and_own_check_follow_the_bound_account and the FFI bound-wallet tests check that calls return different addresses and that the 43-byte encoding is used. fresh_address_scan_tests.rs checks that notes sent to fresh addresses are found by scan, that the spendable balance equals the summed note values, and that a restore recovers them.

The issue also asks that notes be counted in activity. The coordinator's activity derivation now uses AccountViewingKeys::is_own_recipient, but the evidence summary does not show an explicit activity assertion. This is a minor gap, not a missing requirement. Contextual sources (#5869 parent context, if any) add no further coding requirements.

Full details: Out of Scope Changes check

Explanation

All changed areas connect to the fresh-address or own-address objective:

  • keys.rs, platform_wallet.rs, shielded_sync.rs, and the Swift wrapper implement the new APIs.
  • is_own_recipient moves to keys.rs. coordinator.rs and operations.rs use the shared check in place of the removed is_own_orchard_recipient helper. This is a refactor the PR describes as shared logic.
  • test_fixtures.rs, persistence.rs, cancelled_scan_tests.rs, and mod.rs contain test-only support. They add no-op viewing-key callbacks, reuse fixtures, widen helper visibility, and register the new test module.
  • ShieldedFreshAddressTests.swift covers argument guards for the new Swift APIs.

No change is unrelated to the linked issue.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8b4ca80 and e87bb32.

Files selected for processing: 13

  • packages/rs-platform-wallet-ffi/src/persistence.rs
  • packages/rs-platform-wallet-ffi/src/shielded_sync.rs
  • packages/rs-platform-wallet-ffi/src/test_fixtures.rs
  • packages/rs-platform-wallet/src/wallet/platform_wallet.rs
  • packages/rs-platform-wallet/src/wallet/shielded/cancelled_scan_tests.rs
  • packages/rs-platform-wallet/src/wallet/shielded/coordinator.rs
  • packages/rs-platform-wallet/src/wallet/shielded/fresh_address_scan_tests.rs
  • packages/rs-platform-wallet/src/wallet/shielded/keys.rs
  • packages/rs-platform-wallet/src/wallet/shielded/mod.rs
  • packages/rs-platform-wallet/src/wallet/shielded/operations.rs
  • packages/rs-platform-wallet/src/wallet/shielded/viewing_key_bind_tests.rs
  • packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/PlatformWalletManagerShieldedSync.swift
  • packages/swift-sdk/SwiftTests/SwiftDashSDKTests/ShieldedFreshAddressTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added this to the v5.1.0 milestone Nov 12, 2026
@thepastaclaw

thepastaclaw commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit e87bb32)

@github-actions

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 12, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

Verified the findings against head 46c203b and found no blocking correctness, security, or layering defects. Three non-blocking improvements and one visibility nit remain: avoid an unnecessary FFI allocation, deterministically test randomness edge cases, cover malformed lengths through the FFI export, and retain private visibility for an unshared test helper. This was a static review; Rust wallet tests and the Swift frozen-schema check passed, while the Swift build job failed with a self-hosted-runner communication error rather than a reported code failure, and its logs were unavailable.

🟡 3 suggestion(s) | 💬 1 nitpick(s)

Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 6: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 7: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — This is a large cross-language change that modifies shielded key derivation and recipient ownership checks in OrchardKeySet/keys.rs, a critical cryptographic and key-handling surface.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `packages/rs-platform-wallet/src/wallet/shielded/keys.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/wallet/shielded/keys.rs:474-476: Test zero-index rejection and entropy failure deterministically
  The production OsRng draws effectively never exercise the zero-index retry: each draw reaches that branch with probability 2^-88. Removing the redraw loop would therefore leave these assertions passing almost every time, and the entropy-failure branch also has no regression coverage. Extract a private helper accepting a TryRngCore source while keeping the public method fixed to OsRng. Test a scripted source that returns zero followed by a known nonzero index, and a source that fails, verifying the selected address and ShieldedKeyDerivation error respectively.

In `packages/rs-platform-wallet-ffi/src/shielded_sync.rs`:
- [SUGGESTION] packages/rs-platform-wallet-ffi/src/shielded_sync.rs:799: Borrow the recipient instead of copying the host buffer
  The export allocates and copies address_len bytes even though the wallet only needs a borrowed slice and rejects lengths other than 43. This makes malformed, large inputs incur allocation and copying before the wallet can reject them. The call completes synchronously through block_on, so the caller's documented buffer lifetime already covers the operation. Remove to_vec() and pass the borrowed address slice directly to is_own_shielded_address; recipient validation should remain in the wallet.
- [SUGGESTION] packages/rs-platform-wallet-ffi/src/shielded_sync.rs:1459-1461: Cover malformed recipient lengths through the FFI export
  The new export promises that a bound account answers false for recipient lengths other than 43, but its bound-wallet tests only pass valid-length addresses. The wallet-level 42-byte test does not exercise pointer/length marshalling or publication of out_present and out_is_own at the ABI boundary. Add bound-wallet export cases using a valid non-null backing buffer with lengths 0, 42, and 44, asserting Success, out_present == true, and out_is_own == false.

In `packages/rs-platform-wallet/src/wallet/shielded/cancelled_scan_tests.rs`:
- [NITPICK] packages/rs-platform-wallet/src/wallet/shielded/cancelled_scan_tests.rs:120: Keep the unshared tree_path helper private
  The new sibling tests call coordinator_over, which creates its path internally; they do not call tree_path. Unlike the shared helpers and RecordingPersistence return type, this helper does not need wider visibility.

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 12, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failed after approval — commit 46c203b

The standing review approved this commit; this follow-up moves the verdict to COMMENT: checks that failed after the review may relate to this change, and the evidence does not rule it out.

Failing checks:

Why it is unclear: The failing Swift SDK build and tests check covers Swift code and tests changed by this PR, but its failure log is unavailable (HTTP 404). The earlier review mentions a runner communication error, but the supplied failure evidence does not confirm that cause for this failure.

Nothing was re-reviewed: the findings of the standing review are unchanged. The next push gets a full review; a re-run that passes does not restore the approval.

Review provenance

Source: CI-check lane gpt-6.1-sol (agent: triage); no reviewer or verifier lanes ran for this follow-up

  • Verdict moved because CI failed on this commit after the review; failure logs read: 0 GitHub Actions job(s)

…e own-check recipient

- fresh_address draws through a private fresh_address_from(rng), so tests
  script an index-0 draw (redrawn) and a randomness failure (an error).
- The is-own FFI export borrows the caller's buffer instead of copying it.
- The bound-wallet FFI test covers recipient lengths 0, 42 and 44 (not own).
- tree_path in cancelled_scan_tests is private again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
romchornyi added a commit to dashpay/dashwallet-ios that referenced this pull request Nov 12, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SDD-Published-From: 008cc9c2000cc840cd0ef88ab04c31382a072946
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 12, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Static verification of e87bb32 found no remaining in-scope defects in fresh-address generation, ownership checks, or FFI/Swift marshaling. Current CI reports Rust workspace tests passing and Swift SDK build/tests pending, with no failed code checks; the unchanged workspace filters do not establish execution of the new shielded-wallet tests. No local builds or tests were run.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 6: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 7: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — This is a large cross-layer change that modifies shielded key/address derivation and own-recipient classification in packages/rs-platform-wallet/src/wallet/shielded/keys.rs, directly affecting cryptographic key handling and privacy-sensitive wallet behavior.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 12, 2026
@romchornyi

Copy link
Copy Markdown
Contributor Author

/self-reviewed

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Missing human approval. Automatic reviewer requests are paused and this PR is excluded from reviewers' queues. Merge, close, or draft another active PR by this author to free a review slot. Required human review can be satisfied without a slot; once all merge requirements are met, PR Hygiene passes.
Full checklist in the description.

@github-actions github-actions Bot added the too-many-open-prs Beyond the author's 5 open PRs; waits for one to merge before a human is asked. label Nov 12, 2026
@github-actions github-actions Bot removed the waiting-self-review Waiting for the author to post /self-reviewed label Nov 12, 2026

@llbartekll llbartekll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the wallet, FFI and Swift layers at e87bb32 — no bugs found.

  • Every 11-byte Orchard diversifier index yields a valid address, so the only redraw needed is index 0, and that one is tested with a scripted RNG.
  • Nothing needs persisting: the scan and is_own_recipient both go through the IVK, and the scan test confirms notes to fresh addresses are found and counted.
  • The FFI exports follow shielded_default_address (outputs untouched on error, out_present = false when unbound), and the Swift wrappers only marshal.

Swift SDK build was still running when I approved.

@github-actions github-actions Bot removed the too-many-open-prs Beyond the author's 5 open PRs; waits for one to merge before a human is asked. label Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Policy satisfied — this can merge.
Full checklist in the description.

@romchornyi
romchornyi merged commit cade2c0 into v5.1-dev Nov 12, 2026
35 checks passed
@romchornyi
romchornyi deleted the feat/fresh-shielded-address branch November 12, 2026 15:00
romchornyi added a commit to dashpay/dashwallet-ios that referenced this pull request Nov 12, 2026
…merge develop

cade2c0154 is #5888 merged into v5.1-dev; its v13.rs/v14.rs match
d4750290ff (the protocol 14 testnet runs). Develop is merged in; the ADR
index keeps develop's 0010–0012, 0032–0033 and this PR's 0046–0048.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
SDD-Published-From: a2463e6c6463aa1daa3227f41cc2bdcd47c5f39e
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.

Shielded: expose fresh diversified Orchard payment addresses in the wallet API

3 participants