✅ Error Handling Improvements Applied
error.rs: ChangedPcztCreateto include error details:PcztCreate(String)wallet.rs:569: Updatedpczt_shieldto log and capture error detailswallet.rs:657-660: Updatedpczt_createto log and capture error details- Build Status: ✅ Compiled successfully
Previously: "Failed to create PCZT" (no details)
Now: "Failed to create PCZT: <actual error from librustzcash>" (includes root cause)
Setup:
- Open http://localhost:3000
- Connect MetaMask snap
- Ensure wallet is fully synced
- Attempt to send ZEC with a memo
Steps:
To: <any_valid_zcash_address>
Amount: 0.001 ZEC
Memo: "Test memo for NU6.1"
Expected Behaviors:
- ✅ Success: Transaction creates PCZT successfully
- ❌ Failure: Console shows detailed error message
Check Console For:
pczt_create: create_pczt_from_proposal failed: <details>- Look for: memo-related errors, encoding issues, or validation failures
Setup:
- Ensure wallet has transparent balance
- Attempt to shield funds to Sapling/Orchard
Steps:
Shield Amount: <available_transparent_balance>
Target Pool: Orchard
Check Console For:
pczt_shield: create_pczt_from_proposal failed: <details>- Look for: anchor mismatch, tree state issues
Hypothesis: Wallet with many small notes might trigger input selection issues
Setup:
- Create multiple small notes by receiving several small transactions
- Attempt to spend more than any single note
- Forces wallet to combine notes
Check For:
- Input selection failures
- "insufficient balance" despite having enough total
Hypothesis: Wallet not fully synced might have stale anchor
Setup:
- Stop sync before completion (close browser mid-sync)
- Reload and attempt transaction without re-syncing
- See if pre-sync validation catches it or if PCZT creation fails
Check For:
- "Wallet not fully synced" warning triggers auto-sync (line 598-605)
- OR anchor mismatch in PCZT creation
Hypothesis: Notes received before block 3,146,400 might have compatibility issues
Check:
- Look at transaction history for any notes from before Jan 2026
- Try to spend these specific notes
- Check if serialization format causes issues
With our improved error handling, you should now see:
// Console output will show:
ERROR pczt_create: create_pczt_from_proposal failed: <ACTUAL ERROR>
// Examples of what might appear:
// - "anchor not found in commitment tree"
// - "insufficient balance after selecting inputs"
// - "note value exceeds maximum"
// - "invalid memo encoding"
// - "transaction would create negative balance"- Open Browser Console (F12) before any transaction attempt
- Enable verbose logging if available
- Copy full error message including the new detailed part
- Note wallet state:
- Current block height
- Number of notes
- Total balance
- Last sync time
If the forum user's error is reproducible:
- You'll see the SAME detailed error message
- Can then determine if it's:
- ✅ A memo-specific issue
- ✅ A tree/anchor sync issue
- ✅ A NU6.1 compatibility issue
- ✅ An input selection bug
If NO error occurs:
- The issue might be environment-specific
- Or related to a specific wallet state we haven't replicated
- Request more details from the forum user about their setup
- If error reproduced: Analyze the detailed error message to identify fix
- If error NOT reproduced: Deploy this improved error logging to production so users can report detailed errors
- Check forum: Ask user to update snap and provide new detailed error message
# Start dev servers
cd /home/skynet/ztest/WebZjs && yarn dev
# Check build status
cd /home/skynet/ztest/WebZjs && just build
# View console logs in browser
# F12 → Console tab → Look for "pczt_create" or "pczt_shield" errors