Tag: Blockchain

  • Solutions to the Trilemma (BT.2)

    Picking up from the last post let’s look at some of the solutions to this trilemma. All solutions try to optimize one or more of the 3 elements- decentralization, security, and scalability.

    One solution comes from optimizing the nodes. But first, what is decentralisation?Blockchain networks like Bitcoin are designed in a decentralized nature such that there is no central authority, organization, or body in charge of network functioning. The network layer is available for anyone who wants to participate in the Blockchain. Thus the control of the network is fully distributed among participants rather than a single entity. Everyone on the Blockchain has access to the data on the chain, and if anyone tries to change the functioning or records to cheat, the participants have the vote to reject the data found at fault. Let’s take the example of the Bitcoin network to avoid technicalities in understanding decentralized architecture. No third party controls the Bitcoin network, unlike the traditional financial system in conventional banks. The third-party controls record to ensure that data is managed correctly and that transactional parties keep their transaction records safe.

    On the other hand, the Bitcoin Blockchain allows everyone on the chain to access the data and cross-check transactional records before these records are added to the digital database. This way, Blockchain technology creates a system without intermediaries to control the network and enforce trust between participants. However, transaction time increases in Blockchain networks as all the participants on the chain do data validation, and sometimes it can be slow due to how data is processed and shared on the Blockchain. (Source: https://www.blockchain-council.org)

    In a typical blockchain, all the nodes should be full nodes i.e. all nodes should have a complete independent replica of the chain and validate blocks and transactions. This is key to the chain being truly trustless and decentralized. We have already seen that since a blockchain, unlike an internet database is an append-only architecture, with time it becomes too large to have lots of nodes committing that kind of disk space. (for eg: a node of blockchain required about 400GB of disk space as per Statista, by mid-2022). To overcome this developers have come up with a solution where in instead of a full node you have a lightweight or partial node. Such nodes only keep the block headers instead of full blocks, to save on disk space but of course at the cost of decentralization (optimization problem..remember?). It is desirable to have more full nodes than light nodes in a blockchain. There are other variants and all types of terms which are some variant of a light node- such as Pruned Node, Sharding, etc. In the next one we will look at some other such solutions.

  • The Blockchain Trilemma (BT.1)

    BLockchain Trilema

    Like most things in life, Blockchain too has an optimisation problem which is known as the Blockchain Trilema. What is the problem?

    The blockchain trilemma is the concept that decentralization, security and scalability can’t all be represented in one blockchain. The term blockchain trilemma was coined by Vitalik Buterin, co-founder of Ethereum. Developers worldwide are experimenting by applying different scalability solutions and consensus mechanisms, including sharding and state channels.

    The three elements of the blockchain trilemma are decentralization, security, and scalability. The perfect blockchain boasts all three elements, but finding a balance between the three is difficult and presents a problem. For instance, it would be fantastic to have all credit card transactions flow on the blockchain network but why haven’t that happened already? Simply because, while maintaining Decentralisation and Security the Scalability suffers and suffers massively!. For perspective, the most common decetralised & secure blockchain application- the Bitcoin blockchain had a disk size of 406.05 gigabytes on July 10, 2022!!. Just imagine the problems such huge disk and data requirement this poses for Scalability. Every node that you add to the network, thereby improving the network’s security will require that diskspace. It is not easy to have such a distributed large network where every node can spare that kind of hardware resource. Also, it makes things painfully slow. For eg the block time (Time it takes to add a bloick in a blockchain) is about 10 minutes forBitcoin blockchain. Just imagine how slow would it be if we wanted to have all credit card or banking transactions on something like a Bitcoin blockchain.

    Now, ofcourse there are optimisation solutions for this problem. Some possible solutions include sharding, sidechains etc where one can focus on the more critical requirements, while kind of compromising on others. In essence, a simple Blockchain is not the solution to all use cases. Will talk about a few of these solutions in the next one.

  • Consensus Mechanism Contd..

    Picking up from where we left last; some more about the 2 most common mechanisms- PoW & PoS.

    Proof-of-Work (PoW) is a consensus mechanism that uses mining to validate transactions and create new blocks on a blockchain. Mining involves solving complex mathematical problems that require a lot of computational power and energy. The first miner who finds a valid solution gets rewarded with newly minted coins and transaction fees. PoW ensures that the network is secure and resistant to attacks, as anyone who wants to alter the blockchain history or create fraudulent transactions would need to control more than 50% of the network’s hashing power, which is very costly and impractical. PoW is most commonly used by Bitcoin.

    Advantages of PoW:

    • PoW is considered a more secure consensus mechanism as it is difficult for any single entity to control more than 50% of the network’s computational power.
    • PoW provides an incentive for miners to participate in the network, which helps to ensure that the network remains decentralized.
    • PoW has been widely tested and used in various cryptocurrency networks, making it a well-proven and reliable consensus mechanism.

    Disadvantages of PoW:

    • PoW is energy-intensive, which leads to high electricity consumption and carbon footprint.
    • PoW can also lead to centralization of the network, with a few large mining pools controlling a significant portion of the network’s computational power.
    • PoW can also be vulnerable to 51% attacks, in which a group of miners controlling more than 50% of the network’s computational power could potentially manipulate the blockchain.

    Proof-of-Stake (PoS) is a consensus mechanism that uses staking to validate transactions and create new blocks on a blockchain. Staking involves locking up some coins in a smart contract as a collateral that can be slashed if the validator behaves dishonestly or lazily. Validators are randomly selected to propose new blocks or vote on the validity of existing blocks based on their stake size and other factors. Validators get rewarded with transaction fees and sometimes newly minted coins. PoS aims to be more secure, energy-efficient, and scalable than PoW, as it does not rely on wasteful computations and reduces the risk of centralization and 51% attacks. PoS was first proposed as an alternative to PoW by Peercoin and later implemented by other cryptocurrencies such as Cardano, Tezos, and Ethereum

    Advantages of PoS:

    • PoS is less energy-intensive than PoW, which can reduce the carbon footprint of the network.
    • PoS can also be more decentralized, as validators with smaller amounts of stake can still participate in the network and earn rewards.
    • PoS can also be more resistant to 51% attacks, as a group of validators would need to control a significant portion of the network’s stake in order to manipulate the blockchain.

    Disadvantages of PoS:

    • PoS can lead to centralization of the network, with validators with the largest stake having the most influence over the network.

    Some of the main differences between PoW and PoS are:

    • PoW requires miners to expend energy and hardware resources, while PoS requires validators to stake coins as collateral.
    • PoW rewards miners with newly minted coins and transaction fees, while PoS rewards validators mostly with transaction fees and sometimes newly minted coins.
    • PoW adjusts the difficulty of mining based on the network’s hashing power, while PoS adjusts the stake size and other parameters based on the network’s participation rate.
    • PoW is vulnerable to 51% attacks if a malicious actor controls more than half of the network’s hashing power, while PoS is resilient to 51% attacks unless a malicious actor controls more than two-thirds of the network’s stake.
    • PoW consumes a lot of electricity and contributes to environmental issues, while PoS consumes much less electricity and has a lower carbon footprint.

    I hope this helps you understand the basics of Proof-of-Work (PoW) and Proof-of-Stake (PoS) consensus mechanisms. In the next post, will try to take a step back and talk about the Blockchain Trilemma.

  • What is ‘Consensus mechanism’ in a blockchain?

    The consensus mechanism is a crucial component of a blockchain project as it ensures the integrity and security of the network. It is responsible for reaching an agreement among all participants on the current state of the blockchain and the validity of new transactions. This is important for maintaining the trust and reliability of the blockchain network. In essence, consensus mechanisms are what impart the defining characteristics of a particular project/network. There are several types of consensus mechanisms that are used in different blockchain networks, each with its own strengths and weaknesses. The two most popular and widely used consensus mechanisms are: Proof of Works (PoW) & Proof of Stake (PoS) – more on them in detail, later.

    This is just a simple primer on the consensus mechanisms I have heard of. I cannot guarantee that all of the below mechanism make sense! But anyways, here they are-

    1. Proof of Work (PoW): This is the most widely used consensus mechanism, and is the foundation of the Bitcoin and Ethereum networks. PoW is a computational process that requires miners to solve complex mathematical problems in order to add new blocks to the blockchain. The first miner to solve the problem gets to add the next block and receives a reward in the form of new coins.
    2. Proof of Stake (PoS): This mechanism allows participants to “stake” or lock up a certain amount of their coins as collateral in order to validate transactions and add new blocks to the blockchain. The validators are chosen based on the amount of coins they have staked, and they are rewarded with transaction fees.
    3. Delegated Proof of Stake (DPoS): This mechanism is similar to PoS, but allows token holders to vote for a select group of validators, who are responsible for maintaining the blockchain. DPoS is designed to be more efficient and scalable than PoS, but is also more centralized.
    4. Proof of Authority (PoA) : PoA is a consensus mechanism where a group of validators is pre-approved by the network’s creator. These validators are responsible for verifying transactions and adding new blocks to the blockchain, and are often chosen based on their reputation or identity.
    5. Proof of Burn (PoB): In this mechanism, miners burn or destroy a certain amount of their coins in order to prove their commitment to the network. This process is used to determine which miner gets to add the next block to the blockchain.
    6. Proof of Elapsed Time (PoET): This mechanism is specifically designed for permissioned networks, such as consortium blockchains. PoET uses a random wait time to determine which miner gets to add the next block to the blockchain, but unlike PoW, it doesn’t require significant computational power.

    Since the technology is relatively new, new consensus mechanisms are still being developed and experimented with. As you would have heard already, the most common ones are PoS & PoW. More on them in the next post!