Skip to content

1. fix(rpc): Fix slow getblock RPC (verbose=1) using transaction ID index - #5307

Merged
mergify[bot] merged 2 commits into
mainfrom
fix-slow-getblock-verbose
Oct 2, 2022
Merged

1. fix(rpc): Fix slow getblock RPC (verbose=1) using transaction ID index#5307
mergify[bot] merged 2 commits into
mainfrom
fix-slow-getblock-verbose

Conversation

@teor2345

@teor2345 teor2345 commented Sep 29, 2022

Copy link
Copy Markdown
Contributor

Motivation

Zebra's lightwalletd sync takes a lot longer than zcashd's (7h vs 5h).

Fixes #5298.

Solution

Use the transaction ID index for verbose getblock RPC requests, rather than deserializing the entire block, then hashing all the transactions in the block.

Also add timing output to zcash-rpc-diff.

Review

This is a routine fix.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@teor2345 teor2345 added C-bug Category: This is a bug P-Medium ⚡ labels Sep 29, 2022
@teor2345 teor2345 self-assigned this Sep 29, 2022
@teor2345
teor2345 requested a review from a team as a code owner September 29, 2022 20:26
@teor2345
teor2345 requested review from arya2 and removed request for a team September 29, 2022 20:26
@teor2345 teor2345 changed the title fix(rpc): Fix slow verbose getblock RPC using transaction ID index fix(rpc): Fix slow getblock RPC (verbose=1) using transaction ID index Sep 29, 2022
@codecov

codecov Bot commented Sep 29, 2022

Copy link
Copy Markdown

Codecov Report

Merging #5307 (9f55229) into main (9849d14) will decrease coverage by 0.04%.
The diff coverage is 78.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5307      +/-   ##
==========================================
- Coverage   79.15%   79.10%   -0.05%     
==========================================
  Files         308      308              
  Lines       39479    39560      +81     
==========================================
+ Hits        31248    31295      +47     
- Misses       8231     8265      +34     

@teor2345
teor2345 requested review from arya2 and upbqdn and removed request for arya2 September 29, 2022 23:37

@oxarbitrage oxarbitrage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed this PR and it looks great to me. I am not approving as i am not assigned and someone else might have pending comments.

@teor2345 teor2345 changed the title fix(rpc): Fix slow getblock RPC (verbose=1) using transaction ID index 1. fix(rpc): Fix slow getblock RPC (verbose=1) using transaction ID index Oct 2, 2022

@upbqdn upbqdn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Everything looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category: This is a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zebra full lightwalletd sync is significantly slower than zcashd

3 participants