Writing

Testing the Zcash Network

Illustration image

Introduction

In early March of 2021, a small team from Equilibrium Labs 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 for 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 Labs.

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 Labs may propose to Zcash in the 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 organization 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 Labs

Equilibrium Labs is an R&D company focused on the hardest engineering problems around security, privacy, and scaling of blockchain-based cloud infrastructure.

Copyright © 2023 EQ Labs