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

Faucet doesn't work with sapling addresses #3

Open
garethtdavies opened this issue Nov 8, 2018 · 1 comment
Open

Faucet doesn't work with sapling addresses #3

garethtdavies opened this issue Nov 8, 2018 · 1 comment

Comments

@garethtdavies
Copy link

garethtdavies commented Nov 8, 2018

As there is a check of the length of the address the faucet only recognises Sprout addresses and so won't work with Sapling addresses see https://github.com/zcash/zfaucet/blob/master/faucet/views.py#L78

In addition to the above, even if it did detect Sapling addresses correctly it would likely hit an issue sending from a Sprout address to a Sapling one (or vice versa) directly as it is just using the first returned address from z_listaddresses.

A suggested hacky quick fix could look something like the following garethtdavies/zcash-faucet@ffbfffc where transparent addresses are used to send Sapling txs to keep existing support for Sprout txs. This is utterly untested and uses this method https://github.com/arcalinea/pyZcash/blob/master/pyZcash/rpc/ZDaemon.py#L93 to get the sending t-addr as the existing transparent stuff doesn't use z_sendmany so doesn't have this issue.

A better fix would involve invoking z_validateaddress to detect Sapling/Sprout addresses and selecting the sending address appropriately.

@garethtdavies
Copy link
Author

garethtdavies commented Feb 16, 2019

Just updating this. The reason I didn't make a PR and test the above is that I ran into some issues during the setup (I can't recall what exactly). If anyone wants to get this into a working Docker container(s) that'd be awesome 👍

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

1 participant