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
z_getbalance deprecation (question) #5925
Comments
This is an interesting problem. The For shielded funds, we wanted each spending key to be an independent "bucket of funds", which is why The new account-based APIs are intended to rectify this rather messy situation: each account is treated as a separate bucket of funds, and within that we can have multiple (diversified) addresses. The "bucket of funds" then becomes tied to the account (or equivalently, its full viewing key). We maintain So my immediate question is, in what way are you using
Yep, this is indeed a problem with the way We plan to implement new RPC methods that more directly focus on a usable workflow for sending funds from accounts. In particular, this is likely to be a two-phase process:
With this model, the "check I have sufficient balance, then send" workflow would be entirely replaced by this new workflow; the returned transaction effects could include "you don't have sufficient balance to send this transaction". But also
That's a fair consideration, and why I'd like to learn both what your use case is, and what kind of effort a migration would require. We definitely want to move people away from the legacy APIs (so we can deprecate and eventually remove the transparent-only wallet components), and the new deprecation process is meant to make this more concretely visible and with a more well-defined timeline.
Whoops, we missed this, thanks! This is fixed in #5926. |
@josef-v Does this answer your question? If you need to have the ability to get the balance for a single transparent address, can you answer @str4d's question here:
|
Following the deprecation timeline, the earliest we could have disabled Per the above discussion, I would still like to hear your use-case @josef-v if you have time to write it up. |
This doesn't concern me anymore as we have discontinued support for zcash. Our whole codebase was based on bitcoind and it's rpc. Having similar methods (with different names only) for zcash was making things simple for us. Sure, there were some differences like shielding, but from the top level view, zcash behaved the same as bitcoin most of the time. So the main problem with this change for me is that it breaks legacy behavior and I don't see a reason for it to be necessary to break it. Sorry for not giving you any specific example, but zcash is out of my scope for some time already. |
I am confused by the deprecation process and by deprecation of
z_getbalance
Release notes state that:
so it's not to supplement but to supplant only, if the
z_getbalance
gets deprecated?What I have problem with is that
z_getbalanceforviewingkey
does a different thing thanz_getbalance
. Withz_getbalance
I have a simple API which lets me know what is an outstanding balance on my addresses including transparent addresses. Withz_getbalanceforviewingkey
, I have to get a viewing key for the address first and than use this method to emulate the same functionality. Also, I am not able to get a viewing key for a transparent address, am I?This goes against usage of other methods like
z_sendmany
which uses address as a first argument. Typical use case would be checking that I have sufficient funds on that address byz_getbalance
and then issuingz_sendmany
.What I understand from the changes in the last release, zcash wants to move user experience from addresses to accounts (my simplified view of that) but I am not sure if it's a good idea to deprecate the previously used approach/methods. And I admit that I am just being selfish in this because deprecation of these methods will raise a lot of new tasks for me to implement in our codebase where we use
z_getbalance
a lot :)Note:
There is a document doc/book/src/user/deprecation.md merged into master which contains information about deprecated methods and
z_getbalance
is missing.The text was updated successfully, but these errors were encountered: