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.
sqhell
force-pushed
the
fix/historic-sync-oom
branch
from
October 19, 2026 16:51
d5aab34 to
b0297ab
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
zcash_client_memoryto the fork revision carrying the eager block-cache delete and nullifier-map pruning (red-dev-inc/zcash_client_memory Classify history by what the wallet spent, not only by what it received #16 and Wallet stats card on the account summary #17).Why
A Full Resync from an early birthday crashed the sync worker with
RuntimeError: unreachableafter a few batches and the UI hung. The cache's lazydeletekept every downloaded compact block for the whole sync, and the nullifier map kept every on-chain nullifier for the life of the wallet; the browser caps wasm memory at 1 GiB. Measured natively over 800k blocks: peak 2,039 MiB before, 383 MiB after.Stack
Position 8 of 15 in the WebZjs release order, to be merged in this order into
main. Independent of the feature PRs but rebased on #20 (chore/rust-checks) so its checks are green; the commits of this PR alone are here: sqhell/WebZjs@chore/rust-checks...fix/historic-sync-oomchore/rust-checksfix/reuse-sync-workerfix/grpc-web-trailers-onlyfix/resync-dialogfeat/send-againfix/pczt-parse-errorfix/sign-change-paired-spendsfix/historic-sync-oom(this PR)feat/history-resync-hintfix/wallet-store-epochsfeat/ironwood-poolfix/history-from-spendsfeat/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