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

getaddresstxids JSON-RPC method #3147

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

getaddresstxids JSON-RPC method #3147

mpguerra opened this issue Dec 3, 2021 · 2 comments · Fixed by #4119
Assignees
Labels
A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes lightwalletd any work associated with lightwalletd

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Dec 3, 2021

Motivation

lightwalletd uses the getaddresstxids JSON-RPC method.

This method returns the transaction IDs for both spent and unspent transparent outputs: https://github.com/zcash/zcash/blob/c76b756a688bfa0a4396a45355814cdc9f9a47e3/src/main.cpp#L3170

Requirements

Returned txids are in the order they appear in blocks.
(This ensures that they are topologically sorted.)

Required Fields

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

But only the multi-argument format is used by lightwalletd: https://github.com/zcash/lightwalletd/blob/631bb16404e3d8b045e74a7c5489db626790b2f6/common/common.go#L97-L102

Argument list:

{
  "addresses":
    [
      "taddr"  (string) The base58check encoded address
      ,...
    ]
  "start" (number, optional) The start block height
  "end" (number, optional) The end block height
}

Field list:

[
  "transactionid"  (string) The transaction id
  ,...
]

Tasks

Implementation:

Testing:

  • Add RPC unit tests
  • Test that the RPC method works with lightwalletd
@teor2345 teor2345 changed the title JSON-RPC method getaddresstxids 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
@ftm1000 ftm1000 added lightwalletd any work associated with lightwalletd and removed lightwalletd any work associated with lightwalletd labels Mar 16, 2022
@teor2345 teor2345 added A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes labels Mar 24, 2022
@teor2345
Copy link
Contributor

teor2345 commented Apr 5, 2022

The state parts of this ticket aren't merged yet (#4038, #4022), but you could add a state request/response that returns an empty list of transactions.

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 A-state Area: State / database changes lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants