Skip to content

Conversation

@sqhell
Copy link

@sqhell sqhell commented Jan 7, 2026

Changes

  • Migrated from ChainSafe librustzcash fork (46e8ee09) to official zcash/librustzcash (a40ee353) per PR Point upstream librustcash #139
  • Updated WebWallet constructor to use new ConfirmationsPolicy API (trusted/untrusted confirmations)
  • Added validation module with unit tests for confirmations policy parameter validation
  • Fixed e2e test infrastructure: added COOP/COEP headers for SharedArrayBuffer support
  • Updated Playwright config with proper browser args and timeout for WASM loading

Details

The breaking change was the Zcash NU6 (Network Upgrade 6) update in the official librustzcash.

Specifically:

Version Status
ChainSafe fork 46e8ee09 Was working (old)
Official c3425f9c3 Broken (bip32 0.6.0-pre.1 dependency hell)
Official a40ee353 Working (what PR #139 uses)

Quick Checklist for Infra Team

Item Action Required
COOP/COEP headers Yes - add to production web server
WebWallet constructor Yes - update all call sites
Dependencies No - handled at build time
Database schema No changes
API endpoints No changes
Build commands No changes

Test Before Deploying

They can verify headers are working by checking browser console:
// Should return true if headers are set correctly
console.log(typeof SharedArrayBuffer !== 'undefined')

Tests

Run unit tests for ConfirmationsPolicy validation

cargo test --package webzjs-wallet --lib validation

Run e2e tests (requires yarn and playwright)

cd packages/e2e-tests
yarn install
npx playwright test --project=chromium

Issues

  • Fixes compatibility with NU6 network upgrade
  • Resolves SharedArrayBuffer initialization failures in Chromium browsers

@sqhell sqhell requested a review from salindne January 7, 2026 19:10
@sqhell sqhell requested a review from irubido January 7, 2026 20:47
Copy link
Contributor

@irubido irubido left a comment

Choose a reason for hiding this comment

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

Looks good to me,
but still wallet does not work when built in WASM.

got this error in browser console

webzjs_wallet.js:1621 panicked at /home/ivan/.cargo/git/checkouts/librustzcash-c2c6180a1a11d4fa/a40ee35/zcash_client_memory/src/wallet_read.rs:734:9:
not yet implemented

@rob1997
Copy link
Contributor

rob1997 commented Jan 22, 2026

@sqhell has the WASM panic issue been resolved?

Looks good to me, but still wallet does not work when built in WASM.

got this error in browser console

webzjs_wallet.js:1621 panicked at /home/ivan/.cargo/git/checkouts/librustzcash-c2c6180a1a11d4fa/a40ee35/zcash_client_memory/src/wallet_read.rs:734:9:
not yet implemented

Copy link
Contributor

@rob1997 rob1997 left a comment

Choose a reason for hiding this comment

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

  • Fix the WASM panic by ensuring the librustzcash fork has the required implementation
  • Test WASM build in browser environment
  • Verify get_wallet_summary() works after wallet creation
  • Update README.md to reflect new constructor signature (currently shows old API), line 37 to show new constructor

@rob1997 rob1997 requested review from LesnyRumcajs and ec2 January 22, 2026 10:24
@LesnyRumcajs
Copy link
Member

@rob1997 I'm not a maintainer of this repository, so I can't really give this change an insightful review.

@LesnyRumcajs LesnyRumcajs removed their request for review January 22, 2026 12:54
@rob1997
Copy link
Contributor

rob1997 commented Jan 22, 2026

@rob1997 I'm not a maintainer of this repository, so I can't really give this change an insightful review.

gotcha, no worries. besides @sqhell we're all rust noobs here that's why I had assigned you :)

@irubido
Copy link
Contributor

irubido commented Jan 22, 2026

Great job with fix, just some of functionality still throws errors

Managed to sync to block 2978667 quite fast 👍 , transaction worked both to u ant t address.
Only got panic when trying to shield funds after sending them to t address

webzjs_wallet.js:1664 panicked at /home/ivan/.cargo/git/checkouts/librustzcash-nu61-7767c02336992644/0ec0723/zcash_client_backend/src/data_api.rs:1866:9:
not implemented: WalletRead::get_transparent_address_metadata must be overridden for wallets to use the `transparent-inputs` feature

On page refresh i got errors

Saved wallet detected. Restoring wallet from storage
webzjs_wallet.js:1727  INFO webzjs_wallet::bindgen::wallet: Serialized db was provided to constructor. Attempting to deserialize

webzjs_wallet.js:1664 panicked at /home/ivan/.cargo/git/checkouts/librustzcash-nu61-7767c02336992644/0ec0723/zcash_client_memory/src/types/transparent.rs:191:66:
FIXME

and toast message passed to webapp

Wallet data incompatible after upgrade. Please re-sync your wallet.

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.

6 participants