Lesson 7: "Saving Disk Space in Blocks" A look at what's inside the blockchain

なぜこのレッスンが必要なのか

From now on, we will sort out the peripheral matters necessary for realizing the Bitcoin system that we have learned so far. First, we will learn about the structure within each block of the blockchain. The nodes needed to make the blockchain work must hold all the data that is recorded in the blockchain. In this lesson, we will learn how nodes can hold the data in the blockchain.

このレッスンで学べること

  • Structure within each block of the blockchain
  • Markle tree of transactions
  • The amount of future data a node will hold

How to compress the data held by a node

Each Bitcoin transaction will be recorded in one of the blocks that make up the blockchain.

Therefore, the node running the blockchain must hold the data of all blocks in order to verify the transaction records.

However, as the number of bitcoin transactions increases, the amount of data that the nodes have to keep also increases.


To solve this problem, there is a built-in mechanism that limits the data that a node needs to keep at all times to a very small portion.

Specifically, once a certain number of the latest transaction records have been accumulated, it is safe to delete the earlier records.

To achieve this mechanism, hash functions are used here as well.


Multiple transaction records are hashed together, and only the output hash value is kept at all times. This is called a Markle Tree.

In Lesson 4, we learned that each block stores the hash value of the previous block.

The hash value of this block contains the hash value of all the transaction records contained within each block, hashed together.

This means that as long as the hash value is available, the transaction record itself is no longer needed.


レッスン進捗の確認

レッスンの内容を理解したら、
「チェック」ボタンをクリックしましょう!

Amount of future data held by a node

If only the block header data is retained, and not the past transaction records, the size of the block header will be approximately 80 bytes.

Bitcoin is tuned by Difficulty to form a block about once every 10 minutes.

Therefore, 80 bytes x 60 minutes x 24 hours x 365 days = 4.2MB of data added per year.

It can be said that this amount of data can be retained without any particular problem as hardware performance improves in accordance with Moore's Law.


レッスン進捗の確認

レッスンの内容を理解したら、
「チェック」ボタンをクリックしましょう!

Lesson 7: "Saving Disk Space in Blocks" A look at what's inside the blockchain

0%

0%

全てのレッスンが完了していません 全て完了にしてからテストを行いましょう!

下のボタンを押すとテストが始まります。