summary: A blockchain is an open, decentralized ledger that records transactions between two parties in a permanent way without needing third-party authentication.
content: A blockchain is a distributed ledger that connects a decentralized network on which users can send transactions and build applications without the need for a central authority or server. It is a continuously growing list of records, called blocks, which are linked and secured using cryptography. As of 2022, there are more than 10,000 active cryptocurrencies based on blockchain, with several hundred more non-cryptocurrency blockchains. Overview A blockchain facilitates secure online transactions. A blockchain is a decentralized and distributed digital ledger that is used to record transactions across many computers so that the record cannot be altered retroactively without the alteration of all subsequent blocks and the collusion of the network. This allows the participants to verify and audit transactions inexpensively. Transactions or codes are batched into blocks, verified, and subsequently accepted as part of the blockchain by a network of distributed users (nodes) through a consensus mechanism. Because each block of verified data contains a unique signature of data from the previous block, they are linked together into a "block-chain." A network-based consensus mechanism is a way a blockchain protocol agrees on how its underlying technical architecture will operate. Some blockchains create a new block as frequently as every five seconds. Structure and Components Blocks Block is a collection of data that contains a timestamp and other encrypted information about recent transactions that need to be validated by the network before being added to the chain. To preserve the transaction history, blocks are strictly ordered, every new block created contains a reference to its parent block, and transactions within blocks are strictly ordered as well. Except in rare cases, all participants on the network are in agreement on the exact number and history of blocks and are working to batch the current live transaction requests into the next block. Block Time Block time is the measure of the time it takes the miners or validators within a network to verify transactions within one block and produce a new block in that blockchain. Cryptocurrencies can use different consensus mechanisms, which, among other factors, affect the time it takes to verify transactions and create new blocks. Each cryptocurrency has a different block time - Bitcoin takes around 10 minutes, while Ethereum takes around 14 seconds. Finality Generally, transaction finality refers to the moment when parties involved in a transaction can consider the transaction to be completed. More specifically, this is the moment when it becomes impossible to revert or alter a transaction that has been added to the blockchain. Transaction finality can be either deterministic or probabilistic. Probabilistic finality takes place when a transaction’s finality increases as more blocks are added to the blockchain after the transaction. That is, as more blocks are added, the transaction is further referenced in the blockchain and becomes increasingly difficult to revert or alter as a result. For most protocols providing probabilistic finality, there is a recommended number of blocks to be added following the transaction until it can be considered complete. For example, it is recommended that one wait until six additional blocks have been added to the Bitcoin blockchain before considering a transaction to be final. Deterministic finality occurs when a transaction is immediately considered to be final once it is added to the blockchain. For this to happen, a "leader" must propose a block to be added, and then a specified portion of validators must approve it. Deterministic finality is less common and is only provided by Practical Byzantine Fault Tolerance-based (PBFT) protocols such as Tendermint. Nodes A blockchain node is one of the devices that run the blockchain protocol software and usually stores the history of transactions. Full Nodes maintain a full copy of all the transactions. They have the capacity to validate, accept and reject transactions. Partial Nodes are also called Lightweight Nodes because they do not maintain the whole copy of the blockchain ledger. They maintain only the hash value of the transaction. The whole transaction is accessed using this hash value only. These nodes have low storage and low computational power. Ledger A ledger is a digital database of information. There are three types of the ledger: Public Ledger – it is open and transparent to all. Anyone in the blockchain network can read or write something. Distributed Ledger – in this ledger, all nodes have a local copy of the database. A group of nodes collectively execute the job i.e verify transactions and add blocks in the blockchain. Decentralized Ledger – in this ledger, no one node or group of nodes has central control. Every node participates in the execution of the job. Smart contracts Blockchain smart contracts establish the terms of an agreement between users and smart contracts’ terms are executed as code running on a blockchain. Smart contracts allow developers to build apps offering peer-to-peer functionality. They are used in everything from financial tools to logistics and game experiences, and they are stored on a blockchain like any other crypto transaction. Smart-contract-powered apps are often referred to as decentralized applications or dapps. Consensus Mechanisms Consensus mechanisms (also known as consensus protocols or consensus algorithms) are used to verify transactions and maintain the security of the underlying blockchain. Consensus is the process by which a group of peers – or nodes – on a network determine which blockchain transactions are valid and which are not. Consensus mechanisms are the methodologies used to achieve this agreement. It is these sets of rules that help to protect networks from malicious behavior and hacking attacks. Proof-of-work (PoW) and proof-of-stake (PoS) are two of the most widely used consensus mechanisms. Proof-of-Work Proof of work is a consensus mechanism cryptocurrencies use to verify new transactions, add them to the blockchain, and create new tokens. Proof-of-work requires computers to solve cryptographic puzzles, putting in "work" to be rewarded with the ability to verify or validate, transactions on the blockchain. It’s called cryptocurrency mining. The idea is that through a long string of numbers and letters, called hashes, it’s possible to stave off malicious attacks and verify that a transaction is valid. When someone puts data through a function on the network, which is the basis of transactions on the blockchain, it can only generate one hash. When transactions (like transfers of some cryptocurrency from one user to another) happen on the blockchain, the resulting hash is distributed across the entire network. Any change to the hash by tampering would be noticed and rejected.The Bitcoin blockchain was the first Proof-of-Work network. Since its inception, the PoW mechanism has been used by numerous additional blockchains, including Dogecoin, Litecoin, Monero, and Bitcoin Cash. Proof-of-Stake In a proof-of-stake system, staking serves a similar function to proof-of-work mining. PoS relies on validators who own the coins associated with the blockchain. With proof-of-stake, a validator is chosen randomly, based in part on how many coins they have locked up in the blockchain network, also known as staking. The coins act as collateral and when a participant, or node, is chosen to validate a transaction, they receive some crypto in exchange. Proof-of-stake requires multiple validators to agree that a transaction is accurate, and once enough nodes verify the transaction, it goes through. PoS has faster transaction speeds in comparison to PoW and more efficient energy requirements that allow higher scalability and thus making it easier to adopt among new users. PoS is used by Ethereum, BNB Chain, Avalanche, The Graph, and others. Forks Hard Forks A hard fork term refers to a situation when a blockchain splits into two separate chains as a consequence of the use of two distinct sets of rules trying to govern the system. These rules create certain parameters and standards for mining, staking, node connections, transaction specifics, and more that must be adhered to by all participants. So there appear two networks running in parallel. All nodes had an identical blockchain until the point of the fork (and that history remains), but they have different blocks and transactions afterward. Cryptocurrencies like Bitcoin Cash and Bitcoin Gold evolved out of the original Bitcoin blockchain via a hard fork. In October 2022, BNB Chain, the smart contract-enabled blockchain of crypto exchange Binance, underwent a hard fork upgrade named Moran as a fix for the exploit that happened the same month. Soft Fork A soft fork is a rule modification to the blockchain whereby newly implemented changes remain backward-compatible with older versions. A soft fork convinces the old blockchain network to accept the altered rules, thus allowing both the upgraded and old blocks of transactions to be accepted at the same moment. History Early Beginnings & Bitcoin Development In 1982, cryptographer David Chaum first proposed a blockchain-like protocol in his dissertation "Computer Systems Established, Maintained, and Trusted by Mutually Suspicious Groups." Chaum has been referred to as "the father of online anonymity", and "the godfather of cryptocurrency". He is also known fo