Skip to content

Feat/nu7 portable keys - #27

Open
aratrika1996 wants to merge 8 commits into
mainfrom
feat/nu7-portable-keys
Open

aratrika1996 wants to merge 8 commits into
mainfrom
feat/nu7-portable-keys

Conversation

@aratrika1996

Copy link
Copy Markdown
Contributor

No description provided.

aratrika added 5 commits November 4, 2026 17:34
Replace the local path override with a pinned git revision of the
zcash_client_memory NU7 port, so the workspace builds from a clean clone.
Repoint it at red-dev-inc/zcash_client_memory once that port merges.
Comment thread packages/snap/snap.manifest.json Outdated
"allowedOrigins": ["https://webzjs.red.dev"]
"allowedOrigins": [
"https://webzjs.red.dev",
"http://localhost:3000",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be be removed keep in local should not commit it, otherwise anyone can run localhost and inject

(NETWORK === 'test' ? TESTNET_PROXY : MAINNET_PROXY);

// Back-compat alias for existing imports.
export const MAINNET_LIGHTWALLETD_PROXY = LIGHTWALLETD_PROXY;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unused please check and remove it

@danielgorgonha

Copy link
Copy Markdown

On this branch (9ad0a58), pczt_create fails for a view-only account imported from an Orchard-only UFVK (one Orchard item, no transparent key). I created it with create_account_view_ufvk, synced to the tip, and a shielded payment failed in all 3 runs with:

Failed to create Pczt: DataSource(CorruptedData("ephemeral_addresses corrupted"))

  1. zcash_client_backend 0.25.0 calls reserve_next_n_ephemeral_addresses(account_id, ephemeral_outputs.len()) when it creates the transaction, so n = 0 when there is no ephemeral output (data_api/wallet.rs:2554).
  2. In zcash_client_memory at b4c8f0d3 (the rev this branch pins in Cargo.toml), that function calls Account::first_unreserved_index() before it looks at n (wallet_write.rs:1506-1518), and first_unreserved_index returns CorruptedData when first_unstored_index() - EPHEMERAL_GAP_LIMIT underflows (types/account.rs:421-426).
  3. An account with no transparent key never stores ephemeral addresses (reserve_until stores only when ephemeral_ivk() is Some, types/account.rs:429-433), so first_unstored_index() is 0 and pczt_create fails for any such account, even when the payment has no ephemeral output.

A possible fix in the store: return an empty list when n == 0, before calling first_unreserved_index, and for an account without a transparent key return an address-generation error when n > 0, instead of CorruptedData. I can open a PR with this and a test against feat/snap-nu7 in red-dev-inc/zcash_client_memory, if you want it.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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.

3 participants