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

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

Merged
merged 2 commits into from
Oct 2, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Sep 29, 2022

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 ⚡ I-slow Problems with performance or responsiveness A-rpc Area: Remote Procedure Call interfaces 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
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Sep 29, 2022
@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
Copy link

codecov bot commented Sep 29, 2022

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 removed the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Sep 29, 2022
@teor2345 teor2345 requested review from upbqdn and arya2 and removed request for arya2 September 29, 2022 23:37
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

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
Copy link
Member

@upbqdn upbqdn left a comment

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
A-rpc Area: Remote Procedure Call interfaces C-bug Category: This is a bug I-slow Problems with performance or responsiveness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zebra full lightwalletd sync is significantly slower than zcashd
3 participants