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

Implement validateaddress RPC #5722

Closed
Tracked by #5234
teor2345 opened this issue Nov 25, 2022 · 7 comments · Fixed by #6086
Closed
Tracked by #5234

Implement validateaddress RPC #5722

teor2345 opened this issue Nov 25, 2022 · 7 comments · Fixed by #6086
Assignees
Labels
A-rpc Area: Remote Procedure Call interfaces C-enhancement Category: This is an improvement

Comments

@teor2345
Copy link
Contributor

teor2345 commented Nov 25, 2022

Motivation

Some mining pools use this RPC to check addresses.

Specifications

https://zcash.github.io/rpc/validateaddress.html

Designs

We can call the zcash_address crate to validate shielded and unified addresses. (Zebra also has its own transparent address parsing, but we'd be better to just be consistent and use zcash_address for everything.)

We just need to implement these fields:

Transparent:

  • p2pkh
  • p2sh
  • scriptPubKey (optional, only do it if it's easy)
  • pubkey (optional, only do it if it's easy)
  • isscript

Related Work

@teor2345 teor2345 added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Medium ⚡ A-rpc Area: Remote Procedure Call interfaces labels Nov 25, 2022
@mpguerra
Copy link
Contributor

We should implement these, however since they are not strictly mining RPCs they don't fall within the scope of the MVP.

@teor2345
Copy link
Contributor Author

We should implement these, however since they are not strictly mining RPCs they don't fall within the scope of the MVP.

Some mining pools won't be able to use Zebra until we implement these RPCs.

@teor2345
Copy link
Contributor Author

teor2345 commented Jan 5, 2023

I added validateaddress to this ticket, because some mining pool software needs it. The fields are almost exactly the same as z_validateaddress, just with different names.

@str4d
Copy link
Contributor

str4d commented Jan 5, 2023

Note that the type field is deprecated and will be disabled by default in zcashd 5.4.0. It is being renamed to address_type.

@teor2345
Copy link
Contributor Author

teor2345 commented Jan 5, 2023

Note that the type field is deprecated and will be disabled by default in zcashd 5.4.0. It is being renamed to address_type.

Since that change hasn't been released yet, we might use both names until miners update.

@mpguerra
Copy link
Contributor

@mpguerra mpguerra moved this to 🆕 New in Zebra Jan 24, 2023
@mpguerra mpguerra added this to Zebra Jan 24, 2023
@arya2 arya2 self-assigned this Jan 24, 2023
@arya2 arya2 changed the title Implement z_listunifiedreceivers and z_validateaddress RPCs Implement validateaddress and z_validateaddress RPCs Jan 24, 2023
@arya2 arya2 changed the title Implement validateaddress and z_validateaddress RPCs Implement validateaddress RPC Feb 1, 2023
@arya2 arya2 removed the S-needs-triage Status: A bug report needs triage label Feb 1, 2023
@mpguerra
Copy link
Contributor

mpguerra commented Feb 2, 2023

@arya can you please update the estimate here, if necessary, after splitting off the original issue

@mergify mergify bot closed this as completed in #6086 Feb 3, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Zebra Feb 3, 2023
@mpguerra mpguerra marked this as a duplicate of #8444 Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: Remote Procedure Call interfaces C-enhancement Category: This is an improvement
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants