Skip to content

Add Grin wallet core integration - #1538

Draft
sneurlax wants to merge 1 commit into
feat/slatepack-interfacefrom
feat/grin
Draft

sneurlax wants to merge 1 commit into
feat/slatepack-interfacefrom
feat/grin

Conversation

@sneurlax

@sneurlax sneurlax commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add Grin/tGrin coin definitions, wallet registration, backup/restore, node handling, scan/rescan, lifecycle, deletion, transaction mapping, and native-library checks;
  • implement the Grin wallet core and transport policy solely through the public grin_native package;
  • add focused coverage for wallet state, invoices, transport, scanning, errors, transaction mapping, and service registration;
  • keep Stack free of any direct or transitive Dart dependency on the bare grin package.

Stack

This is one core commit directly on #1507 and the current GitHub staging:

  1. staging 05b0ad33bbfa5fe8da9073241562bb5461b8ad8d
  2. Share the Epic Cash and MWC Slatepack UI #1507 31224b637f96f995ff1508db5961e12c17721f78
  3. this PR 026287986a4eccdd0ab8b2a453a40274da512ea7
  4. Add Grin native end-to-end test coverage #1539 7b439b79407db524cf71843a6274fcaa53f4ac4f
  5. Integrate Grin with the shared Slatepack UI #1540 fe1c3a306fde3a29bb6f19c8eeeeed821486410c

Merge #1507 first, then retarget this PR to staging and require the resulting CI to remain green.

Dependency boundary

grin_native resolves from https://github.com/cypherstack/grin_native at 5b56ce4f90b50be67154797cbfc1a401bd9ab778, path packages/grin_native. Stack has no bare grin dependency or package:grin/ import. Epic and MWC plugin pins are inherited unchanged from #1507.

Lifecycle correctness

Wallet close/delete wakes Tor waiters, cancels and joins an active scan so its resume height is persisted, drains local synchronization, releases ownership/subscriptions, and only then closes native and Isar-backed state. Intentional close while a restore scan waits for Tor no longer emits unableToSync; the regression test observes the actual status event bus.

Verification

  • Final-stack changed suite: 470/470 passed on Linux and independently on an M2 Max macOS checkout.
  • Focused Grin lifecycle/scan gates passed, including 12/12 scan tests and the Tor-wait close case.
  • The real grin_native in-process chain passed 8/8 at final head fe1c3a306….
  • Exact final macOS and Linux debug builds succeeded; changed files are formatter-clean and git diff --check is clean.
  • GitHub CI is green at this exact head: tests, Windows build scripts, Linux release bundle, Codecov patch, and Codecov project (run 44889144888).

Keep this PR draft until #1507 merges, this exact head is reviewed, and CI remains green after retargeting.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.38418% with 476 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.31%. Comparing base (31224b6) to head (0262879).

Files with missing lines Patch % Lines
lib/wallets/wallet/impl/grin_wallet.dart 80.28% 139 Missing ⚠️
...rk_settings_view/wallet_network_settings_view.dart 0.00% 88 Missing ⚠️
...iew/restore_options_view/restore_options_view.dart 0.00% 59 Missing ⚠️
...wallet_view/sub_widgets/wallet_options_button.dart 0.00% 29 Missing ⚠️
lib/utilities/test_grin_node_connection.dart 0.00% 25 Missing ⚠️
...ackup_views/sub_widgets/restoring_wallet_card.dart 0.00% 23 Missing ⚠️
...settings/wallet_settings_wallet_settings_view.dart 0.00% 21 Missing ⚠️
...ettings/desktop_manage_block_explorers_dialog.dart 5.26% 18 Missing ⚠️
...wallets/wallet/supporting/grin/grin_transport.dart 73.21% 15 Missing ⚠️
..._view/new_wallet_recovery_phrase_warning_view.dart 0.00% 12 Missing ⚠️
... and 15 more
Additional details and impacted files
@@                     Coverage Diff                      @@
##           feat/slatepack-interface    #1538      +/-   ##
============================================================
+ Coverage                     17.61%   18.31%   +0.70%     
============================================================
  Files                          1149     1159      +10     
  Lines                        114122   115341    +1219     
============================================================
+ Hits                          20098    21124    +1026     
- Misses                        94024    94217     +193     

☔ 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
sneurlax changed the base branch from staging to feat/slatepack-interface November 20, 2026 08:59
@sneurlax
sneurlax force-pushed the feat/slatepack-interface branch 2 times, most recently from c9338d5 to 31224b6 Compare November 21, 2026 03:46
@sneurlax
sneurlax force-pushed the feat/grin branch 4 times, most recently from f29accc to d1fa13d Compare November 21, 2026 07:43
Integrate Grin through the sole public Dart dependency grin_native, pinned directly to its final public commit.
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