# Ziggurat: a Technical Summary Well-designed, carefully implemented and meticulously tested network protocols are fundamental to the security and scalability of distributed networks. Ziggurat aims to improve the tooling for testing and introspecting distributed networks and, secondly, to put these tools to good use in testing and introspecting specific chains. In order to do this, we start with a re-implementation of the chain's network protocol. This is the basis for any work to follow, including testing in its various incarnations and building powerful means of introspecting the network as a whole. ## Ziggurat Nodes We use Ziggurat nodes backed by the protocol re-implementation to interface with the official full nodes. Ziggurat nodes can be used in integration tests instead of a full node; they are much lighter, faster to spin up and they are much more ergonomic than a set of raw sockets (a common alternative in this kind of work). ## Testing Testing the network protocol with Ziggurat nodes allows us to detect issues with the existing network protocol, first at the specification level, then at the implementation level. It is more robust than testing e.g. multiple full nodes against each-other, as they could be relying on the same accidental or undocumented assumptions to function correctly together. In addition, a protocol-level test suite benefits the OSS community by providing other node developers with a means to make sure their alternative implementations are compliant with the specification: Ziggurat can test any node implementing the specified network protocol. Ziggurat tests are concise to write: ``` 1. start N synth nodes 2. connect them to the full node 3. test some behaviour 4. done! ``` References: 1. [Ziggurat x Zcash impact review](https://equilibrium.co/casestudies/zcash). 2. [Ziggurat x Zcash](https://github.com/eqlabs/ziggurat). 3. [Ziggurat x Zcash manual](https://fluttering-gem-83c.notion.site/The-Ziggurat-Manual-88f6ab7d85774c5fb1bc12bcd64bf700) ## Tooling Based on the protocol re-implementation and the Ziggurat nodes, we can implement other tooling, such as crawlers able to map and measure the network topology in great detail (rpc-based tooling is generally less reliable and accurate). This could be used on testnets (or even on mainnet) to detect islands, bottlenecks, high centrality in various forms (see: [Trail of Bits—Are Blockchains Decentralised?](https://assets-global.website-files.com/5fd11235b3950c2c1a3b6df4/62af6c641a672b3329b9a480_Unintended_Centralities_in_Distributed_Ledgers.pdf)) and guide further development in improving the network.