Zcash Parsers : Go and Kotlin address parsers

Title:
Zcash Parsers

Applicant name:
Mark Harris

Pitch: A one-liner elevator pitch version of your proposal
Extend the adoption of Zcash to more platforms by providing parsing libraries in Go

Total Request (USD):
$7200.00 USD

Have you previously received a grant from Zcash Community Grants (formerly called ZOMG) or ZF?
No

Are you seeking or have you received funding from other sources for this proposed project?
No

Applicant background:
My name is Mark Harris. I have 25 years of experience writing code and leading teams that write code. I consider myself to be technology agnostic and have worked with a large set of modern languages. I have led and participated in several ports of legacy code to modern frameworks.

Description of Problem or Opportunity:
Although Zcash has address parsers available in the Rust programming language, several exchanges need a Go implementation of the parsers. In addition, a Kotlin Version has been identified as a need.

Proposed Solution: Describe the solution at a high level.
I will develop and release a fully tested set of parsing libraries adhering to Zcash requirements in Go and Kotlin languages. These will be useful for exchanges and wallet developers These libraries will parse Tex, Sapling, Orchard, and Universal addresses. Libraries will include packages for F4Jumble algorithms, and Universal address encoding and decoding. In addition in the case of the Kotlin code. Bech32 and Blake2b packages will be included.

Solution Format: What is the exact form of the final deliverable you’re creating?
Public git hub repositories with the appropriate libraries

Technical Approach: Dive into the how of your project. Describe your approaches, components, workflows, methodology, etc. Bullet points and diagrams are appreciated!
I will use the existing Rust libraries and Zcash Documentation as the foundation for porting code. Each package will be tested against existing Zcash Test vectors.

Dependencies: What external entities is your project dependent on? What involvement is required from ZF, ECC, and/or other external organizations? Who would have to incorporate your work in order for it to be usable?
In go lang I am using GitHub - btcsuite/btcd: An alternative full node bitcoin implementation written in Go (golang) opensource libraries for Bech32m decoding and github.com/gtank/blake2/blake2b library for Blake 2b decoding. My current research is pointing me towards writing these packages myself for the Kotlin port. We will need deep peer review from the Zcash Folks.

Execution risks: What obstacles do you expect? What is most likely to go wrong? Which unknown factors could jeopardize success? Who would have to incorporate your work in order for it to be usable?
Adoption by Binance is the goal for the Go libraries. The availability of the Kotlin Libraries is intended to spur development on other platforms. Crypto seems to be pretty fickle. The biggest potential Obstacle is Crytpo exchanges moving away from supporting Zcash.

Unintended Consequences: What are the negative ramifications if your project is successful? Consider usability, stability, privacy, integrity, availability, decentralization, interoperability, maintainability, technical debt, requisite education, etc.
As the libraries are currently hosted by me, maintenance and management pull requests would fall largely on my shoulders. To mitigate we should move the libraries to Zcash public repos and provide a set of reviewers.

Evaluation plan: What metrics for success will you share with the community once you’re done? In addition to quantitative metrics, what qualitative metrics will you commit to report?
The number on success metric will be adoption of libraries by the community.

Hardware/Software total budget:
$0.00 USD
N/A
Services total budget (cloud, hosting, etc.):

$0.00 USD
Please provide justification for the total services budget:
N/A

Compensation total budget:
$7200.00 USD
Please provide justification for the total compensation budget:
Each implementation ( Go and Kotlin ) represents approximately 24 hours of work. I arrived at my figures using a base rate of $150.00/hr.

Do you require startup funding?
No
Milestone 1 - estimated completion date:
05/15/2024
Milestone 1 - USD value of payout upon completion of deliverables:
$3600.00
Deliverable 1.1
Go language Libraries

Milestone 2 - estimated completion date:
05/24/2024
Milestone 2 - USD value of payout upon completion of deliverables:
$3600.00
Deliverable 2.1
Kotlin libraries

Total proposed USD value of grant:
$7200.00 USD

How was the project timeline determined?
The go libraries are ready for review. I am extrapolating my time out for the Kotlin libraries
Application submission date:
05/13/2024

4 Likes

Hi @mah3006 - Welcome to the forum, and thank you for submitting your grant proposal! We will review it in the upcoming weeks and reach out if we have any questions.

In the meantime, if you have any questions for us, you can post them to this thread or DM us at @ZcashGrants.

Zcash Community - We want to hear your feedback on this grant! You can post your comments to this thread or DM us at @ZcashGrants if you’d like to provide feedback in private.

The libraries @ GitHub - MarcoEzekiel/go-zcashaddress: A set of parsers for zcash in a variety of langages
and GitHub - MarcoEzekiel/go-f4jumble: A golang implementation of F4Jumble are public and available for review.
These files meet all of the requirements described in my proposed solution.
Thanks!

3 Likes

The library GitHub - MarcoEzekiel/kotlin-f4jumble is public and available for review.
These files meet all of the requirements described in my proposed solution.
Thanks!

1 Like

I’m confused. AFAICT you proposal wasn’t accept yet. At least there is no messages from ZCG approving or rejecting it. Did you received any contact from ZCG telling you to go on with the development?
You are releasing the code and giving updates as if the proposal was approved, but keep in mind that your proposal could be rejected. I hope ZCG judges this proposal by it’s merits and possible solutions, and not by “Oh well, he already did the work, let’s approve and pay him anyways …”.

Ok, that being said, if your go libraries helps us solve the binance situation, you have my support.

edit
p.s. If you received ZCG’s approval, please disregard the first part of my message, but I didn’t really find the information about this.

1 Like

Some background on this grant that will be reflected in our meeting minutes: When we reached out to Coinbase to implement support for TEX addresses, they requested a Go library that could verify if a provided address is a valid Zcash address. @nuttycom connected @pacu and me with @mah3006, who I believe was already working on this or had expressed interest in doing so.

Most of the work was completed before the grant was submitted, so ZCG is treating this as a retroactive grant. There was no implicit or explicit pre-approval. All grants are independently voted on by the five committee members.

3 Likes

Coinbase and other exchanges and blockchains as well.

Hi @mah3006 this is great news. I have a couple of asks /questions.

Could you expand the README.md of the libraries with examples of how you use the libraries?

Have you run the test vectors on the zcash_address library?

@mah3006 at the most recent meeting, the @ZcashGrants Committee voted to approve this proposal and has requested that you provide updates per milestone via the forum in this thread.

1 Like

@pacu, The readme has been updated. The vectors in the file zcashaddress_test.go are a port of the Rust test vectors @zcash-test-vectors/test-vectors/rust/unified_address.rs at master · zcash/zcash-test-vectors · GitHub. Note that the vectors only contain test sets with a single unknown Typecode and that the spec suggests more than one can be used. The Go library and the Kotlin library both account for this possibility, however, have only been tested to the extent that the current rust implementation has been tested.

2 Likes

The libraries GitHub - MarcoEzekiel/kotlin-zcashaddress: A set of parsers for zcash in a kotlin and GitHub - MarcoEzekiel/kotlin-f4jumble are public and available for review.

These files meet all of the requirements described in my proposed solution and have been tested against the vectors found at zcash-test-vectors/test-vectors/rust/unified_address.rs at master · zcash/zcash-test-vectors · GitHub ported to Kotlin.
Thanks!

1 Like