Case studies

Testing the Zcash Network

How Equilibrium built the foundational tools for the future development and testing of the Zcash network.

Testing the Zcash Network

Introduction

In early March of 2021, a small team from Equilibrium applied for a grant to build a network test suite for Zcash nodes we named Ziggurat. Three days later, the grant application was accepted and funded by the Zcash Open Major Grants committee (ZOMG). Though Ziggurat is applicable to any node implementation, our focus was on testing Zcashd and Zebrad, the nodes maintained by the Electric Coin Co. and the Zcash Foundation respectively.

Zcash’s Network

When we first dove into the project, Zcash didn't have a network specification other than what had been inherited from Bitcoin. As a result, both nodes had diverged and it was unclear how large the gap to network feature parity had grown. Ziggurat became a powerful tool in pinpointing these differences and currently constitutes the most comprehensive specification of the Zcash network layer.

Introducing Ziggurat

Ziggurat is a collection of network testing tools and a suite of conformance, performance and resistance tests our team developed in Rust.

The project was presented and discussed on the 1st of July 2021 Arborist Call and its use is documented in the manual.

Impact Review

Starting from the initial handshake when establishing connections, Ziggurat highlighted the major differences in how Zcashd and Zebrad behave from a network perspective. Though not initially planned as a major part of the grant, we discovered, investigated and securely disclosed critical bugs and security vulnerabilities to the maintainers of both projects.

Below is the full list of issues credited to and confirmed by Equilibrium.

Crucially, Ziggurat has had a profound impact on the Zcash ecosystem by highlighting the need for a network specification that all implementations would follow. It provides powerful tools for the future development and testing of the network.

Future Work

We have ideas for testing custom node topologies, improving the test runner, extending the capabilities of the synthetic nodes and more testnet introspection tooling. This is work Equilibrium may propose to Zcash in future and work we’d encourage the Zcash community to take on.

About Zcash

Zcash is a digital currency with strong privacy features launched by the Electric Coin Co. It started as a fork from Bitcoin and was the first project to implement shielded transactions through the use of zk-SNARKs.

About the Zcash Foundation

The Zcash Foundation is a 501(c)(3) non-profit organisation created to build privacy-focused financial infrastructure. It backs and develops projects connected with the Zcash blockchain and the application of zero-knowledge cryptography.

About Equilibrium

Equilibrium designs and builds core infrastructure for the decentralised web. We love hard engineering problems in decentralised technologies—from ideation to production.