1 minute read

Gossip Protocol

Next Article
Moving Averages

Moving Averages

The nodes in the network communicate on an algorithm with the Bitcoind called the

gossip protocol. When a block is completed, that block needs to be transmitted to the

Advertisement

ledgers contained in each node, and that block has a certain identification number.

One node will ask another node if it has that block, and if that node doesn‘t, then it

will transfer that block for this new node to save. That node will then randomly

select another block and find out if that node has the new information. It also does

another thing. Once it has told the node its information, it asks that node if it has

other new information and compares it to what it already has. If the information

from the other node is not within its ledger, then it will take that information as

well. That way there is a two-way exchange of information.

Each node contacts six other nodes (in most cases that is true, but you can adjust your Bitcoind app to contact more nodes if you like). In most cases, nodes just

contact six others at random. The node they choose is randomly selected and so,

each time it opens a communication to a node, it is a different set of nodes. This

keeps the system safe by not allowing predictability of who the node contacts are.

If each contact six, then theoretically, it will only take six hops from any new piece

of information originating from a node to reach all existing nodes. Think about it

like this – the first node passes it to six nodes and each of them pass it to six more.

That makes 36 nodes that are now up-to-date on that information which was

broadcast by the first node. Those 36 then broadcast to six more which makes it

216. That‘s three jumps so far. From there, it becomes 1,296, and then 7,776 on the

fifth hop. On the sixth hop, it becomes 46,656, but there are only 12,000 nodes at

this point which means that it only takes a little over five hops to disseminate all

the information of every transaction to the entire ecosystem. That happens in just a

and can be used in larger ecosystems effectively.

This article is from: