The Simplest Blockchain — Blockchain Data Structure I
If you want to learn Blockchain, then forget all the things you know about Blockchain. Let’s take a fresh start!
The most popular person award is a frictional award started in 2000 to recognize the people working in cryptography. In the following sections, step by step, we are going to create a Blockchain to store the history of the most popular person award.

Hashing and Hash list
Blockchain technology extensively depends on the hash functions. The hash functions take any string and return a fixed length string called hash. For example, the SHA-256 hash function gets any string and returns a 256 bit (32 bytes) string. Ex:

Properties of Hash functions
- Collision-free property: The input domain of a hash function is larger than the output domain, but getting the same hash for two different strings is negligible. Because of that, if H() is a hash function and H(X) = H(Y) then x = y.
- Pseudo Uniqueness: Because of the collision-free property, a hash can be used to identify the input string uniquely.
- Hiding property: If H(x) is given, it is infeasible to find x. Because of that, we call hash functions are one-way functions.
- Puzzle friendly property: If the key is chosen from a random distribution and y is the target set, then it is infeasible to find x such that H(key | x) = y.
As we discussed before, a hash can be used to identify the input string uniquely. Because of that, we can create a table of input string by indexing against their hashes.

The following table explains the characteristic of the hash table by Big O notations. You can find more details about big O notation here.

If we are given the hash value, we can directly locate the place of the data.
hash linked list
We have stored the names of the people who were awarded. Now we need to get the order of the awards to identify the year. To do that, we are going to store the hash of the previous block with the data. Each block has the following parameters,
- Hash of the previous block: To link blocks
- Data:
And we need an additional parameter,
- latest block hash: To track the latest block
These are the steps to add a new block to the chain.
- Take the hash value of the previous block and add it to the block. If there is no previous block add some specific value. ex : 0x000..000
- Then add data to the block
- Calculate the hash value of the block(hash of the previous block and data) and add the block along with the hash value of the block.
- Update the latest block hash.
- Repeat the above steps for all the awards in order.
Let’s calculate the hashes of the blocks.

Let’s see the actual structure after adding all the awards,

The following image shows how they are structured as a chain.

Now we have created a simple Blockchain where data are ordered.
Properties of the simplest blockchain
- Can not alter the blocks of the Blockchain without modifying the other blocks. If someone wants to change the data in “block 0”, then they have to change “previous hash” of “block 1” and “previous hash” of “block 2” as well.
- The only place where we can insert or delete blocks without modifying other blocks is the tail of the Blockchain.
- The average time complexity of search by hash is O(1).
