Repository navigation
Hold lookups a reply queues until the next chain tip - #212
Merged
Merged
Conversation
Recovery and Enhance replies can queue a txid lookup that the listing returns at once, so the display service sees another service's reply turn into a query within one sync. These tests expect such work to be held back until the tip changes, including when the user prefers it, and released by a reorg, a restart, or the next block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A recovery, Enhance or status reply can queue a txid lookup that the detail listing returned at once, so the display service saw another service's reply turn into a query in the same sync. A new in-memory TransparentPirSession, shared by a wallet's handles like EnhancePirSession, records the chain tip at which each lookup was newly queued. The listing leaves those out, preferred or not, until the tip changes. Records are journaled with the wallet transaction that queued the work, and a savepoint's journal is dropped with its rollback. No table, column or migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Activation queues the recovered receives' lookups at the current tip, so the listing now holds them back. The test checks that, then releases them as a restart would, keeping its tip so the account keeps private authority for the rest of the flow. A by-reference set_transparent_pir_session matches the other handle setters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without Orchard, storing a sent transaction queues no lookup, so the parameter is gated like the gap limits beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…on-fix # Conflicts: # librustzcash/zcash_client_sqlite/CHANGELOG.md # librustzcash/zcash_client_sqlite/src/lib.rs # librustzcash/zcash_client_sqlite/src/wallet.rs # librustzcash/zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs
Collaborator
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
p0mvn
marked this pull request as ready for review
October 15, 2026 23:58
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
At a given chain tip, a private reply should only change what the wallet asks at a later tip. Txid display lookups ("receipts") broke that rule: when transparent recovery found a receive, or an Enhance reply marked a transaction mixed, the new lookup was due at once and sorted first, so the display service could see another service's reply turn into a query seconds later in the same sync.
This holds such lookups back until the chain tip changes:
TransparentPirSession, shaped likeEnhancePirSession, records the chain tip at which each lookup was newly queued.WalletDbgets a fresh one by default;with_transparent_pir_session,set_transparent_pir_sessionandtransparent_pir_sessionlet an app's handles on one wallet share it.Existing tests that queued a lookup and listed it at the same tip now check that it is held and listed after the next block, or release it as a restart would when they test later stages of the lookup. The PIR adapter's end-to-end receipt test does the same: it checks that the lookups activation queued are held, then releases them as a restart would, so the account keeps its tip and private authority for the rest of the flow.
Breaking changes
TransparentPirSessionand threeWalletDbmethods. Handles opened on the same wallet should share one session, as they share the Enhance session; a handle with its own session lists work another handle queued at the same tip. Several crate-internal storage functions take the session.transparent_detail_workone chain tip later. After a restart they are listed at once; a restart is visible to the services anyway.Validation
The tests were committed first and run against main, where the new behaviour tests fail:
assert!(!listing(&st).contains(&txid))fails), and likewise when a reorg is about to lower the tip;assert!(!lookups(&case.st).contains(&case.txid))fails);With the change, the SQLite detail and recovery tests in the transparent configuration and the transparent PIR adapter's test-support suite pass locally, and Clippy reports no new warnings in the default, orchard or transparent configurations. CI passes on this head in every configuration.
🤖 Generated with Claude Code