Nodes

What is a node?

A node is just a computer that is running the Bitcoin program. More importantly, it is connected to other computers (running the same program) to create a Network.

What does a node do?

A node has three jobs:

Follow rules

Share information

Keep a copy of confirmed transactions

1. Follow rules

Each node (bitcoin client) has been programmed to follow a set of rules. By following these rules a node is able to check the transactions it receives and only relay them if everything is cool. If there are any problems, the transaction isn’t passed on.

Your node ain’t gonna be relaying any dodgy transactions.

For example, one rule is that a person must own an equal or greater amount of bitcoins than they are trying to send. So if your node receives a transaction where someone has tried to send more bitcoins than they own, the transaction won’t be passed on to other nodes.

2. Share information

A node’s main job is to share information with other nodes, and the quintessential information a node shares is transactions.

Now, there are two types of transactions that nodes share:

Fresh transactions – transactions that have recently entered the network.

Confirmed transactions – transactions that have been “confirmed” and written to a file. These are shared in blocks of transactions, and not individually.

A node shares both “fresh” transactions and blocks of confirmed transactions.

Don’t worry about the difference between these two right now. It will all become clear in Mining and Blocks.

3. Keep a copy of confirmed transactions

As mentioned, each node also keeps blocks of confirmed transactions. These are held together in a file called the blockchain.

Each node also keeps a copy of the blockchain.

Fresh transactions are bounced around the network until they are etched in to the blockchain, which is a ledger of confirmed transactions.

Each node has a copy of the blockchain for safe keeping, and shares it with other nodes if their copy isn’t up to date.

The process of adding fresh transactions to the blockchain is called Mining.

I wan’t to mention that each node is autonomous.

By that I mean that when you run a bitcoin client, the network doesn’t “tell you what to do”. Instead, your bitcoin client already knows what to do, and it makes it’s own decisions.

So the entire bitcoin network is made up of nodes making their own decisions, but they each make the same decisions as one another, which makes it a completely decentralised yet powerful network.

If every other node went offline, your node would be upholding the entire bitcoin network.

Do I have to be a node to use bitcoin?

No.

You can send and receive bitcoins without having to be a node. You just need to get the transaction in to the bitcoin network and you’re good to go.

If you send a message to one node about a transaction, it will eventually propagate the entire network.

If you’re using a web wallet for example, they will feed the transactions you make in to the network for you.