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

sendrawtransaction JSON-RPC method #3146

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

sendrawtransaction JSON-RPC method #3146

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

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Dec 3, 2021

Motivation

lightwalletd uses the sendrawtransaction JSON-RPC method.

Design Decisions

zcashd puts the transaction in its mempool, so Zebra should do the same thing.

What should we do if we think the transaction is invalid?

  • log it at warning level
  • If Zebra rejects a transaction that zcashd accepts, that's a bug in Zebra we need to fix

Zebra doesn't implement pending transactions in the mempool, so the transaction can't depend on another mempool transaction.

Required Fields

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

lightwalletd only uses hexstring (raw transaction data) as an argument: https://github.com/zcash/lightwalletd/blob/master/frontend/service.go#L302

Field list:

"hex"             (string) The transaction hash in hex - ignored by `lightwalletd`?

Tasks

  • Implement the RPC method
  • Add RPC acceptance tests to CI
  • Test that the RPC method works with lightwalletd
  • Test with transactions that get split across multiple TCP packets - use a max-sized transaction

We need to test with large transactions because our JSON protocol fixes operate on each packet.

API Reference

We plan to use jsonrpc_core with:

Example Code

Here are examples of:

Out of Scope

lightwalletd seems to do some weird error handling, but this is out of scope for Zebra: https://github.com/zcash/lightwalletd/blob/master/frontend/service.go#L308

@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

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