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

getrawtransaction JSON-RPC method #3145

Closed
Tracked by #3134
mpguerra opened this issue Dec 3, 2021 · 2 comments · Fixed by #3908
Closed
Tracked by #3134

getrawtransaction JSON-RPC method #3145

mpguerra opened this issue Dec 3, 2021 · 2 comments · Fixed by #3908
Labels
lightwalletd any work associated with lightwalletd

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Dec 3, 2021

Motivation

lightwalletd uses the getrawtransaction JSON-RPC method in response to wallet queries.

So this RPC needs to be fast:

Assumptions

lightwalletd doesn't need witnessed mempool transaction IDs for Orchard (UnminedTxId).
https://discord.com/channels/809218587167293450/809250822579028008/943326658042163270

Required Fields

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

lightwalletd uses these arguments:

And only these fields are used by lightwalletd:

Field list:

{
  "hex" : "data",       (string) The serialized, hex-encoded data for 'txid'
  "height" : n,             (numeric) The block height of the transaction in the best chain, or -1 if not in the best chain
}

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:

@teor2345 teor2345 changed the title JSON-RPC method getrawtransaction JSON-RPC method Dec 6, 2021
@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 16, 2022
@teor2345
Copy link
Contributor

@ftm1000 @conradoplg this ticket doesn't depend on the transaction database indexes.

It will perform poorly until we do #3151, but it should be ok for testing.

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.

3 participants