Skip to content

Feat/restore cryptonote from date or height - #1384

Draft
sneurlax wants to merge 55 commits into
stagingfrom
feat/restore-cryptonote-from-date-or-height
Draft

sneurlax wants to merge 55 commits into
stagingfrom
feat/restore-cryptonote-from-date-or-height

Conversation

@sneurlax

Copy link
Copy Markdown
Member

No description provided.

sneurlax and others added 22 commits February 21, 2026 11:02
Co-Authored-By: detherminal <76167420+detherminal@users.noreply.github.com>
Co-Authored-By: detherminal <76167420+detherminal@users.noreply.github.com>
these shouldn't exist/happen, but do/can
these shouldn't exist/happen, but do/can
previously if it had a newline at the beginning it would choke
previously if it had a newline at the beginning it would choke
monero_wallet worked. now monero-wallet works, too

there's a frustrating variety of xmr wallet uri schemes: some with underscores, some with dashes
monero_wallet worked. now monero-wallet works, too

there's a frustrating variety of xmr wallet uri schemes: some with underscores, some with dashes
`git diff --name-only --diff-filter=d origin/staging | grep '\.dart$' | xargs -r dart format && git diff --name-only --diff-filter=d | grep '\.dart$' | xargs -r git commit -m "chore: dart format"`
@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 1.97842% with 545 lines in your changes missing coverage. Please review.
✅ Project coverage is 4.83%. Comparing base (8208fe7) to head (592f10d).
⚠️ Report is 55 commits behind head on staging.

Files with missing lines Patch % Lines
...iew/restore_options_view/restore_options_view.dart 0.00% 226 Missing ⚠️
lib/widgets/start_height_picker.dart 0.00% 132 Missing ⚠️
lib/utilities/address_utils.dart 15.06% 62 Missing ⚠️
...settings_view/sub_widgets/confirm_full_rescan.dart 0.00% 52 Missing ⚠️
...wallets/wallet/intermediate/lib_monero_wallet.dart 0.00% 44 Missing ⚠️
...gs_wallet_settings/delete_wallet_warning_view.dart 0.00% 9 Missing ⚠️
...rk_settings_view/wallet_network_settings_view.dart 0.00% 7 Missing ⚠️
lib/wallets/wallet/wallet.dart 0.00% 4 Missing ⚠️
...ews/wallet_settings_view/wallet_settings_view.dart 0.00% 3 Missing ⚠️
lib/wallets/wallet/impl/monero_wallet.dart 0.00% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1384      +/-   ##
===========================================
- Coverage     4.84%    4.83%   -0.01%     
===========================================
  Files         1092     1093       +1     
  Lines       109141   109422     +281     
===========================================
+ Hits          5283     5289       +6     
- Misses      103858   104133     +275     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax

Copy link
Copy Markdown
Member Author

not needed

sneurlax and others added 26 commits August 27, 2026 21:44
Serializes open, node updates, native replacement and shutdown on a single
mutex, and rejects queued work once shutdown has begun. The Tor transition
gate parks a node update while Tor is bootstrapping and abandons it as soon
as the operation is superseded.
Every LibMonero/Wownero/Salvium instance subscribed to the Tor status and
preference events from its constructor, so toggling Tor ran updateNode() on
the dozens of wallets Wallets.load() constructs but never opens. With a
Tor-only or clearnet-only node the TOR/clearnet mismatch escaped the async
listener as an unhandled exception.

Listeners are now attached in open() and detached on exit() or a failed open,
and the native lifecycle runs through CryptonoteWalletLifecycle so concurrent
open/exit calls cannot load or tear down the native wallet twice. Because an
exited wallet no longer follows node or Tor changes, open() re-runs the node
update whenever the native daemon session was torn down; otherwise a reopened
wallet resumes syncing over its stale clearnet session. Also corrects the
inverted null guard in recoverViewOnly().
Co-Authored-By: detherminal <76167420+detherminal@users.noreply.github.com>
these shouldn't exist/happen, but do/can
previously if it had a newline at the beginning it would choke
monero_wallet worked. now monero-wallet works, too

there's a frustrating variety of xmr wallet uri schemes: some with underscores, some with dashes
…20261110/pr-1261

# Conflicts:
#	lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/wallet_keys_desktop_popup.dart
#	lib/services/wallets.dart
#	lib/utilities/address_utils.dart
#	test/address_utils_test.dart
…20261110/pr-1278

# Conflicts:
#	lib/utilities/address_utils.dart
# Conflicts:
#	lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_settings_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart
#	lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_attention_delete_wallet.dart
#	lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/unlock_wallet_keys_desktop.dart
#	lib/utilities/address_utils.dart
…20261110/pr-1261

# Conflicts:
#	lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart
#	lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/delete_wallet_keys_popup.dart
#	lib/utilities/address_utils.dart
#	lib/wallets/wallet/impl/monero_wallet.dart
#	lib/wallets/wallet/intermediate/lib_monero_wallet.dart
#	lib/wl_gen/interfaces/cs_monero_interface.dart
#	test/address_utils_test.dart
…20261110/pr-1278

# Conflicts:
#	lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart
@sneurlax

Copy link
Copy Markdown
Member Author

Updated this shared restore-date/height branch to staging d29d84c660492fd6dcc7ee67dbce4a76e85c026a and incorporated the newer Monero URI recovery branch, including its key backup/deletion, selected-network and native lifecycle handling. Payment-URI multi-recipient parsing is preserved. Wallet-URI parsing and restore failures redact recovery secrets; unsupported transaction-ID restores are rejected.

Validation: 73 focused URI, payment parsing, restore UI, recovery-material and secure-storage tests passed. Targeted Dart analysis reported no errors, with existing informational lints. Native chain restore, device behavior, and date-to-height accuracy were not exercised end to end. PRs #1278 and #1384 now point to this same reviewed commit.

@sneurlax

Copy link
Copy Markdown
Member Author

Follow-up b0b5cbe8e: MWC restore now preserves the selected height instead of replacing it with an estimate for today; the date picker estimates MWC height using the MWC genesis time. Monero networks without a supported date mapping use block-height input. The focused URI and restore-widget suite passed (35 tests), including the MWC genesis estimate check. Real native restoration remains untested.

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