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

add(rpc): note tree sizes to getblock api #7278

Merged
merged 11 commits into from
Aug 15, 2023
Merged

add(rpc): note tree sizes to getblock api #7278

merged 11 commits into from
Aug 15, 2023

Conversation

oxarbitrage
Copy link
Contributor

Motivation

We need to add sapling and orchard tree sizes to getblock method.

Close #6952

Solution

We have state methods to get what we need from a block.

This PR is a draft until it passed newly added CI tests.

Review

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?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

Follow Up Work

@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Jul 22, 2023
@oxarbitrage oxarbitrage added A-rpc Area: Remote Procedure Call interfaces lightwalletd any work associated with lightwalletd C-feature Category: New features and removed C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Aug 9, 2023
@arya2
Copy link
Contributor

arya2 commented Aug 9, 2023

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 9, 2023

update

☑️ Nothing to do

  • #commits-behind>0 [:pushpin: update requirement]
  • -closed [:pushpin: update requirement]

@oxarbitrage
Copy link
Contributor Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 11, 2023

update

✅ Branch has been successfully updated

@oxarbitrage
Copy link
Contributor Author

I am still not sure what is going on with the CI here as it seems that it still using the old lightwalletd cache.

I tried running the test of this PR locally and i was able to see the debug log i added here and the test pass:

$ cargo test wallet_grpc_tests --features lightwalletd-grpc-tests -- --ignored --nocapture
...
2023-08-11T23:07:28.892747Z  INFO Some(ChainMetadata { sapling_commitment_tree_size: 1170439, orchard_commitment_tree_size: 2 })
...
test lightwalletd_wallet_grpc_tests ... ok

@oxarbitrage
Copy link
Contributor Author

./zcash-rpc-diff 6666 getblock 2000000

getblock_diff1

./zcash-rpc-diff 6666 getblock 2000001

getblock_diff2

./zcash-rpc-diff 6666 getblock 2000002

getblock_diff3

./zcash-rpc-diff 6666 getblock 1890007

getblock_diff4

/zcash-rpc-diff 6666 getblock 1600000

getblock_diff5

@oxarbitrage oxarbitrage marked this pull request as ready for review August 14, 2023 20:41
@oxarbitrage oxarbitrage requested a review from a team as a code owner August 14, 2023 20:41
@oxarbitrage oxarbitrage removed the request for review from a team August 14, 2023 20:41
@oxarbitrage oxarbitrage requested a review from arya2 August 14, 2023 20:41
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

This looks great, thank you!

zebra-rpc/src/methods.rs Show resolved Hide resolved
zebra-rpc/src/methods.rs Show resolved Hide resolved
@arya2
Copy link
Contributor

arya2 commented Aug 14, 2023

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Aug 14, 2023

refresh

✅ Pull request refreshed

mergify bot added a commit that referenced this pull request Aug 14, 2023
mergify bot added a commit that referenced this pull request Aug 15, 2023
@gustavovalverde
Copy link
Member

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Aug 15, 2023

refresh

✅ Pull request refreshed

mergify bot added a commit that referenced this pull request Aug 15, 2023
@mergify mergify bot merged commit b322748 into main Aug 15, 2023
@mergify mergify bot deleted the issue6952 branch August 15, 2023 18:48
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-feature Category: New features lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add note tree size fields to the getblock RPC
3 participants