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

Move z_shieldcoinbase from experimental feature to fully supported rpc call #2639

Closed
bitcartel opened this issue Sep 27, 2017 · 13 comments
Closed
Assignees
Labels
A-rpc-interface Area: RPC interface A-wallet Area: Wallet M-has-pr To-be-removed (GitHub has linked:pr filter)
Milestone

Comments

@bitcartel
Copy link
Contributor

No description provided.

@bitcartel bitcartel added the A-wallet Area: Wallet label Sep 27, 2017
@bitcartel bitcartel added this to the 1.0.13 milestone Sep 27, 2017
@bitcartel bitcartel added M-has-pr To-be-removed (GitHub has linked:pr filter) and removed M-has-pr To-be-removed (GitHub has linked:pr filter) labels Sep 27, 2017
@daira daira added the A-rpc-interface Area: RPC interface label Sep 28, 2017
@bitcartel
Copy link
Contributor Author

We should educate users that the number of coinbase utxos selected for shielding is limited by
both the -mempooltxinputlimit=xxx option and a consensus rule defining a maximum transaction size of 100000 bytes. We could recommend a value for -mempooltxinputlimit in a blog post so that users avoid the issue where some miners choose not to mine transactions with a large number of utxo inputs, resulting in the transaction languishing in the mempool. #2668

@bitcartel bitcartel added the M-has-pr To-be-removed (GitHub has linked:pr filter) label Oct 27, 2017
zkbot added a commit that referenced this issue Oct 29, 2017
Closes #2639. z_shieldcoinbase is now supported, no longer experimental.

This reverts commit 5023af7.
@bitcartel
Copy link
Contributor Author

See also user who filed ticket "2-day delay in mining a transaction with 586 transparent inputs" #2668

@daira
Copy link
Contributor

daira commented Oct 30, 2017

I think we should add a parameter to the RPC, with no default, for the maximum number of inputs to be used.

@bitcartel
Copy link
Contributor Author

Yes, I think we should add a mandatory parameter for this, before the optional fee parameter.

@tromer
Copy link
Contributor

tromer commented Oct 30, 2017

How on Earth are users supposed to guess a suitable value for this parameter?

@bitcartel
Copy link
Contributor Author

@tromer Yes, I agree with that sentiment too. Trying to think how we can avoid issues like #2668. It might be simpler to explicitly state in the help message for the command that for the time being, if they have lots of coinbase utxos, they should restart their node with -mempooltxinputlimit of 50 or 100.

@bitcartel
Copy link
Contributor Author

@daira Regarding quadratic hashing fix, see #2584

@bitcartel
Copy link
Contributor Author

@str4d Thoughts? Overall I'm leaning towards updating the help message.

@tromer
Copy link
Contributor

tromer commented Oct 30, 2017

Users will inevitably ignore the help message, and it will appear to work as long as they have few coinbase utxos. Later on, when they end up with many coinbase utxos, they'll run into #2668 and won't know why.

The default must follow the principle of least astonishment.

Yes, having a magic-number default is inelegant, and creates a minor technical debt; but externalizing it to users isn't a good tradeoff.

@tromer
Copy link
Contributor

tromer commented Oct 30, 2017

Apropos the help message, it's doesn't explicitly say what happens if there are no coinbase utxos to shield. Does it still return an operationid, even though no txn is generated (similarly to z_sendmany with inadequate balance, for example)? Or an error?

@tromer
Copy link
Contributor

tromer commented Oct 30, 2017

Also: if changing the RPC interface is still in the cards (despite the experimental-feature deployment), then I advocate for renaming this RPC call to z_shield, with an argument saying whether to shield all utxos, just coinbase or just non-coinbase.
(cf. #1785, and chat starting https://chat.zcashcommunity.com/channel/zcash-dev?msg=932K3NKgedjbsg9KX).

@bitcartel
Copy link
Contributor Author

If there are no coinbase utxos to shield, an error is returned to the user.

Principle of least astonishment... yes... an optional parameter with a default of 50 would work well. I quite like this idea.

There are more parameters for z_shield which we haven't decided/discussed yet e.g. "amount", "zchangeaddress" so it's a bit early to lock down the interface to z_shield and tie it to z_shieldcoinbase which performs a subset of functionality.

@bitcartel
Copy link
Contributor Author

@tromer @str4d @daira I will add an optional parameter with a default of 50 as when discussing testing with some folk, one of the first things they asked for was to limit the utxos to 1, in case something went wrong, but restarting the node and setting the -mempooltxinputlimit limit was too much hassle at the time and they didn't want any downtime.

@bitcartel bitcartel self-assigned this Oct 31, 2017
bitcartel added a commit to bitcartel/zcash that referenced this issue Nov 1, 2017
… of 50.

The new parameter is to satisfy the principle of least astonishment
by providing a sensible default for the maximum number of transparent
inputs to shield.  If users do not configure -mempooltxinputlimit
it is possible for them to create transactions with hundreds of
inputs which suffer from mining delay, due to the current state of
the network where some miners have configured -mempooltxinputlimit
as a way to deal with the problem of quadratic hashing.
zkbot added a commit that referenced this issue Nov 2, 2017
Closes #2639. z_shieldcoinbase is now supported, no longer experimental.

This reverts commit 5023af7.
@zkbot zkbot closed this as completed in c2d3baf Nov 2, 2017
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 A-wallet Area: Wallet M-has-pr To-be-removed (GitHub has linked:pr filter)
Projects
None yet
Development

No branches or pull requests

3 participants