Blockchain became the staple for thousands and thousands of fintech products. Its disruptive characteristics allowed developers to build automated financial systems without compromizing safety, necessary transparency, and confidentiality.

The study of the blockchain structure and principles will help you understand what made the success of this technology possible. This article particularly explains how a block of data on a blockchain gets locked. You will learn how this process occurs, what meaning it has on security, and what role consensus mechanisms play in the process.

The Basics of Blockchain and Data Blocks

As the name suggests, on the blockchain, the records are organized as a chain of data blocks. The blocks follow in chronological order so that separate segments of data cannot be changed by fraudsters, as it will require changing all the subsequent blocks in the chain. 

Image source: Investopedia

Below, you can see the main elements of the blockchain structure:

Data blocks: The blocks of data form the blockchain. Each block contains the data that requires the opportunity for public verification. This includes such types of information as transactions, smart contracts, etc. 

Nonce: Nonce is a random number attached to and unique for each block. Locking the block would have been impossible without nonce. Nonce is used in the mining process which means that this element is crucial for validation of the transactions and keeping the network safe.

Hash: Hashes are unique codes, assigned to each block for a purpose of block identification. The hash itself is a string of symbols generated through encryption of the data related to the block’s content and its nonce. Not only do hashes identify blocks, but they also serve for verification of the block contents via fingerprinting. Even if a tiny bit of data in nonce or block contents gets changed, it leads to an entire transformation of the hash. Such change indicates the tampering effort.

Now, let’s examine the aforementioned blockchain components in detail.


Blockchains are all about data. They are used to store it, verify it, share it, keep it authentic, and protect it from unwanted access. Blockchains suit all types of data you can think of. See examples below:

Financial data: blockchains are widely used for financial transactions and financial data storage. The very first blockchain (Bitcoin) was designed for this purpose. The financial information stored on blockchain includes the wallet addresses of senders and receivers, timestamps of transactions, amounts sent, and so on.

Smart contracts: Ethereum introduced blockchains as the trustless platforms for executing smart contracts. These automated contracts control the fulfillment of the contract conditions by the involved parties and activate when both parties confirm satisfaction. They are used in real estate trading and other spheres where strangers have to make deals and want to avoid fraud.

Supply chains: this sphere is one of the most often mentioned examples of blockchain use cases. Blockchain-based supply chain management solutions allow to track and control the products from the raw material to the shops. Customers will be able to check the product’s origin. Blockchain makes permitted access to this info much easier.

Voting: as blockchain allows to collect verifiable data privately and store it in the immutable ledger, it naturally makes it a perfect technology for voting events. Estonia became a pioneering country that implemented blockchain-based solutions for voting.

Healthcare and Law Enforcement Records: healthcare and law enforcement documentation both need permitted access from different places and strong protection from people who don’t have this access. Blockchain does it well. With blockchain-based solutions, you don’t have to take your healthcare documents with you to a different town as long as doctor can check the data using blockchain.

Image source: Birlasoft

It’s safe to say that any kind of data can be stored and managed via blockchain. This technology provides flexible solutions for safeguarding the information and managing access to it as blockchains can be public, private, or consortium.


Nonce is necessary to maintain security and consensus on the network. Miners (i.e., transaction validators) work on solving the math puzzles that protect the network from frauds and spammers, as spam transactions would have been too costly. This process is called mining. It takes place in the blockchains using Proof-of-Work (PoW) consensus mechanism. 

Nonce is complicating the process of finding the correct hash to create a new block. Changing the nonce value, miners search for the correct hash. Once the puzzle is solved, and other nodes confirm that the solution is correct (nonce and block data generate the correct hash), the block is created. Proof-of-Stake (PoS) is another popular consensus mechanism, it doesn’t involve mining. 


Hash functions encrypt the data on blockchain and nonce using math formulas. The hash output looks like a string of random numbers and lower- and uppercase letters. The length of this string is predetermined and constant within the blockchain. Hash cannot be decrypted and can’t be used to find out the original data. 

Image source: GeeksForGeeks

Any change in data in the block would create a completely different hash. It helps to detect tampering attempts. Hashes are used for identification of blocks as well, serving as fingerprints of each block. Every new block includes a hash of the previous block to maintain blocks interconnection and blockchain integrity. It also makes tampering a harder process. Once the data in one block is changed, it should reflect in the rest of the blocks and the change should be verified by other miners.

The Locking Process

See the steps in locking a block below:

Block creation: First, the block with a correct number of valid transactions should be created.

Nonce production: As the transactions are united into a block, the block gets a nonce that protects the block and plays role in mining and creation of a hash. 

Creating a hash: When the block data and nonce are determined, the hash is created. This hash serves as a block’s unique signature.

Mining: Miners search for the nonce. Combined with the predetermined criteria and the block data, this hash allows to “mine block,” or add the block to blockchain. The mining process itself is just an exhaustive search executed by GPUs or CPUs of the miner.

Block validation: As the block is mined, it should be confirmed and verified by other nodes. If the hash meets the predetermined conditions of the given blockchain, the block gets validated and approved.

Adding to the blockchain: After validation, the block is added to the blockchain. Its hash is connected with the previous block’s hash to provide the entire blockchain’s integrity and increase its safety.

The Role of Consensus in Locking Blocks

Consensus mechanisms play a huge role in data locking. They are needed to ensure that all the blockchain users deal with the same status of the network. Different blockchains apply different consensus mechanisms. Proof of work and proof of stake are the best-known consensus protocols.

Proof of Work (PoW)

The first cryptocurrency, Bitcoin, uses the PoW consensus mechanism. It effectively keeps the system safe for over a decade and draws a lot of criticism due to environmental impact and excessive energy consumption

PoW requires validators (miners) to dedicate some computational power to solve a math puzzle in order to validate the block. As the difficulty of puzzles is incredibly high and the number of nodes involved is high, spammers or fraudsters deal with the high cost of trying to tamper the data on the blockchain. More than that, the rest of the community isn’t likely to verify the fraudulent blocks. 

Breaching the security of a network protected via PoW is very unlikely. To do so, fraudsters will need to control over the half of computational power used for mining of the given cryptocurrency.

Proof of Stake (PoS)

Proof of stake (PoS) is an alternative consensus mechanism that doesn’t require mining. Instead, node owners “stake” some cryptocurrency to participate in validation. It makes participation costly for spammers while addressing the environmental issue associated with PoW.

In the PoS-based networks, transactions and blocks are validated by  selected “validators” who lock specified amounts of cryptocurrency for predetermined periods as collateral to validate creation of new blocks. The validators trying to abuse the system are penalized. 

Security Impact

The PoW consensus mechanism has many effects on the security of the blockchain. Data immutability is one of the most important of them. Changing data recorded on the blockchain is nearly impossible and requires consent of the majority of the miners. That’s how decentralization becomes a staple for the network’s security.


Block data locking is a crucial part of the blockchain data living circle. It takes several steps aimed at ensuring validity of information, data protection, and enhancing the blockchain integrity. All of this results in safe storage and management of funds and data on the blockchain.



0 / 5. 0