BSV Academy Logo over technical binary background

Ch6: The Bitcoin white paper - Network

The BSV Academy’s free introduction to Bitcoin Theory course covers the design of Bitcoin as a system as prescribed by Satoshi Nakamoto. This course is open to anyone who is interested in Bitcoin and is the beginner course in this series. Some technical experience would be helpful to complete the course, however, it is open to anyone regardless of experience.

The course goes through the Bitcoin white paper section by section elaborating on the concepts contained within each. This section focuses on the network and the central role it plays in the BSV blockchain.

To make it as effortless as possible for you to have access to this educational material, we are publishing the entire course here on our blog. Stay tuned for a section-by-section release, and remember that you are still welcome to enrol in the BSV Academy to gain a certificate of completion to add to your resume.

The steps to run the Bitcoin network are as follows:

  1. New transactions are broadcast to all nodes.
  2. Each node collects new transactions into a block.
  3. Each node works on finding a difficult proof-of-work for its block.
  4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
  5. Nodes accept the block only if all transactions in it are valid and not already spent.
  6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first.

In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.

Not sure who qualifies as a node? Read our blog, The difference between a Bitcoin node and miner.

Running the Bitcoin network

Running the Network

These listed steps are the way by which nodes running on the network compete to secure the contents of the ledger by storing it in blocks. The steps are broken down as follows:

1. New transactions are broadcast to all nodes.

When a transaction is ready for transmission to the network, the wallet or application that created it will usually broadcast that transaction to a set of network peers that it recognises. This recognition might be pre-configured in the system, or created through a discovery process, but importantly, the transaction must at some point reach at least one network node.

If the node finds that the transaction is valid and meets the network’s rules it immediately broadcasts it to all other nodes that it is aware of on the network. Each of these nodes also validates the transaction as well, and broadcasts it to the nodes that they know about. Thanks to the dense connectivity at the centre of the Bitcoin network, propagation from the first node the transaction reaches to all other nodes is very fast, requiring less than 1 second for global awareness.

This process is critical for a node to be a valid competitor in the block building process. A node that fails to broadcast transactions out to the rest of the network risks expending proof-of-work on a block which might be rejected due to the overhead needed for all the other nodes to download the withheld information. Making sure that all nodes have all information needed to validate a block is the best way to ensure success.

2. Each node collects new transactions into a block.

As the node receives new transactions, it continuously adds the ones that meet its requirements to its block template. As the time since the last block was discovered grows, so does the block. There is an inherent requirement for nodes to be sufficiently capable of collecting all of the transactions happening in the world in real time into their block in order to compete.

The incentive to do so is present in the coinbase reward which is a combination of the block subsidy and transaction fees paid by users for the timestamping service. While the subsidy is high, nodes can act profitably without needing to manage millions of transactions. However, when the subsidy reduces to a level that makes it unprofitable, it will become crucial for the nodes to manage a much larger workload as each fee-bearing transaction added to its candidate block increases the revenue available in the block reward.

3. Each node works on finding a difficult proof-of-work for its block.

As the block template grows, the node constantly updates the hashers with new versions of the template that include the most possible transactions in order to maximise revenue. Hashers always work against the most up-to-date version of the block template to ensure their work will be as profitable as possible by including the most transactions. The node and the hashers are a team in this regard, working together to solve blocks as effectively and efficiently as possible.

4. When a node finds a proof-of-work, it broadcasts the block to all nodes.

As soon as a hasher returns a valid proof-of-work to a node, it must broadcast the fully formed block to all nodes on the network as quickly as possible. If the node delays in the transmission, it is possible that a different node might find a competing block which will win the race to become recognised as the first seen block. This requirement, and the risk of being outcompeted by other nodes in the block announcement process is a major driver of the incentives that lead to node operating enterprises to build custom high bandwidth infrastructure to manage their interconnectivity and expand the capacity of the network as a whole.

5. Nodes accept the block only if all transactions in it are valid and not already spent.

When a node receives a block announcement from another node, it must validate its content. This involves going through and checking each transaction spends valid coins which have not already been spent and have valid scripts. If the node has already received the transactions in the block, it can skip parts of the validation process; however if there are transactions that it has not seen in the block, it must request those transactions from the block-winning node and validate them.

In the meantime, if another block is discovered that the node can validate sooner due to not having to request and download additional information, it will choose to build on the block it validates first. This creates a very strong incentive for nodes not to withhold transactions from the rest of the network.

6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

By building on a received block, nodes signal that the block was the first seen valid block and contains a set of transactions that are all valid and spend unspent coins. This is the process by which the longest valid chain of proof-of-work is extended and represents the collective agreement of the majority of hashpower on the network.

The longest chain

Nodes always consider the longest chain to be the correct one and will keep working on extending it.

- Satoshi Nakamoto, Bitcoin white paper

The Longest Chain

A node will always try to build on top of the longest valid chain of proof-of-work, as any block discovered on a block that is not at the longest valid chain tip will never be built upon by competing nodes. If a block is not built upon, the node operator receives no reward for creating the block and the proof-of-work that was done to build it would be wasted.

Because proof-of-work costs money, node operators are incentivised to always ensure that their nodes are working on the most valid chain tip, minimising the risk of money being wasted on a block that has either already been built upon or surpassed by a competing valid chain tip.

Simultaneous blocks

If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer.
- Satoshi Nakamoto, Bitcoin white paper

Simultaneous Blocks

Because nodes work simultaneously to solve proof-of-work on separate and distinct block templates, there is always a chance that when a node finds a block, a competing node will find a different valid block solution for their own template at or around the same time.

Nodes will always choose to work on top of the block they ‘saw’ first, where ‘seen’ means ‘received and validated’ so there is an incentive for any node that discovers a block to broadcast it as fast as possible, and where possible to ensure that every other node on the network has copies of all of the transactions in its block. Without these transactions, the validation process takes a lot longer and the chance of other nodes choosing this block to build upon is reduced.

When nodes see two or more competing blocks, they will keep copies of each so that when the next block is announced they can jump across to the longest chain tip without having to re-do the block validation. Nodes are not typically made aware of which blocks other nodes are working on so must choose a path based only on the valid blocks that it has received.

Breaking the tie

The tie will be broken when the next proof-of-work is found, and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.
- Satoshi Nakamoto, Bitcoin white paper

Breaking the Tie

As soon as a node finds a new valid block and one of the competing chaintips is extended, the rest of the nodes on the network will immediately begin working on top of the longest chaintip.

It is important for all nodes that they have a means by which they can quickly change to the new block even if they were working on a different chain, which is why competing valid blocks are held and validated even if they were not the first seen.

The longer a node takes to move to the longest chaintip, the higher their chances of a valid block they discover on the competing chaintip being ignored by the rest of the network. This is the incentive that pushes all nodes to have a hyper-awareness of new block discoveries.

Missed messages

New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realises it missed one.
- Satoshi Nakamoto, Bitcoin white paper

Missed Messages

In the rare situation where a transaction has reached some but not all of the nodes on the network, it only takes until one of the nodes that received it to find a block that includes that transaction.

This has no impact on the validity of the transaction, or the immediate usability of its outputs, accepting that the timestamp applied to its place in the blockchain would necessarily be some time later than the ideal ‘as soon as possible’. Transactions can be missed or omitted due to many factors such as a particular node’s own policies or a break in network communications between competing parts of the network.

Similarly, when a node misses a block announcement message, they will keep working on the chaintip they believe to be the longest. When another block is announced that builds upon the missed block, the node can quickly validate the headers against its own historical record and request any missing information regarding the new chaintip.

Learn more about the Bitcoin blockchain here.

Learn more about Bitcoin as Timechain here.

Ryan Brothwell
Ryan Brothwell

Deputy Editor, Bitcoin Association