Understanding The Concepts Of Blockchain

Learn how blockchain enhances transparency and security across distributed nodes. Explore the role of miners and how they maintain network integrity.

BlockInt

Blockchain technology is transforming how we handle data and transactions by eliminating the need for a central authority. In sectors like banking, where trust and security are crucial, blockchain introduces a decentralized system where data is distributed across multiple nodes. This blog explores the key differences between traditional banking systems and blockchain, focusing on its decentralized nature and the role of miners in verifying transactions.

What is Blockchain?

As the name suggests, blockchain is a chain of blocks. Similar to the concept of a linked list data structure, where one node contains the address of the second node and the second node contains the address of the third node, in blockchain, one block contains the reference to another block, and the same block also contains the reference to the previous block. It's not actually an address—what it is will be explained in upcoming blogs about blockchain. A block contains the transactions a person has made, which could be a single transaction or multiple transactions, such as 10, 20, 50, 1000, or even 20,000. The average size of a block is 1MB and can grow up to 8MB. Every block in the blockchain has a block number and a hash of all the data stored in the block, including the transactions and the header.

Why Blockchain?

This whole concept was discovered by a person named Satoshi Nakamoto, who implemented it in Bitcoin. In the present world (without blockchain), everything is centralized. By centralized, I mean that data is stored in one place, and there is one governing body with people who have the rights to access the database of banking transactions. Every time you make a transaction, the process involves that central body, where the money is associated with your name or account number. Let’s visualize this:

block-chain-banking-system

The database will get updated, which means the transaction is successful. If the transaction was unsuccessful due to some technical error, then the centralized body will be responsible for rolling back to the previous state. You can also file a complaint against the company providing the banking service. You are not responsible for the technical error that occurred because there is a central body that controls the service. It is the responsibility of the central body to provide the best services, keep the data safe, and ensure secure communication.

But this is not the case with Blockchain. Blockchain is not controlled by any central body; in fact, there is no concept of a centralized server. The nodes/computers that are part of the blockchain are themselves the servers, meaning they have the information of all the customers using the service stored on their devices in the form of a ledger. A ledger is simply the database in a blockchain. All the information related to the customers using the respective blockchain service is stored in a ledger, and this ledger is stored on all the nodes/computers that are part of that blockchain network.

So, the difference is that the data that was once stored on a particular server is now distributed across all the nodes/computers that are part of the blockchain network. Centralized data has shifted to decentralized data. Let’s discuss the concept of blockchain in terms of the banking sector. Cryptocurrencies are the new currencies in the blockchain network, such as Bitcoin, Ethereum, Dogecoin, etc.

Now you might have a question: in the banking system, the companies providing the service first verify and validate whether the person doing a transaction is genuine or not. How is this done in blockchain? The answer is simple: all the nodes that take part in the blockchain do the verification process to ensure that the person doing the transaction is genuine and has sufficient balance for the transaction. Not every node has sufficient hardware resources to verify the transaction and create a block (this will be discussed later), so the nodes that can do this efficiently are called MINERS.

How Is Blockchain Beneficial?

Blockchain is currently experiencing a surge in popularity, and it can be applied to anything as long as it remains decentralized. The Bitcoin blockchain and the Ethereum blockchain are entirely different, as is the case with Dogecoin, though they all use the same basic concept of blockchain. The nodes that participate in the Bitcoin blockchain cannot access the ledgers of Ethereum. However, it is possible if you are part of both blockchains and have a robust hardware setup. The characteristics that make blockchain highly sought after are:

  • Immutability: Once data is entered into a block, it cannot be changed, altered, or modified.
  • Decentralization: It has no governing body, which means there are no high service charges imposed on users. Instead, the nodes maintain the entire network.
  • Security: Each piece of data in the blockchain is encrypted, and due to its immutability, no one can change the data.
  • Transparency: Everything in blockchain is public, so if something malicious happens, everyone can see the modified data, which is then restored using the ledger copy from another node.
  • Consensus: This is a protocol that all nodes in a network must follow, particularly for decision-making in certain scenarios.
  • Faster Settlements: In centralized systems, if something goes wrong in a transaction, it can take many days to determine where the actual transaction is. But in blockchain, once you make a transaction, it is immediately received by the other party.

How Blockchain Is Transparent?

In blockchain, everything is stored using cryptographic methods. Cryptography involves hashing and encryption, which are different from each other. Hashing is a one-way cryptographic process, while encryption involves both encryption and decryption. Blockchain uses asymmetric encryption, which involves two different keys: a public key and a private key. These methods are used to digitally prove your identity by digitally signing transactions, making the process transparent. You can easily see all the transactions being validated on the blockchain explorer. In future explanations, I will use this website to illustrate various examples, allowing you to see everything happening in real-time.

What Is the Unconfirmed Transaction Pool?

In cryptocurrencies, when a sender transfers money to a merchant or recipient, the transaction takes some time to be confirmed before the currency is transferred from the sender’s wallet to the merchant’s wallet. The confirmation is done by a miner, who ensures that the sender has the required funds. Until the transaction is confirmed, it is stored in a space known as the unconfirmed transaction pool. Each cryptocurrency, like Bitcoin, Ethereum, and Dogecoin, has its own unconfirmed transaction pool.

In this pool, all the transactions that have not yet been confirmed by a miner are present. There may be 1, 10, 100, or any number of unconfirmed transactions. Miners typically select transactions that offer a higher fee reward (this will be discussed later). Once a miner confirms your transaction, the receiver becomes the owner of the amount. The time for confirming a transaction can vary—it might take 10 minutes, 20 minutes, an hour, 2 hours, 12 hours, a week, or more. However, there is a time limit within which the transaction must be confirmed; otherwise, it is removed from the unconfirmed pool, and the money is not transferred from your wallet. This time limit is 14 days. If your transaction is not confirmed within this period, the amount is returned to your wallet.

Who Is a Miner?

In the above paragraph, I mentioned the term "miner." What does it mean? Is it a person or a machine? Such questions often arise when learning about blockchain. A miner is a person who is responsible for confirming the transactions present in the unconfirmed transaction pool. They create the block, which means they find the hash of the block. All the transactions confirmed by the miner are added to their block. In Bitcoin, the size of the block is 1MB, and this size is fixed for all blocks in the Bitcoin blockchain. The size is determined by the consensus of the Bitcoin blockchain. If you want to increase the size of the block, it can only be done through consensus, which is like an agreement that every node in the blockchain must agree to. So, Bitcoin has its own consensus, and Ethereum has its own consensus. In this way, the unique hash for each block is found by the miner, who then adds the transactions to it.

What Do Miners Get in Return?

It's a valid question because miners use their computer resources to validate transactions and add them to the block. But why do they do it? They do it to earn the rewards that come with solving the puzzle (which I will discuss in an upcoming blog) and finding the hash of the block. Currently, a miner receives 6.25 BTC (block reward) when they solve the puzzle and get the block's hash. Additionally, miners receive a fee reward paid by the sender to process the transaction.

The block reward changes after every 210,000 blocks, which is approximately every 4 years, and remains constant throughout that period. In contrast, the fee reward depends on the amount of the transaction that the sender is transferring to the merchant. Satoshi Nakamoto, who created the Bitcoin blockchain, generated the first block of this blockchain, and at that time, the block reward was 50 BTC. Refer to the snapshot below, which shows Block 0.

IMPORTANT: The first block is Block 0, so the second block is Block 1, and the 210,000th block is Block 209,999. After 210,000 blocks, the block reward is halved. If this isn't clear, you may want to review the earlier content.

block_reward

Right after this see the Block 209999 in the below snapshot and see the block reward.

block209999

Now see the Block 210000 in the below snapshot and see the block reward, it should be halved as it is the 210001th block.

block_210000

Now see the Block 420000 in the below snapshot and see the block reward.

block_420000

Similarly, let's identify the block where the block reward started to be 6.25 BTC. Now, suppose you have 4 BTC in your Bitcoin wallet, and you want to send 4 BTC to a merchant. You won’t be able to make the payment because you also need to cover the "fee" required for the transaction. For example, if the fee for this transaction is 0.00090000 BTC, you would need to send a total of 4.00090000 BTC. Out of this, 4 BTC would automatically be transferred to the merchant, and 0.00090000 BTC would go to the miner as a fee reward once the transaction is confirmed. However, since you don't have 4.00090000 BTC in your wallet, the transaction cannot be initiated. There's no need to worry about calculating the extra fee yourself—the wallet automatically calculates the fee and adds it to the total amount you’re sending to the merchant. Without paying the fee, the transaction cannot be completed.

In the example above, the transaction was unsuccessful because we couldn't cover the fee. But now, let's say you want to make a transaction of 2 BTC instead. Suppose the fee for this transaction is 0.000XXXXX BTC (where X represents any number as calculated by the wallet). In this case, the transaction will be initiated for a total of 2.000XXXXX BTC, and since you have sufficient funds (4 BTC in your wallet), the transaction can proceed. It will be placed in the unconfirmed transaction pool, and once a miner confirms it, the merchant will receive the money. Below is a snapshot of the transactions in Block 688767 of Bitcoin, showing the transaction fee that each sender had to pay along with the amount requested by the merchant.

block_snapshot_fee

Conclusion

Blockchain technology has revolutionized the way transactions are validated and secured, with miners playing a crucial role in maintaining the network's integrity. By using their computational resources, miners earn block rewards and transaction fees, making it a rewarding venture while ensuring the blockchain remains decentralized, secure, and transparent. As the blockchain continues to evolve, understanding the dynamics of mining, rewards, and the overall process is essential for anyone interested in cryptocurrencies.

In the next blog, we’ll dive into a critical issue in the world of cryptocurrencies—double spending—and explore how blockchain technology prevents this problem, ensuring the trustworthiness and reliability of digital transactions. Stay tuned!