-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(rpc): Implement the z_validateaddress
RPC
#6185
Conversation
An initial basic test shows that the output is identical to zcashd.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks for the address API changes.
We're just missing the snapshot files, so this PR will fail CI until they are added.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6185 +/- ##
==========================================
+ Coverage 77.98% 77.99% +0.01%
==========================================
Files 304 304
Lines 39197 39197
==========================================
+ Hits 30568 30573 +5
+ Misses 8629 8624 -5 |
zebra-rpc/src/methods/tests/snapshot/snapshots/z_validate_address_basic@mainnet_10.snap.new
Outdated
Show resolved
Hide resolved
This PR removes the `.new` filename extensions from snapshots.
I implemented all suggestions, semantic UA checks, and I updated the PR description to reflect the new changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're missing some snapshot cases, but luckily we already have test vectors in z_listunifiedreceivers.
There might also be a minor future compatibility issue.
I don't think these are blockers to going ahead and merging this, so I'd suggest doing them in a follow-up PR.
We can also repeat the zcash-rpc-diff test on that PR.
Motivation
Close #6083.
Specifications
https://zcash.github.io/rpc/z_validateaddress.html
Solution
This PR implements the following fields:
isvalid
,address
,address_type
,is_mine
.To implement UAs, I used the
zcash_address
crate.Reviewer Checklist