Blockchain Technology is altering the way we conduct business and store information. It is changing how traditional centralized systems operate by establishing a decentralized, unalterable, and secure space for digital transactions. One key feature that distinguishes blockchain from other technologies is the notion of finality.
Finality, in the context of blockchain, refers to the irreversibility once a transaction is confirmed. When a transaction is added to the blockchain, it is considered final and can no longer be altered. Bear in mind that finality and latency are interconnected in blockchains, but they are not identical. Latency is the complete time taken between submitting a valid transaction to the network and the moment the network has committed to or confirmed the transaction (with a slight chance of it being reversed). We have a distinct blog for you regarding blockchain latency here.
In this article, we will analyse the concept of finality in blockchain and how Shardeum compares this vital measure. We will also examine the various types of finality with examples. Finality is the foundation of consensus algorithms that guarantee the integrity of the blockchain network and prevent malicious attacks, such as double-spending and tampering with the transaction history.
Finality in Blockchain vs Finality in Centralised Systems
Once the transaction is recorded on a blockchain, it becomes a part of the distributed ledger upheld by a network of nodes, which together verify and validate the transaction. In a decentralised blockchain network, finality is accomplished through consensus algorithms, permitting network participants or validators to concur on the authenticity of a transaction without requiring an intermediary. Finality in blockchain ensures that the transactions are ultimate and cannot be tampered with, a crucial factor in establishing a secure and transparent record-keeping system. It also enables blockchain networks to initiate the settlement process promptly, leaving minimal scope for manipulations or bot attacks.
In traditional centralised systems, finality is achieved through a trusted third-party intermediary, such as a bank, which concludes the transactions but is not entirely tamper-proof. Finality in centralised institutions is thus not immediate or absolute and brings a certain amount of uncertainty. Centralised systems, furthermore, lack transparency and are susceptible to delayed or failed settlements due to the involvement of multiple third parties and the traditional world order.
What are the Types of Finality?
1. Probabilistic Finality
2. Definite Finality
3. Direct Finality
4. Financial Finality
Now that we understand what finality means in blockchain, let's explore the various types of finality. Finality in blockchain can be categorised into different types, depending on the degree of certainty and irreversibility attained. The four primary types of finality in blockchain are probabilistic finality, absolute finality, immediate finality, and economic finality.
1. Probabilistic Finality
Probabilistic finality stands as one of the earliest forms of finality in blockchain. It emerges when the likelihood of a transaction being overturned becomes exceedingly negligible following a specified count of verifications/confirmations. In a proof-of-work (PoW) blockchain network, such as Bitcoin, probabilistic finality is attained upon the inclusion of a transaction within a block that's mined and appended to the lengthiest chain. With more blocks integrated into the chain, the probability of the transaction being reversed diminishes substantially. Nevertheless, a minute possibility remains of a chain reorganization, which could potentially result in the transaction being reversed.
Probabilistic finality in blockchain is similarly applied in proof-of-stake (PoS) and delegated proof-of-stake (DPoS) blockchain networks, wherein validators pledge their tokens as collateral to safeguard the network and authenticate transactions. The greater the quantity of staked tokens, the greater the degree of security and finality attained.
2. Absolute Finality
Absolute finality is the next concept we'll explore, which, in principle, furnishes complete and irreversible affirmation of a transaction. Within a framework of absolute finality, once a transaction is logged on the blockchain, it is viewed as enduring and immune to reversal or tampering.
Certain blockchain networks, like Ripple and Stellar, deploy consensus algorithms that establish absolute finality by means of a process termed federated consensus. In this scenario, a cluster of trusted validators assumes responsibility for authenticating transactions and upholding network integrity. When a validator endorses a transaction, it is definitively settled and cannot be undone. Additionally, there exist more decentralised networks like Cosmos and Algorand, which rely on consensus algorithms like PBFT and PPoS, purportedly aiding them in achieving absolute finality.
Absolute finality in blockchain engenders a substantial level of assurance for transactions while upholding heightened security. Nevertheless, it typically necessitates a substantial level of trust in the validators responsible for validating the transactions.
3. Immediate Finality
Immediate finality, or instant finality as it's more recently denoted, is a phrase that has been emerging, notably introduced by Shardeum. It is often conflated with absolute finality. However, immediate finality, in practice, represents an achievement that proves remarkably challenging and would necessitate transformative iterations in the manner conventional blockchains execute consensus and transaction processes.
In certain instances, achieving absolute finality in a public blockchain demands satisfactory confirmation through a specific count of subsequent blocks to guarantee the transaction's irreversible status. Alternatively, in other scenarios, a validator chosen at random within a blockchain network proposes a fresh block and disseminates it before fellow participants validate the block in each cycle of consensus, culminating in a conclusive round of consensus. While Byzantine Fault Tolerance (BFT) and other contemporary consensus algorithms can deliver swifter finality in contrast to, let's say, Proof of Work (PoW) consensus, they still entail a relatively prolonged period of latency due to the requisite for multiple rounds of communication and validation when juxtaposed with the Shardeum approach.
On Shardeum, consensus will be conducted at the transaction level rather than the block level, and transactions will be concurrently handled via dynamic state sharding, all the while upholding atomic and cross-shard composability. Depending on the network's workload, the auto-scaling feature will allow for rapid expansion or contraction of the shard count through the utilization of standby nodes. The processed transactions are eventually grouped and transmitted to archive nodes. Moreover, Shardeum employs EIP-2930 and streamlines the access list for multiple contracts. As a result, network finality and latency will be reduced to 0.2 seconds. Immediate finality in the blockchain, particularly within the Shardeum context, confers the utmost degree of assurance and security.
4. Economic Finality
Economic finality takes its place as the third aspect, where finality is attained through the economic incentives within the network. In a blockchain network employing economic finality, transactions receive confirmation contingent on the expense required to undo them.
For instance, within a Proof of Work (PoW) blockchain network, a potential attacker would need to expend substantial resources to reverse a transaction, rendering such an endeavor economically unviable. Consequently, economic finality within the blockchain realm ensures heightened security and assurance. Nevertheless, it is not entirely impervious, as there remains a slight possibility that an individual with adequate resources could potentially reverse a transaction.
What are the Examples of Finality in Proof-of-Stake Networks?
1. Shardeum
Shardeum employs the Proof of Quorum (PoQ) and Proof of Stake (PoS) consensus algorithms to handle transactions on the network in a first-come-first-serve (FCFS) manner. PoQ facilitates the trustless and leaderless aggregation of votes once validations and subsequent consensus are attained for transactions among the relevant grouping of participating validators across shards. PoS ensures that validators stake a minimum quantity of network coinage to partake in the consensus procedure.
Furthermore, the network's consensus algorithm will allow for the random auto-rotation of both validator and standby nodes to optimise security. By utilising transaction-level consensus and parallelised processing (dynamic state sharding grants validators dynamic address spaces spanning multiple shards, with significant overlap, thus permitting transactions impacting these shards to be concurrently processed), Shardeum's scalability will adhere to a linear trajectory alongside atomic and cross-shard composability. Network finality will be immediate, in tandem with network latency, standing at a mere 0.2 seconds. Indeed, this signifies that the time span linking a user initiating a transaction and the network confirming it amounts to 0.2 seconds, featuring a 0% likelihood of reversibility subsequent to confirmation. In addition, this also signifies that Shardeum will accomplish heightened equity by preempting Miner Extractable Value (MEV) within the blockchain ecosystem.
2. Casper FFG
Casper FFG (Friendly Finality Gadget) constitutes a consensus algorithm devised by Ethereum to enhance their prevailing Proof-of-Work (PoW) consensus mechanism. This algorithm blends PoW with Proof-of-Stake (PoS) to realise finality within the Ethereum network. Casper FFG introduces the notion of "validators," individuals who pledge their ether as collateral to fortify the network and validate transactions. Upon the ultimate confirmation of a block through Casper FFG, it attains an irreversible status, ensuring absolute finality of transactions.
3. Tendermint
Tendermint stands as a consensus algorithm utilised within the Tendermint Core blockchain platform. It constitutes a Byzantine Fault Tolerant (BFT) Proof of Stake (PoS) consensus algorithm that accomplishes finality via a deterministic progression. Tendermint engages a group of validators who alternate in suggesting blocks and authenticating transactions. After a block is proposed and garners consensus from the majority of validators, it attains finality, ensuring an unequivocal final status for transactions.
4. Algorand
Algorand represents a Proof of Stake (PoS) blockchain platform that employs a consensus algorithm named Pure PoS. Algorand attains finality via an "unworkable block proposal," wherein the majority of stakeholders collectively propose and concur on a novel block in an online environment. Upon reaching consensus on a block, it gains an irreversible status, ensuring absolute transaction finality.
5. Dfinity
Dfinity serves as a Proof of Stake (PoS) blockchain platform that employs a consensus algorithm named Threshold Relay. Dfinity attains finality via a multi-round procedure in which blocks are suggested and validated by a set of "heroes" chosen at random from a pool of validators. Upon consensus being reached among the heroes regarding a block, it obtains a final status, guaranteeing complete transaction finality.
6. Thunderella
Thunderella is a Proof of Stake (PoS) consensus algorithm developed for enhancing interoperability in blockchain networks. It adopts a dual-tiered strategy wherein a primary PoS chain collaborates with a "sidechain" to accomplish finality. Once a transaction secures confirmation on both the principal PoS chain and the sidechain, it acquires a conclusive status, assuring absolute transaction certainty.
7. Ouroboros Genesis
Ouroboros Genesis serves as a Proof of Stake (PoS) consensus algorithm employed within the Cardano blockchain platform. It accomplishes finality by merging a core PoS chain with "epoch boundaries," during which validators suggest and authenticate blocks. After a block secures confirmation during an epoch boundary, it attains a definitive status, thereby ensuring complete transaction finality.
These instances exemplify distinct PoS consensus algorithms utilised in diverse blockchain networks and protocols to achieve finality. Each algorithm possesses its individual method of achieving finality, thereby conferring varying levels of security and assurance to transactions.
What Types of Attacks Could Affect Finality in Blockchain Networks?
While consensus algorithms and network protocols employed in blockchain networks are generally robust, they do possess a slight vulnerability to a few attacks that could potentially influence finality. Some of the most prevalent forms of attacks include:
51% attack
Selfish mining
DOS attacks
Shard attacks/Cross-shard attacks
Timejacking attacks
Nothing-at-stake attacks
1. 51% Attack
A 51% attack (also known as a majority attack) occurs when a solitary entity or a collective body manages over 50% of the network's hash rate. This empowers the attacker to oversee the network and obstruct other miners from authenticating transactions. Within such a circumstance, the attacker could rearrange the blockchain and invert transactions previously validated, thereby compromising the concept of finality within the blockchain.
2. Selfish Mining
Selfish mining constitutes an attack in which a miner or a consortium of miners strategically disclose blocks to the network, aiming to gain an upper hand over fellow miners. The attacker holds back legitimate blocks and only discloses them once they've generated extra blocks, conferring them an inequitable edge over their counterparts. This can result in diverse miners possessing varying versions of the blockchain, culminating in a split in the chain and eroding the notion of finality.
3. DOS Attacks
In this scenario, an assailant inundates a specific shard on a sharded chain with a substantial influx of malevolent transactions or requests, resulting in a denial of service for lawful users of that shard. Measures such as Proof of Stake consensus, rate limiting, enhancing decentralisation, horizontal scalability, randomisation, and automatic rotation of validators are some of the approaches employed to avert Distributed Denial of Service (DOS) attacks.
4. Shard Attacks/Cross-shard Attacks
In this instance, an aggressor attains authority over a notable quantity of shards or exploits the weaknesses in communication among distinct shards, thereby enabling them to manipulate transactions or disrupt the consensus process within those shards. Approaches such as leaderless consensus, suitable reputation/consensus mechanisms, gossip protocols, automated rotation of validators post each epoch cycle, and optimising decentralisation stand as several methods that can assist in averting shard-based attacks.
5. Timejacking Attacks
Timejacking attacks alter the timestamps of blocks, aiming to either decelerate or accelerate the advancement of the blockchain. Through this action, assailants can disturb the network's finality and consensus mechanisms. Networks with diminished equity are especially susceptible to these assaults.
6. Nothing-at-stake Attacks
In a nothing-at-stake attack, validators or miners deliberately generate several forks or conflicting blocks without incurring any expense. This undermines the finality of transactions, as a consensus cannot be established on a singular version of the blockchain.
Conclusion
Finality in blockchain denotes the unchangeable nature of verified transactions. Diverse forms of finality, encompassing probabilistic, absolute, immediate, and economic finality, are attained through assorted consensus algorithms and protocols deployed in blockchain networks. Proof-of-Stake networks have emerged as an alternative to Proof-of-Work setups, yielding swifter finality via staking mechanisms. With the advent of Shardeum and its PoQ + PoS consensus algorithm, a blockchain network will at last possess instantaneous finality and latency, marking a novel milestone.
Frequently Asked Questions (FAQs)
1. What is Transaction Finality?
Transaction finality in blockchain pertains to the confidence that once a transaction has been authorised and incorporated within a block, it remains impervious to reversal or modification. Finality holds paramount importance in upholding the unchangeable nature and credibility of the blockchain.
2. What is the Finality of Shardeum?
The finality of Shardeum will align with its latency, which is 0.2 seconds, made possible by its innovative technology encompassing dynamic state sharding, auto-scaling, auto-rotation, a distinct consensus algorithm, transaction-level consensus, parallel processing of transactions, and automated EIP 2930 access list. Collectively, these elements facilitate the network to scale progressively while maintaining instantaneous finality.
3. What is Consensus vs Finality?
Consensus pertains to the procedure through which a network of nodes (or validators) within a blockchain system reaches consensus regarding the legitimacy of transactions and the sequence in which they are integrated into the blockchain. Conversely, finality denotes the unchangeable nature of approved transactions. While consensus guarantees the validation of transactions, finality guarantees their immutability and non-reversibility.