Inquiry: C++ to Rust Conversion

Hello :wave:

Mark here from Equilibrium. We have a track record of writing Rust related to blockchains, peer-to-peer networking, and the decentralized web. We’ve also successfully completed prior development grants from organizations like Protocol Labs and the Web3 Foundation.

We were curious about opening a grant proposal to support migration of C++ code to Rust in the Zcash codebase. It appears this effort is potentially here and in the librustzcash repo itself.

Might somebody from @ZOMG be able to share some insight into the plans for Rust in the future, or connect us to the right people for a discussion?

Thank you!

3 Likes

Hi! I think the most helpful thing here would be to hear from people working directly on these tools.

@str4d at ECC, @deirdre at ZF, and @adityapk00 at Zecwallet all come to mind as people who might have thoughts on what the useful projects would be.

1 Like

It’s probably also worth mentioning zebra, which is “An ongoing Rust implementation of a Zcash node.”

2 Likes

As far as Rust usage in zcashd goes, our current approach is to write as much of all new code in Rust as we can (both for our own peace of mind and to make new components reusable between zcashd and zebrad), but only to migrate existing C++ code to Rust where it makes sense to spend engineering time diverging from upstream Bitcoin.

For example, we would like to have a new wallet in Rust that is capable of replacing the existing C++ BDB-based wallet (which has caused no end of issues) and could be isolated more easily from the main node implementation. By contrast, it’s unlikely we will swap out the core consensus implementation of zcashd, at least as long as it is working well for us, because we have stringent engineering quality and review requirements for consensus changes that would make such a drastic and invasive change prohibitively expensive (in terms of available ECC engineering time) to deploy.

With that in mind @aphelionz, it would be great for you to connect with @steven-ecc for discussion around this :slight_smile:

1 Like

Thanks for the context @str4d, and thanks for the heads up on zebra, @yaahc :slight_smile:

Totally understandable that you don’t want to trade out the benefits of following upstream Bitcoin. The wallet sounds like it could be a good candidate for our involvement. I’d love to connect with Steven at some point as well to see if there might me any more.

@steven-ecc, might it be possible to get on a call soon to discuss specifics around Rust engineering?

Sure thing. I’ll reach out to you directly.

1 Like