Erlay Proposal Would Decrease Bandwidth Usage of Bitcoin (BTC ) Nodes by 40%, Making the Bitcoin (BTC) Network Scalable and More Secure

June 12, 2019 / by Zachary Mashiach

Bitcoin (BTC) developers Gleb Naumeko, Gregory Maxwell, and Peter Wuille published a paper titled “Bandwidth-Efficient Transaction Relay in Bitcoin” on June 3 that describes a new Bitcoin (BTC) transaction relay protocol nicknamed Erlay. This protocol would decrease the bandwidth consumption of Bitcoin (BTC) full nodes by 40% and, more importantly, allow the number of Bitcoin (BTC) nodes to scale upwards without a significant increase in bandwidth usage.

Essentially, Erlay would make it cheaper to run a Bitcoin (BTC) full node, facilitating unhindered growth in the number of nodes, which would make the Bitcoin (BTC) network more secure.

Erlay is not being implemented yet. It still has to be submitted formally as a Bitcoin Improvement Proposal (BIP) and go through a public debate period, as described in a post on the Bitcoin-Dev list. However, it seems the chances of Erlay’s eventual implementation into the Bitcoin (BTC) protocol are high since Erlay is a critical improvement that makes Bitcoin (BTC) more scalable and secure.

Erlay accomplishes this reduction in Bitcoin (BTC) node bandwidth usage via improving the relay of transactions between nodes. Currently, Bitcoin (BTC) nodes use the transaction flooding mechanism in which every transaction message received by a node is broadcast to all neighboring nodes. This causes transactions to be broadcast with low latency, i.e. broadcast quickly, but nodes receive messages for the same transaction multiple times, which is redundant.

Apparently, 88% of the bandwidth used to announce transactions between nodes is redundant, and this redundancy accounts for 44% of all the bandwidth that Bitcoin (BTC) nodes use.

It gets worse. The amount of redundant bandwidth usage scales linearly with the number of nodes and the connectivity of the Bitcoin (BTC) network. Thus, as the Bitcoin (BTC) network grows, more bandwidth is used, making it increasingly expensive to run a node. This acts as a force against the expansion of the Bitcoin (BTC) network, ultimately making Bitcoin (BTC) less secure.

Instead of flooding transaction messages to every neighboring node, Erlay uses low-fanout flooding. Only well-connected public nodes flood transactions to eight other public nodes, and since every private node is connected to several public nodes, this ensures that transactions quickly reach all nodes. This is instead of all the private nodes, which comprise most of the Bitcoin (BTC) network, flooding all other nodes.

Erlay then uses set reconciliation to ensure that all nodes have received every transaction message. With set reconciliation, a node periodically compares its state to the state of its peers and requests the difference between those states. Essentially, nodes periodically query other nodes and receive any missing transactions via set reconciliation, instead of having to receive all transaction messages.

In the paper, there is a conceptual diagram that shows that flooding, which is the current method used by Bitcoin (BTC), has the lowest transaction latency but the highest bandwidth. A network that is running on pure set reconciliation would have the highest transaction latency but the lowest bandwidth. Erlay is in the middle, aka the sweet spot, where there is a somewhat higher transaction latency but much less bandwidth usage.

To be specific, Erlay increases transaction latency from 3.15 seconds to 5.75 seconds, meaning transactions take on average 2.6 seconds longer to propagate than with the current flooding mechanism. That being said, 2.6 seconds is negligible compared to the 10 minutes on average it takes a Bitcoin (BTC) transaction to confirm.

Simultaneously, Erlay decreases the bandwidth used to announce transactions by 84%, which is roughly 40% of total bandwidth used by nodes. Most importantly, as the number of Bitcoin (BTC) nodes and connectivity increases, the amount of bandwidth usage stays nearly constant.

Thus, Erlay is a critical step towards Bitcoin (BTC) scalability and adoption. Unlike the current situation where nodes are becoming increasingly more expensive and resource-intensive to run, Erlay would allow the number of Bitcoin (BTC) nodes to grow while using 40% less bandwidth than is used today, with no more increase in bandwidth usage. This also increases the security of the Bitcoin (BTC) network since it will be cheaper to run nodes, and Bitcoin’s (BTC) security increases with an increase in the number of nodes.