Repository navigation
Conversation
This was referenced Oct 19, 2026
Rust-Checks has failed on main since the NU6.3 toolchain bump: rustfmt differs in nine files, and clippy on nightly-2025-06-15 rejects ten uninlined format arguments in webzjs-keys and one map iteration in webzjs-requests under -D warnings. Apply rustfmt and clippy's own suggestions; no behaviour changes.
A Full Resync from an early birthday (for example 2,600,000) crashed the sync worker with `RuntimeError: unreachable` after a few 10,000-block batches, and the wallet UI hung afterwards. MemBlockCache::delete in zcash_client_memory was a lazy `async fn`, and zcash_client_backend::sync::run only awaits the returned futures once the whole sync has finished, so every downloaded compact block stayed in the cache for the entire sync. The browser caps wasm memory at 1 GiB and the allocation failure traps without a panic message. Point zcash_client_memory at a revision that removes the blocks when `delete` is called, and that also prunes the nullifier map below the fully scanned height as zcash_client_sqlite does, so a historic sync no longer keeps every on-chain nullifier in memory for the life of the wallet. Measured natively, syncing 800k blocks (2.6M to tip, batch 10,000): peak heap 2,039 MiB before, 524 MiB with the eager delete, 383 MiB with the pruning as well.
Since NU6.3, payments to shielded addresses and the shielded change of shielding transactions are delivered through the Ironwood pool, and this is where a wallet's shielded funds live from then on. zcash_client_memory did not track that pool, so every such transaction failed at creation with ProposalNotSupported, and Ironwood funds were invisible. Move the zcash_client_memory pin to the fork revision that tracks the Ironwood pool (its own commitment tree, notes, nullifiers, balances and serialization), and make the two wallet-side changes that depend on it: - pczt_prove proves the Ironwood bundle as well as the Orchard one. The two bundles share the circuit and proving key; without the second proof, extraction rejects every post-NU6.3 payment to a shielded address. - The wallet summary reports the Ironwood balance, and the web wallet counts it as shielded funds in the balance hook and the snap balance cache. Verified on mainnet: a payment from legacy Orchard notes to the wallet's own unified address, which the backend routes through Ironwood, built, signed in the snap, proved and broadcast, and the resulting Ironwood note was scanned. Both pins move together with this commit: zcash_client_memory to the fork revision that exposes spend records and change flags for history queries, and every librustzcash crate to sqhell/librustzcash, which is the previous pin (0a2c6d1) plus the upstream fix that records Ironwood outputs when a transaction is extracted from a PCZT. Without the latter, a payment to a shielded address signed through the snap left no sent record at all, and the history later showed only its change as a receipt.
sqhell
force-pushed
the
fix/history-from-spends
branch
from
October 19, 2026 16:51
3983061 to
d24b3b7
Compare
sqhell
force-pushed
the
fix/history-from-spends
branch
from
October 19, 2026 17:13
d24b3b7 to
6b81c94
Compare
…uning The pinned revision is the head of the zcash_client_memory PR stack: the Ironwood pool on top of the nullifier-map pruning tests, then strict decode, loud encode, the dirty flag, the rewind nullifier fix and block pruning that the resync and persistence work was tested against.
…eceived The history decided a transaction's direction from its outputs alone: value received minus value recorded as sent. That misreads two common cases. A transaction that spends our notes but whose only visible outputs are change showed up as "Received" for the change amount. That happens for every payment built on another device with the same keys, which leaves no sent record here, and, until the backend pin was fixed, for every payment delivered through the Ironwood pool, whose outputs the PCZT extraction did not record. The wallet in hand showed three outgoing payments as receipts and so appeared to have lost most of its funds. Change found by scanning rather than recorded at build time is only flagged when the scanner also saw the matching spend in the same pass, so an Ironwood change note scanned in the same batch as the note it came from was treated as an external receipt. Direction now comes from the wallet's own spend records: a transaction that spent any of our notes, or recorded a payment to an outside recipient, is outgoing. The amount is what was recorded as paid, or, when no recipient was recorded, everything spent that did not come back, which then includes the fee. A note is change if it was flagged as such or was received under the internal key scope. Funds that only moved within the wallet still show as shielding, and transactions that only spent our notes now appear at all.
sqhell
force-pushed
the
fix/history-from-spends
branch
from
October 19, 2026 17:28
6b81c94 to
367b4d8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
The history decided direction from outputs alone, so a transaction whose only visible outputs were change showed as "Received" for the change amount: every payment built on another device with the same keys, and every Ironwood payment until the backend pin was fixed. The wallet in hand showed three outgoing payments as receipts and appeared to have lost most of its funds. Ironwood change scanned in the same batch as its source note was also treated as an external receipt. Needs the spend-record accessors from the memory stack, hence stacked on the Ironwood PR.
Stack
Position 12 of 15 in the WebZjs release order, to be merged in this order into
main. Builds on #15 (feat/ironwood-pool). GitHub shows the whole stack againstmainuntil those merge; the commits of this PR alone are here: sqhell/WebZjs@feat/ironwood-pool...fix/history-from-spendschore/rust-checksfix/reuse-sync-workerfix/grpc-web-trailers-onlyfix/resync-dialogfeat/send-againfix/pczt-parse-errorfix/sign-change-paired-spendsfix/historic-sync-oomfeat/history-resync-hintfix/wallet-store-epochsfeat/ironwood-poolfix/history-from-spends(this PR)feat/wallet-statsfeat/resumable-syncfeat/resync-resumeRust pins reference
sqhell/zcash_client_memoryandsqhell/librustzcashby revision so CI builds exactly what was tested; once the zcash_client_memory stack (red-dev-inc/zcash_client_memory #16 to #21) merges, the memory pin goes back tored-dev-inc/zcash_client_memoryfeat/snap-nu63. The integration branchtest/all-fixeson the fork merges all fourteen and is the build that was tested end to end.Tests