Subscribe Right arrow
Blockchain Basics// 6 min read

How to Run a Full Node for Bitcoin

How to Run a Full Node for Bitcoin

Nodes are the most underappreciated part of the bitcoin network. On page one of Satoshi’s whitepaper, we read the sentence:

“The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.”

This line does well to emphasize the importance of nodes. They are vital to the survival and integrity of the blockchain.

Sadly, most people don’t care about nodes. The lack of financial rewards, coupled with the relative complexity of the setup process, means that nodes enjoy the spotlight far less than miners.

As a result, only around 9,700 nodes are active as of September 2018. Compare this to the 150,000 miners estimated to be in existence today, and it’s not hard to see that short-term gain still beats long-term commitment in the bitcoin world.

If the leading cryptocurrency is to thrive, its members need to stop being consumers and start being participants.

Let’s take a detailed look into the role of nodes in the bitcoin network.

Understanding nodes

In its most straightforward form, a node is simply a computer that connects to the bitcoin network. In order to be classified as a full node, the computer needs to actively verify the rules set out in bitcoin.

More specifically, we rely on software which sets out rules and provides the functionality to run a full node. The most popular software is called bitcoin core, which is written in C++, and can be downloaded for free here.

Once set up (more on that later), you will be making a small but meaningful contribution to the bitcoin ecosystem.

On a deeper level, your full node will be continually verifying blocks and ensuring they abide by bitcoin’s consensus rules. There are a plethora of rules, but the most important are:

  1. Transactions cannot be double-spent
  2. Transactions must contain the correct signatures
  3. Transactions must be correctly formatted
  4. Block rewards must be 12.5BTC

As these rules are crucial for the survival of bitcoin, it makes to understand them in more detail.

Understanding the double-spend problem

Prior to Satoshi’s invention of the blockchain, is was widely considered impossible to ensure the uniqueness of a digital asset.

How, for example, can a PDF have value, when it can be copied and circulated with the click of a button. As it can freely be multiplied, this digital asset is not a good store of value or a medium of exchange and the same goes for any conventional file you care to mention. This is the double-spend problem.

Bitcoin solved this. The blockchain acts as an immutable record of transactions. If you spend a bitcoin, that bitcoin is gone and you are no longer able to control it. This simple fact is crucial for the survival of not just bitcoin but all cryptocurrencies.

How is this achieved?

Full nodes perform the crucial task of storing a full copy of the blockchain. This means that full nodes can view and verify every transaction since Satoshi sent Finney 10 bitcoin in 2009.

With this public ledger at hand, nodes continually communicate with the network, updating their own version of the blockchain and rejecting transactions that fall foul of their rules.

Understanding transaction signatures

Signatures are another woefully underappreciated aspect of bitcoin. This is unfortunate because they play a crucial role, with Satoshi even saying:

“We define an electronic coin as a chain of digital signatures.”

To understand what is meant by this, let’s remind ourselves of how bitcoin transactions work.

First, the sender generates a public and a private key. Then, a message is created and signed with the senders signature. As a side note, it is indicative of bitcoin’s heritage, that the first message read:

“The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.”

The public key, the message and the signature are then broadcast to the network, where nodes use the verification algorithm to check if the signature is present. Crucially, only the holder of the private key can leave a signature, meaning that only the owner of the bitcoin can broadcast a signed message.

Thus, nodes help to ensure that only the holder of the private key can spend his bitcoins.

Understanding formatting

Perhaps the least sexy part of bitcoin is the format each transaction has to be broadcast in. Mentions of integers, inputs, outputs and witnesses have many casual readers heading for the door. Nevertheless, let’s take a quick look at what information has to be present in every bitcoin transaction:

  1. Version number
  2. Flag
  3. In counter
  4. List of inputs
  5. Out-counter
  6. List of outputs
  7. Witnesses
  8. Lock-time

Crucially, nodes use this information to check for a variety of conditions. The most important of which being, that the unspent outputs are really unspent.

If nodes failed to verify this, then malicious actors could spend their coins twice, violating the integrity of the blockchain, and undermining the trust in the immutable ledger.

Understanding block rewards

The final task we will discuss here relates to the block reward. This is a crucial mechanism which rewards miners with a predesignated amount of bitcoin, as a thank you for adding transactions to the blockchain. We’ve discussed this in great detail within our guide to bitcoin mining.

The reward is currently 12.5BTC, but that will be halved once block 630,000 is mined.

Crucially, nodes ensure that the block reward is correct. Thus, if miners decided to unilaterally increase the block reward, full nodes would reject those blocks, essentially splitting the network in two.

Thus, full nodes help to keep miners in check by rejecting blocks with aberrant block rewards.

How to set up a full node on bitcoin

Each operating system requires a slightly different setup process. You can find comprehensive guides for each of them here. For the purposes of this article, we will describe the process required for windows 10.

Step 1 – Download the software

In order to run a full node, you will first need to download the necessary software. You can this for free at bitcoin.org/en/download.

Before downloading, make sure that you have a secure connection to the server. You can check this by clicking on the green lock in your browser’s URL search bar.

For additional security, you might want to verify the release signatures. These use an encryption method called PGP and ensure that the software you download is authored by the correct person. In bitcoin’s case, this is Wladimir J. van der Laan and you will, therefore, need his release key. For a detailed guide on how to verify the release signatures, check out this post stack exchange.

Regardless of whether you choose to verify the signatures, you can proceed by double-clicking on the downloaded bitcoin core file.

Windows will ask you if you want to run this program, click “Yes”. Now the bitcoin setup wizard will help you setup the software on your device.

Step 2 – Configuring bitcoin core GUI

As is to be expected there are multiple use cases for the bitcoin core software. For the purposes of this guide, we are setting up a node in order to support the bitcoin ecosystem. Developers will want to check out bitcoin core daemon for more sophisticated purposes.

In this guide, we will go with the simpler bitcoin core GUI (graphical user interface), which will help us download the blockchain and begin verifying transactions.

With the setup wizard concluded, press the Windows key on your keyboard and start typing “bitcoin”. Click on the result that reads “bitcoin core” and pick a directory in which to store the bitcoin blockchain and your wallet.

Most likely your Windows Firewall will now prompt you regarding permissions settings of the bitcoin core software. Click on “Allow access” to continue.

Step 3 – Downloading the bitcoin blockchain

Now the bitcoin core GUI will start downloading the blockchain. This will take several days, and require a significant amount of storage space.

The blockchain is currently encompassing around 212GB (as of September 2018), which means that downloading typically takes several days. Please be aware that this process will require a significant portion of your internet bandwidth, most likely resulting in reduced internet speed.

Luckily, the bitcoin core software can be stopped and started again at will. It will always pick up from where it left off.

Once the download is complete, you can use the bitcoin core GUI as your personal wallet.

bitcoin core wallet

You’re all set!

Conclusion

In the introduction, we talked about why you should run a full node on bitcoin.

A full node allows you to participate in the bitcoin network, verifying transactions and relaying to the network.

Additionally, a full node also allows you to act in a completely trustless way. By running your own node, you personally ensure that all the rules of bitcoin are being followed. As such, you can protect yourself (and the network) from double-spending, fraudulent transactions, malicious inflation, and much more.

For a video guide on how to set up your node, check out this excellent video by Jimmy Song.

Written by:

Chris Grundy is an avid tech enthusiast and the Head of Marketing at Bitbond. He's been writing about the Bitcoin space since 2015 and has enjoyed every minute of it.

POST A COMMENT

Leave a Reply

Your email address will not be published. Required fields are marked *

*

loading