3

As I read in this blog article, in a blockchain "each node has a copy of all transactions ever made". This to me seems impossible, bitcoin has existed for a long time, and the memory size of the entire blockchain would be enormous.

ps: if I have to pay for a service using bitcoins, do I become a node of the blockchain?

2 Answers 2

6

To join the network, a Bitcoin full node will work its way through the network history, independently verifying the state of the network through time. So yes, each node will have downloaded and validated the entire transaction history, but a node can choose to use 'pruning mode', where it will discard unneeded transaction history after validation is complete.

The ever-increasing size of the blockchain is a heavy consideration when considering network and protocol updates. Bitcoin requires a distributed network in order to maintain its function, so it is important that the software can be run on inexpensive hardware, so that more people can participate.

ps: if i have to pay for a service using bitcoins, do i become a node of the blockchain ?

There are other ways to interact with the network. Many wallets are lite-wallets, which validate the chain via headers instead of the entire block. This is a less robust security model, but it works well for many people.

You generally do not need to pay a service in order to interact with the network (as a full node, a lite-wallet, etc).

1

Full nodes by default store the entire blockchain. The current size of the blockchain is ~250GB, so it is feasible for individuals to have their own copy and verify all of the transactions. There is also the option to run Bitcoin in pruned mode, which reduces the number of transactions that need to be stored. This greatly reduces the storage space demands and it can still verify all the transactions.

However, not every node is a full node. There are lightweight nodes known as SPV nodes that don't verify the entire blockchain. Instead they can verify block headers and rely on a full node for the state of the blockchain.

More info on SPV nodes: https://gist.github.com/ariard/1034cd7624805d53334e80d4712fb8ee

If you're paying for a service using Bitcoin, its very likely that the service provider is running a full node for you. You run your own node when you run the bitcoin software yourself. It's a a worth while experience and if you're interested in Bitcoin and want to help maintain its integrity you should consider running your own node.

What/how to run your own node: https://bitcoin.org/en/full-node#what-is-a-full-node

5
  • 1
    re: "Every full node has the entire blockchain" - this isn't true. Many full nodes run in pruning mode, allowing them to discard the vast majority of the block data, if they so choose.
    – chytrik
    Commented Nov 29, 2019 at 12:43
  • @chytrik you're correct, I edited my answer and I believe it is right now. Commented Nov 29, 2019 at 12:52
  • Pruning has nothing to do with the Merkle tree. It's simply downloading and verifying the whole chain normally, but deleting old blocks once they have been verified. Commented Nov 29, 2019 at 14:49
  • @PieterWuille okay I edited my answer again. I was under the impression that if a transaction was pruned and needed to be verified the transactions would then need to be generated from the merkle root. Is just the block header sufficient for that? Commented Nov 29, 2019 at 15:20
  • 2
    Transactions are pruned after they are verified. They don't need to be verified again. The Merkle root can be used to prove to lightweight (non-validating) clients that a transaction was part of a block, but that is unrelated to pruning. Commented Nov 29, 2019 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.