Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zcb::sync: Refresh UTXOs at the start of each scanning cycle #1536

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

str4d
Copy link
Contributor

@str4d str4d commented Sep 11, 2024

No description provided.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.

Project coverage is 61.07%. Comparing base (e7abed3) to head (7026aeb).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
zcash_client_backend/src/sync.rs 0.00% 53 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1536      +/-   ##
==========================================
- Coverage   61.26%   61.07%   -0.19%     
==========================================
  Files         146      146              
  Lines       16890    16942      +52     
==========================================
  Hits        10347    10347              
- Misses       6543     6595      +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK with a minor note about how to handle birthday heights (which may not be specifically applicable to this PR.)

@@ -62,11 +72,27 @@ where
<DbT as WalletRead>::Error: std::error::Error + Send + Sync + 'static,
<DbT as WalletCommitmentTrees>::Error: std::error::Error + Send + Sync + 'static,
{
#[cfg(feature = "transparent-inputs")]
let wallet_birthday = db_data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should set Sapling activation (or maybe Sapling activation + 1) as the minimum height to use for block retrieval in scanning. IIRC there's currently a bug where lightwalletd won't return the frontiers prior to Sapling activation correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that already happens elsewhere, or if not then it should? Block retrieval is entirely dictated by the scan queue, so what matters is how the queue is filled; account creation (and the birthday heights provided therein) is what defines the earliest entries in the scan queue.

@str4d str4d merged commit 0777cbc into main Sep 12, 2024
26 of 28 checks passed
@str4d str4d deleted the zcb-sync-refresh-utxos branch September 12, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants