Skip to content

Feat/local devnet - #10

Merged
USCMig merged 4 commits into
mainfrom
feat/local-devnet
Sep 18, 2026
Merged

USCMig merged 4 commits into
mainfrom
feat/local-devnet

Conversation

@USCMig

@USCMig USCMig commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Build out local devnet features

USCMig and others added 4 commits September 18, 2026 03:15
Adds WalletNetwork::Regtest(RegtestUpgrade) so the wallet can run against
a local regtest devnet such as thus-spoke-zakura.

Regtest has no fixed activation table, so the network carries the newest
upgrade the node has active (NU6..NU6.3, all at height 1). A new
WalletParams enum (public Network | LocalNetwork) implements Parameters
and is the one type the wallet db, sync driver, and tx builder use, so the
branch id and Orchard circuit are derived correctly for the devnet.

- uregtest1… addresses via NetworkType::Regtest
- separate "regtest" wallet data dir
- regtest wallets scan from block 2 (the whole devnet chain), since
  groups are usually faucet-funded before their wallet is opened
- network-mismatch hints for regtest addresses in both directions
- enable zcash_protocol's local-consensus feature; declare the
  zcash_unstable cfg the LocalNetwork literal follows

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… discovery

Command layer for the regtest network:

- configured_network(): the one place every command resolves the
  network, including the devnet upgrade level (override, else detected
  from the node, else NU6). groups.rs now uses it too, fixing its
  "test" default that disagreed with the wallet's "main".
- set_wallet_config accepts "regtest" (it previously coerced anything
  non-main to "test") and an optional upgrade-level override.
- A connection test against a regtest node records the upgrade level
  read from its consensus branch id, so "auto" matches the node.
- detect_local_devnet: runs `thus-spoke-zakura endpoints --json` (PATH,
  $TSZ_INSTALL_DIR, ~/.local/bin), requires a loopback lightwalletd, and
  probes it, since the CLI reports endpoints from a file that outlives
  the devnet. Linux/macOS only, like the launcher.
- ZNS resolution returns a clear error on the devnet instead of
  "not registered"; signing requests carry "regtest" to co-signers.
- Devnet wallets neither reuse nor overwrite a group's recorded
  birthday (keyed by group only, so a testnet height would otherwise
  hide every devnet note).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Wallet settings: a third "Local devnet" network with a devnet panel —
  "Detect local devnet" (fills the endpoint, links the faucet/mining
  dashboard, or shows the install command), a network-upgrade select
  (Auto = read from the node, or force NU6…NU6.3), and a warning when
  the chain is below NU6.2, where sends will likely be rejected.
- Shared src/network.ts helpers (label, ticker, upgrade names) replace
  the duplicated unit() helpers and the isMainnet boolean threaded
  through the group wallet.
- Devnet amounts use a distinct rZEC ticker, including in the approver's
  Inbox, which previously showed "ZEC" for testnet requests too.
- Header pill reads Mainnet / Testnet / Devnet; recipient validation
  and placeholders know the uregtest1… prefix.
- On a pre-Ironwood devnet the headline balance is the Orchard pool
  (the live pool there), and the "move legacy funds" prompt is hidden.
  Mainnet and testnet stay strictly Ironwood.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
User guide section on running thus-spoke-zakura and connecting the
wallet to it (detect, upgrade level, funding from the faucet), with the
NU6 send limitation, the Orchard-pool balance before Ironwood, and how
to clear devnet wallet data after a devnet reset. README bullet and an
Unreleased changelog entry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@USCMig
USCMig merged commit 3a44e05 into main Sep 18, 2026
1 check passed
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