Skip to content

Ralph/improvements#538

Draft
PastaPastaPasta wants to merge 201 commits intov1.0-devfrom
ralph/improvements
Draft

Ralph/improvements#538
PastaPastaPasta wants to merge 201 commits intov1.0-devfrom
ralph/improvements

Conversation

@PastaPastaPasta
Copy link
Copy Markdown
Member

@PastaPastaPasta PastaPastaPasta commented Feb 8, 2026

WIP mass PR created by claude via a Ralph loop.

I've attached the tasks.md file that it is working from here

tasks.md

PastaPastaPasta and others added 30 commits February 4, 2026 22:25
Add YAPPR key exchange flow for DashPay, QR scanner improvements,
state transition signing screen, and refactor UI helpers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace orphaned SpvEvent handler with three new broadcast-based
handlers (SyncEvent, WalletEvent, NetworkEvent) that subscribe to
the actual event producers in dash-spv. This fixes wallet
reconciliation never being triggered by SPV events.

- Bump dash-sdk to fb055ec008 (picks up rust-dashcore 4d2a7018
  with WalletEvent support)
- Add spawn_sync_event_handler: triggers reconcile on
  BlockProcessed, ChainLockReceived, InstantLockReceived,
  SyncComplete
- Add spawn_wallet_event_handler: triggers reconcile on all
  wallet events (TransactionReceived, BalanceUpdated)
- Add spawn_network_event_handler: updates connected_peers count
  on PeersUpdated
- Add connected_peers field to SpvManager and SpvStatusSnapshot
- Fix reconcile channel race: register channel before starting
  SPV thread so handlers always capture a valid sender
- Improve reconcile: track in-memory UTXOs, log summaries, guard
  against wiping transaction history

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The receive dialog cached address balances at open time and never
updated them, so SPV balance changes were not reflected until the
dialog was closed and reopened.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move these features to the feat/yappr-key-exchange branch. This branch
now focuses on SPV broadcast channel migration, dependency bumps, and
reconciliation fixes only.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrate transaction info queries, broadcasting, and finality detection
away from direct Core RPC calls so that identity registration and
top-up work in SPV-only mode. Key changes:

- Add `get_transaction_info_via_dapi()` using DAPI GetTransaction
- Add `broadcast_raw_transaction()` that routes via RPC or SPV
- Add SPV finality listener forwarding instant/chain lock events
- Make asset lock creation methods async for SPV broadcasting
- Use longer proof timeouts (5min) in SPV mode vs 2min for RPC
- Update address balances after asset lock UTXO consumption
- Add BIP32 derivation path detection for SPV address mapping
- Bump platform SDK rev to bcb41de347

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Propagate update_address_balance errors via ? in create_asset_lock.rs
- Replace .expect() with .map_err()? for core_client lock in broadcast_raw_transaction
- Log try_send failures for finality events in SPV manager instead of silently dropping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove stale entries from transactions_waiting_for_finality on the
success path of asset lock proof timeout loops, preventing unbounded
map growth. Applied to both top_up_identity.rs and register_identity.rs.

Also replace .expect() on poisoned RwLock read of core_client with
graceful error propagation via map_err.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… sub-tasks

Task: 1.1 [META] Triage wallet bugs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On startup, bootstrap_loaded_wallets now spawns background tasks to
refresh UTXOs from Core RPC for all HD and single-key wallets. This
ensures balances are current without requiring the user to manually
click Refresh. Only applies in RPC mode; SPV handles UTXOs via
reconciliation.

Task: 1.1a
…(GH#476)

When the user selects "deduct from input", use an explicit output amount
for the destination and a separate change address for the fee remainder,
so the destination receives the exact requested amount.

Task: 1.1b
Replace `let _ =` with `if let Err(e) { tracing::warn!(...) }` for
two DB operations after broadcasting a payment: dropping spent UTXOs
and updating wallet balances. Previously these errors were silently
discarded, making it impossible to diagnose post-payment DB state
inconsistencies.

Task: 1.1g
Task: 1.2 [META] Triage identity & token bugs
The reorder_vec_to() function built a reordered IndexMap but never
assigned it back to self.my_tokens (the assignment was commented out).
This made token reordering completely non-functional. Also added a
safety loop to preserve tokens not in the saved order.

Task: 1.2b
Replace .unwrap() panics with graceful handling in refresh() methods
of transfer_screen.rs and withdraw_screen.rs. If the identity was
deleted or DB load fails during refresh, the screen keeps its current
data instead of crashing.

Task: 1.2e
…ndling

If a ZMQ endpoint is unreachable or the port is in use, the app now logs
the error and continues without ZMQ for that network instead of crashing.

Task: 1.3b
…dling

- app_dir.rs: return Err(io::Error) for unsupported network in cookie path
- app.rs: use unreachable!() with descriptive message for unknown network
- core_p2p_handler.rs: return Err(String) for unsupported network type

Task: 1.3c
PastaPastaPasta and others added 28 commits February 8, 2026 13:35
- Load contact data from local DB on screen creation (dashpay_contacts,
  dashpay_profiles, contact_private_info tables)
- Trigger FetchContactProfile backend task on screen arrival for fresh
  Platform data
- Save contact info edits to both local DB (immediately) and Platform
  (via DashPayTask::UpdateContactInfo with encrypted data)
- Handle ContactProfile, ContactInfoUpdated, and ContactsWithInfo
  task results
- Replace non-functional Remove/Block Contact buttons with
  informational text
- Use DashColors semantic constants instead of inline Color32 values

Task: 7.2b
Replace mock "alice.dash" contact name in SendPaymentScreen with
actual DB lookup. Implement load_payment_history() to query the
dashpay_payments table. Update LoadPaymentHistory backend handler
to return real DB records with resolved contact names.

Task: 7.2c
Added created_at field to Contact struct, populated from DB StoredContact.
Implemented SearchFilter::Recent (7-day window) and SortOrder::DateAdded
(newest first) which previously had TODO stubs.

Task: 7.2e

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, load_contacts() fetched each contact's DashPay profile and
DPNS username sequentially (2N network round-trips for N contacts).
Now processes contacts in chunks of 10 using futures::join_all, running
all fetches within each chunk concurrently. Reduces total fetch time
by roughly 10x for large contact lists.

Task: 7.2g

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrates all remaining println!/eprintln! calls in src/ to appropriate
tracing levels (error, warn, info, debug) for structured logging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Task: 7.4

Comprehensive review of 17 backend task files, 16 UI screen files,
19 ui-tokens issue files, and 16 contracts issue files. Found critical
freeze screen bug (button does nothing), confirmed GH#224 key visibility
issue, and verified frozen identity filtering is missing. Created 6
sub-tasks (7.4a-7.4f).
Integrates 8 commits from origin/feat/working-spv adding SPV asset lock
support, broadcast channel event handling, and DAPI-based asset lock
operations. Resolved 6 merge conflicts preserving ralph's module
structure (context/ split), lock poison recovery, and error handling
while adopting feat's broadcast_raw_transaction abstraction, SPV-aware
timeouts, finality listener, and UTXO handling improvements.

Task: 7.3d

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Freeze button click handler was setting confirmation_dialog = None
(clearing) instead of creating a new ConfirmationDialog, making the
entire Freeze feature non-operational. Now properly creates the dialog
with input validation, matching the burn_tokens_screen pattern.

Task: 7.4a
…idation

Task: 7.4c

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Query Platform on screen load for frozen status of each locally-known
identity against the selected token. Only frozen identities are shown
in the identity selector dropdown, with a loading spinner while the
query is in progress. Falls back to showing all identities on error.

Task: 7.4d
Replace unwrap_or_default() on row.get() with Option<T> + ? to properly
propagate SQL type errors while still handling NULL values gracefully.

Task: 7.5c
tasks.md Outdated

## Section 9: Upstream PR Submission [When Ready]

> **Goal:** Cherry-pick completed work from `ralph/improvements` into clean branches off `v1.0-dev` and open draft PRs upstream. Limit to 5-10 PRs max. Prioritize changes that are important, easy to review, trivial, and merge cleanly.
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.

this is a key task, otherwise it's not reviewable. Given the size of the PR, I would suggest even 10-15 PRs

Populate all SyncProgress fields (filter heights, masternode height,
filters downloaded) instead of defaulting, and build DetailedSyncProgress
with a pipeline-ordered stage derived from dash-spv sub-manager states.
Update UI progress bars to use actual sync data rather than hardcoded
stage-based values.

Co-Authored-By: Claude Opus 4.6 <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.

2 participants