Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Blockchain Structure
course content

Course Content

Introduction to Blockchain

Blockchain StructureBlockchain Structure

Congratulations, you are now familiar with the basics of blockchain technology and Bitcoin in particular, so we are ready to explore the detailed structure of a blockchain based on the Bitcoin model.

Block Components

A blockchain is, in its simplest form, a chain of blocks. However, these are not physical "blocks" but rather digital records that are linked together.

Let's take a look at the following table which illustrates the general structure of a block in the Bitcoin blockchain:

Field Description Size
Block Size The size of the block in bytes, indicating the amount of data it contains 4 bytes
Block Header Contains metadata about the block 80 bytes
Transaction Counter The total number of transactions included in the block, represented in a variable length integer format 1-9 bytes
Transactions A list of all individual transactions included in the block Variable

You don't have to memorize the size of each field, they are simply provided for better understanding. Speaking of sizes, below is an explanation of what bits and bytes actually are:

A bit is the smallest unit of data in computing, represented as a 0 or 1, which reflects the binary nature of computers, and a byte is a unit of data that consists of 8 bits used for measuring data storage and processing capacity in computers.

Block Header

Perhaps, the most important part of each block is its header which is made up of 6 fields. Below is an illustration of a more detailed block structure (Txn_count and txns stand for transaction counter and transactions, respectively, which are not a part of the header):

Block components

Let's now go through each of the fields of the block header:

Field Description Size
Version The version of the blockchain protocol in use (the set of block validation rules that a block follows) 4 bytes
Previous Block Hash (Previous_hash) A hash (unique identifier) of the previous block's header, which ensures the continuity of the chain 32 bytes
Merkle Tree Root (Merkle_root) A single hash that represents all the transactions included in the block 32 bytes
Timestamp The time when the block was created 4 bytes
Bits A compact representation of the target threshold that the block's hash must meet in order to be added to the blockchain 4 bytes
Nonce A number that miners change to get the resulting block hash which meets the difficulty target 4 bytes

Don't worry, we'll go through most of these fields in more detail later in the course. For now, let's take a look at a real block using a Blockchain Explorer (here is the link):

As you can see, all the components we have discussed are present in this block.

Difficulty is calculated from the bits field and is not explicitly stored in the block header. It is a derived value that represents how difficult it is to find a new block relative to the easiest it can ever be.

There are also additional details (you can disregard them for now) provided by the blockchain explorer:

  • Height;
  • Status;
  • Virtual Size;
  • Weight Units.

These fields provide context about the block's status within the blockchain, its size, and resource usage.

question-icon

Which of the following is NOT a part of the block header?

Select the correct answer

Everything was clear?

Section 2. Chapter 1
some-alt