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

Blocking mode for zcash-cli when calling async RPC methods #3466

Closed
daira opened this issue Aug 15, 2018 · 5 comments
Closed

Blocking mode for zcash-cli when calling async RPC methods #3466

daira opened this issue Aug 15, 2018 · 5 comments
Labels
A-rpc-interface Area: RPC interface I-error-handling Problems and improvements related to error handling usability

Comments

@daira
Copy link
Contributor

daira commented Aug 15, 2018

It now takes on the order of a few seconds to make a shielded transaction in Sapling. This is short enough that it would be useful to have a mode in which zcash-cli blocks until the outcome is available.

With the current RPC interface this would be implemented by polling on z_getoperationstatus/z_getoperationresult, but that's an implementation detail and would not prevent implementing it in some other way in future.

It is an independent decision whether to make this the default for async methods and have a flag to obtain non-blocking behaviour, or the reverse.

@daira daira added usability I-error-handling Problems and improvements related to error handling A-rpc-interface Area: RPC interface labels Aug 15, 2018
@daira
Copy link
Contributor Author

daira commented Aug 15, 2018

I suggest -blocking=0/1 (same behaviour as other boolean options) for the option name.

@ch4ot1c
Copy link
Contributor

ch4ot1c commented Aug 18, 2018

Ack. If useful, here is a mildly refactored version of AsyncRPCOperation:
BTCPrivate/BTCP-Rebase#33

@tromer
Copy link
Contributor

tromer commented Jan 24, 2019

Duplicate of #1952?

@oxarbitrage
Copy link
Contributor

Yes, i think is a duplicate. I am after a solution in the cli level as suggested at #1952 (comment) as this will avoid the rpc thread block.

Adding this to zcash-cli is possible, effectively moving what appears to be a common use-case into the tool. The result is that zcash-cli will have to use the result from z_sendmany and start polling internally at some interval e.g. 1 second.

@daira let me know when you can if you agree with that approach to go over this.

@daira
Copy link
Contributor Author

daira commented Mar 15, 2021

Closing as duplicate.

@daira daira closed this as completed Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc-interface Area: RPC interface I-error-handling Problems and improvements related to error handling usability
Projects
None yet
Development

No branches or pull requests

4 participants