A New Network Stack for Zcash

Hi all, we wrote a blog post about some of the work we’ve been up to at the Foundation:

The post describes the details of the new, fully async network stack that Deirdre and I wrote for Zebra.


This is awesome! :smiley:

I personally am quite keen on replacing the P2P network protocol inherited from Bitcoin, in the medium term. Is there documentation of the internal protocol used by zebrad?


There’s some documentation for the zebra-network crate here. As you can see, the internal protocol isn’t really documented well because it doesn’t exist in a very concrete form yet – we only implemented the generic structure of the networking layer and we’re waiting to fill in the details of our internal protocol until we have a rest of the node (chain state, wallet handling, etc) to connect it to. Right now we’re working on the chain state implementation, so we’re probably not going to touch the internal protocol for a little while until we know what kind of state updates we want to do.


Would it be equally useful to try to use this for the bitcoin network stack in a new implementation?


Probably! That said, we haven’t included any Bitcoin-specific code, and we’ve dropped support for a lot of legacy Bitcoin stuff never included in Zcash.