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

UX: Get Transaction vs Get Raw Transaction #276

Open
AloeareV opened this issue May 29, 2020 · 3 comments
Open

UX: Get Transaction vs Get Raw Transaction #276

AloeareV opened this issue May 29, 2020 · 3 comments

Comments

@AloeareV
Copy link

The GetTransaction function in the service.proto file makes the rpc call getrawtransaction. Due to the fact that there exists a seperate gettransaction rpc call, this caused me a good deal of confusion.

@LarryRuane
Copy link
Collaborator

I'm sorry you had this trouble, but it's too late to change this method's name, because it's already out in the field and has been for a while. But what we can do is document in both README.md and service.proto that GetTransaction is not equivalent to zcash gettransaction, that instead, it uses getrawtransaction. (FYI for anyone else, the difference between the two is that gettransaction relates to your (zcashd) wallet, whereas getrawtransaction relates to the entire blockchain ... the names, which come from bitcoin, are poor.)

Would this be an acceptable resolution to this ticket?

@LarryRuane
Copy link
Collaborator

It may be a very nice enhancement to add a debug-logging-tracing option that logs every rpc that's sent to zcashd. We wouldn't want to log the arguments (or at least be very careful about which ones we log) because these could represent privacy and security leaks. But which zcashd rpcs are called should be okay, and this wouldn't be enabled by default (that would be way too much logging). This probably would have saved you a lot of time. What do you think, @defuse?

@AloeareV
Copy link
Author

AloeareV commented May 30, 2020

Yeah, it makes sense that it's too late to change the method name. More explicit documentation would definitely be useful.

Looking into it more, the proto file does say rpc GetTransaction(TxFilter) returns (RawTransaction) {} so it's definitely somewhat on me for not catching that, and it's better documented than most, but more explicit documentation is always helpful.

I never even made the RPC call, because I erroneously saw that it was gettransaction (which doesn't support shielded transactions, unlike getrawtransaction) and I was dealing with shielded transactions. I spent some time digging through the docs trying to figure out if and how lightwalletd supported shielded transactions before I looked back at the "supported RPCs" bit in the readme and noticed that gettransaction wasn't even on there.

So yes, making the name difference clearer would be an acceptable resolution, definitely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants