Skip to content

feat(swift-sdk): add ZK shielded sync status UI#3393

Draft
QuantumExplorer wants to merge 10 commits intov3.1-devfrom
feat/ios-zk-integration
Draft

feat(swift-sdk): add ZK shielded sync status UI#3393
QuantumExplorer wants to merge 10 commits intov3.1-devfrom
feat/ios-zk-integration

Conversation

@QuantumExplorer
Copy link
Member

Issue being fixed or feature implemented

Adds a ZK Shielded Sync status section to the iOS SwiftExampleApp, mirroring the existing Platform Address Sync section. This provides real-time visibility into shielded pool synchronization (note discovery + nullifier checking).

What was done?

  • ZKSyncService — New @MainActor ObservableObject service that orchestrates periodic ZK sync:

    • Calls syncNotes() then syncNullifiers() on ShieldedPoolClient every 30 seconds
    • Tracks per-sync and cumulative stats (notes found, nullifiers spent)
    • Persists shielded balance and orchard address to UserDefaults for instant restore on launch
    • Network-scoped persistence keys (zkSync_{network}_*)
  • UnifiedAppState — Wired ZK sync into app lifecycle:

    • 5-second initial delay (heavier than BLAST sync)
    • 30-second periodic loop
    • Proper cancellation on reset/network switch
  • CoreContentView — New "ZK Shielded Sync" UI section showing:

    • Sync status (spinner / checkmark + relative time)
    • Shielded balance (formatted as DASH)
    • Truncated orchard address
    • Last sync stats and cumulative totals
    • Sync count, error display, and manual sync/clear buttons
  • Environment injection and pull-to-refresh integration

How Has This Been Tested?

  • Built successfully for iOS Simulator (xcodebuild -sdk iphonesimulator)
  • UI section renders correctly in CoreContentView
  • Follows identical patterns to the production-tested PlatformBalanceSyncService

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • 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

🤖 Generated with Claude Code

…d nullifier sync

- Create ZKSyncService with periodic sync loop (30s interval)
- Display shielded balance, orchard address, note/nullifier stats in CoreContentView
- Persist balance and address across app launches via UserDefaults
- Wire into UnifiedAppState lifecycle and pull-to-refresh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 27f11e80-8b73-4bf7-929b-0b495ce5cd89

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ios-zk-integration

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added this to the v3.1.0 milestone Mar 20, 2026
QuantumExplorer and others added 9 commits March 20, 2026 11:43
…ations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use TrustedHttpContextProvider::new_with_url for local/regtest networks,
  connecting to quorum sidecar at localhost:22444 (dashmate Docker default)
- Replace separate "Use Local DAPI" and "Use Local Core" toggles with
  unified "Use Docker Setup" toggle
- Default DAPI address changed to https://127.0.0.1:2443 (envoy gateway)
- Persist selected tab across app launches
- SDK.init uses dash_sdk_create_trusted for all networks (Rust auto-detects local)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… account types

- Restore AddAccountView from feat/platformSync branch for adding accounts to wallets
- Add platformPayment, dashPayReceivingFunds, dashPayExternalAccount to AccountCategory and AccountType
- Use wallet_add_platform_payment_account() for Platform Payment accounts (requires key_class)
- Add CoreWalletManager.addAccount() public method
- Add regtest (case 2) to SPV client network config instead of falling through to testnet
- Default local Core P2P peer to 127.0.0.1:20001 (Docker dashmate port)
- Add Local/Regtest option to wallet creation network picker

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ounts

- Change default local DAPI from https to http (Docker envoy self-signed cert rejected)
- Enumerate platform payment accounts in getAccounts() for wallet detail view

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add "Get 10 DASH from Faucet" button on Receive screen (Core tab, Docker mode only)
- Calls seed node Core RPC sendtoaddress at 127.0.0.1:20302
- Add Faucet RPC Password field in Settings when Docker Setup is enabled
- Password persisted in UserDefaults for subsequent faucet requests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove key-wallet-manager workspace dependency (merged into key-wallet)
- Update rs-dpp and rs-platform-wallet to use key-wallet directly
- Remove dashcore "std" feature (removed upstream)
- Update WalletTransactionChecker for new check_core_transaction signature
  (added &mut Wallet and is_from_mempool params)
- Add mark_instant_send_utxos to WalletInfoInterface impl

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant