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

getblock JSON-RPC method #3144

Closed
Tracked by #3134
mpguerra opened this issue Dec 3, 2021 · 1 comment · Fixed by #3707
Closed
Tracked by #3134

getblock JSON-RPC method #3144

mpguerra opened this issue Dec 3, 2021 · 1 comment · Fixed by #3707
Assignees
Labels
lightwalletd any work associated with lightwalletd

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Dec 3, 2021

Motivation

lightwalletd uses the getblock JSON-RPC method.

lightwalletd caches all the blocks from Sapling activation, asking for them in height order.

So this RPC needs to be fast:

NU5 & Orchard

lightwalletd implemented NU5 & Orchard changes here:

Required Fields

The method is documented here: https://zcash.github.io/rpc/getblock.html

lightwalletd only uses height and verbosity = 0 as arguments.

And only the following fields are used by lightwalletd: https://github.com/zcash/lightwalletd/blob/master/common/common.go#L232

Field list:

"data"             (string) A string that is serialized, hex-encoded data for the block.

Tasks

  • Implement the RPC method
  • Add RPC acceptance tests to CI
  • Test that the RPC method works with lightwalletd

API Reference

We plan to use jsonrpc_core with:

Example Code

Here are examples of:

@ftm1000 ftm1000 added the S-needs-triage Status: A bug report needs triage label Feb 10, 2022
@ftm1000
Copy link

ftm1000 commented Feb 10, 2022

@ftm1000 ftm1000 removed the S-needs-triage Status: A bug report needs triage label Feb 21, 2022
@oxarbitrage oxarbitrage self-assigned this Feb 28, 2022
@mergify mergify bot closed this as completed in #3707 Mar 10, 2022
@ftm1000 ftm1000 added the lightwalletd any work associated with lightwalletd label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants