Skip to content

What Is a Block?

In previous chapters, we explored how the overall system operates.
But if you want a deeper understanding than most people, you must go further—
and dive into the mathematical mechanics inside a block.

A blockchain is a structure formed by chaining together many blocks.
But what exactly is a block?
This chapter will explain the basic structure and core concepts of a block.

Basic Components of a Block

From a high-level perspective, a block can be divided into two main parts:

  • The block's Hash value
  • The block's Content

The area outlined in blue represents the block content, which includes transaction data and information about who found (mined) the block.
Later, you'll also learn that block content can include elements like a random number (nonce) and timestamp.

The area outlined in red represents the block hash, which you can think of as the unique ID of that block.
Every block has its own unique block hash.

The block hash is generated through a mathematical operation applied to the block’s data.

This mathematical operation is called a hash function, and understanding it is key to understanding individual blocks.

What Is a Hash Function?

Let’s first learn what a hash function is.

A hash function takes input data of any length and produces a fixed-length value.

The result is called a hash value.

A hash value looks something like this:

67468a63708da92a71fb243d0676cc196c3fd14c0a67a9d74a96be89b20a9c68

Key properties of hash functions:

  • Same input → same hash output
  • Different input → different hash output

Hash functions are widely used within blocks to ensure the integrity of block data.

Practicing the Hash Function

In this section, we take block content (called Data) and apply a hash function to it, producing a block hash.

A hash value is like a digital fingerprint: different data = different fingerprint,
but identical data will always produce the same fingerprint.

For example, entering 123 into the input field will produce the following block hash:

a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3

Now try entering 999, and you’ll get a fingerprint that’s completely different from the one you get when entering 123, as shown below:

83cf8b609de60036a8277bd0e96135751bbc07eb234256d4b65b893360651bf2

Continuing the experiment, if we enter 123 again, we’ll get the same block hash as before:

a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3

This demonstrates the properties of a hash algorithm:

  • Different data produces different fingerprints
  • Identical data produces the same fingerprint

Try entering some data and clicking the Calculate Hash button
to see what hash value is generated.

Summary

Now you understand the two fundamental parts of a block:

  • The block hash (which is generated by performing a hash operation on the block’s content)
  • The block content