2/5: External-only scanning with sync loop enhancement pipeline#15
Closed
czarcas7ic wants to merge 1 commit into
Closed
2/5: External-only scanning with sync loop enhancement pipeline#15czarcas7ic wants to merge 1 commit into
czarcas7ic wants to merge 1 commit into
Conversation
d988658 to
1196ffb
Compare
d64c5f0 to
93600c8
Compare
e980ac7 to
44e9b4e
Compare
93600c8 to
2ef0016
Compare
44e9b4e to
399e05b
Compare
d345f0e to
da376b5
Compare
greg0x
pushed a commit
that referenced
this pull request
Apr 14, 2026
…f0768ea4..dd0ea2c3c5 dd0ea2c3c5 Merge pull request #23 from zcash/2026-03-doc-fixes 93b26b7db1 v0.4.1 release - minor doc fixups d528fa82e3 Merge pull request #22 from zcash/2025-12-doc-git-subtree b421ef0b34 Merge pull request #22 from zcash/2025-12-doc-git-subtree 4a26e54c36 Fix git subtree command syntax in README 34bb38b606 Merge pull request #20 from zcash/doc/get_block a507182f92 Document GetBlock transparent data behavior and clarify nullifier RPCs fc5cc9a4b1 Merge pull request #19 from zcash/deprecate_get_nullifiers f0ebc72cad Mark `GetBlockNullifiers` and `GetBlockRangeNullifiers` as deprecated. 9a5f7a0eec Merge pull request #16 from zcash/2026-01-remove-fullHeader f1095897d9 revert the previous PR that added BlockID.fullHeader 99d9bf9fff Merge pull request #15 from zcash/2025-12-compactblock-doc bbdd689d73 either CompactBlock.{hash, prevHash}, or CompactBlock.header aa42926ed3 Merge pull request #13 from pacu/add-README da4d3d57d8 Add rationale suggested by @LarryRuane 4edd22465b fix type e36df314b8 clean up whitespace and line width 215cb5a3f3 Add PR suggestions. Organize Clients section 3e78d5d872 Apply suggestions from code review 96b86544db Apply suggestion from @LarryRuane 6259b97df0 Apply suggestion from @nuttycom f2fcef3e42 Apply suggestion from @nuttycom 8cc1e66b11 Apply suggestion from @LarryRuane 99132222dd Apply suggestion from @nuttycom 207cc5e6f9 create a README file with context and instructions 7392b9706f Merge pull request #12 from zcash/release/v0.4.0 git-subtree-dir: zcash_client_backend/lightwallet-protocol git-subtree-split: dd0ea2c3c5827a433e62c2f936b89efa2dec5a9a
Restructure the sync loop to service enhancement requests between scan chunks. This prepares for External-only batch scanning by ensuring change notes discovered during enhancement are properly handled. - Add ServiceOutcome (Drained/Stabilized) for termination logic - store_raw_transaction enriches outputs with nullifiers and tree positions, then calls notify_wallet_note_positions - Defer nullifier pruning from put_blocks to sync orchestrator - Add collect_wallet_note_positions to decrypt module - Add zip-233 feature for TransactionData::from_parts under NU7 Co-Authored-By: Claude <noreply@anthropic.com>
0695f91 to
a1f3f63
Compare
da376b5 to
6b150a3
Compare
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.
Summary
scan_cached_blocksto use onlyScope::ExternalIVKs, halving key-agreement work per outputrun()/running()now service enhancement requests between scan chunks viaServiceOutcome(Drained/Stabilized)store_raw_transactionenriches decrypted outputs with nullifiers and tree positions, then callsnotify_wallet_note_positionsput_blocksto the sync orchestrator so enhancement can still consult the tracked-nullifier mapraware queued asEnhancement(notGetStatus), andtransaction_data_requests()is returned in deterministic order for the stabilized-queue detectionsync::runcallers by havingscan_cached_blocks()prune automatically only when no follow-up transaction-data requests were enqueued, and add focused regressions for both that behavior and the transparent mempool cursor-advance edge caseContext
This is PR 2/5 — the core behavioral change. It depends on PR 1 for the enrichment API, includes the minimum SQLite queue behavior needed for the new sync logic to be correct in isolation, and now also makes the direct-
scan_cached_blockspruning contract explicit for non-sync callers.Full stack:
adam/enriched-decrypted-output— API foundationsadam/sqlite-enhancement-support— SQLite backend implementationadam/memory-backend-enhancement— Memory backend implementationadam/external-ivk-scan-tests— Tests and changelogsReview focus
Drained/Stabilizedtermination logic insync.rsstore_raw_transactionenrichment and note-position notification flowTest plan
cargo check -p zcash_client_backend --features synccargo test -p zcash_client_backend --all-features scan_cached_blocks_prunes_when_request_queue_is_emptycargo test -p zcash_client_backend --all-features scan_cached_blocks_defers_pruning_when_requests_are_pendingcargo test -p zcash_client_backend --all-features mempool_all_request_does_not_advance_address_checkedcargo test -p zcash_client_backend --all-features mined_all_request_advances_address_checked