The Fantom Sonic testnet phase is currently in full swing, with many individuals engaging with the open testnet to experience its incredible performance. As part of that, numerous technical terms are being tossed around for evaluating the network and its transactions. Our Exploring Sonic series will illuminate some of these crucial terms. In this article, we’ll elucidate the significance of time to finality.
How Fast is Fantom Sonic?
The term is used for the point at which a transaction on a blockchain becomes irreversible and recorded permanently. But before we delve in further, it’s essential to have a fundamental understanding of how a blockchain operates.
At its essence, a blockchain is merely a database that contains transactions. Whenever a transaction is submitted to a blockchain, then it’s not directly added to it. Instead, it’s bundled into a “block” alongside other transactions, which is then integrated into the database. As such, a blockchain is a sequential chain of blocks that encompass transactions, hence its name.
Blockchain Decentralization and Transaction Finality
Most significantly, a blockchain is decentralized, which means it doesn’t operate on a single server. Instead, the blockchain exists simultaneously on an extensive amount of computers around the world that operate software to communicate with each other and concur on the content of the database. (On Fantom, these computers are referred to as validators.)
It’s these computers that bundle transactions into blocks and append them to the blockchain at frequent intervals. Approximately every 10 minutes for Bitcoin, every 12 seconds for Ethereum, and roughly every 0.4 seconds for the Sonic closed testnet. Nonetheless, the addition of a block to the blockchain does not imply that the transactions it contains are immediately deemed final and immutable.
In most blockchains, this is the case., a single computer is typically selected to produce the next block and add it to the blockchain. Other computers in the system then receive this block and authenticate the transactions within it to
ensure they’re valid.
Blockchain Fork Resolution
But due to the structure of most blockchains, there can be instances when two computers are concurrently chosen to produce a block. In such a scenario, how does the remainder of the system discern which block to follow? Well, they must wait until the subsequent computer is chosen to generate the next block, and the preceding block utilized by this computer is acknowledged as the legitimate one, while the alternative block is disregarded.
This is referred to as the longest chain rule as every computer in the system adheres to the version of the blockchain with the most blocks, which naturally becomes the version on the most recent computer chosen to generate a block. This mechanism is implemented by both Bitcoin and Ethereum. After a computer is chosen to produce the subsequent block, bringing the blockchain back on track, we still have to await several more blocks to be produced. Due to potential communication delays between the computers in the system, it’s technically feasible for some of them to still possess the old invalid block in their version of the blockchain.
After a certain number of blocks have been produced, this is no longer a risk as we can presume those outdated computers have undergone chain reorganization to alter their database to the current and correct one. Only then can we regard the transactions in the initial block as final and irreversible.
Fantom Instant Transaction Finality
And now we’re prepared to define time to finality, which simply denotes how long it takes for a transaction to be considered irreversible after it’s submitted. On Bitcoin, it takes around an hour (6 blocks produced). Meanwhile on Ethereum, it takes approximately two minutes (12 blocks produced). On the Sonic testnet, it takes roughly a second.
That’s because the design of Fantom allows for a block and its transactions to be considered final and irreversible the moment it’s appended to the blockchain, which takes around 0.4 seconds. The longest chain rule and chain reorganizations do not exist on Fantom. Once a transaction has been appended to the blockchain, it’s instantaneously final.
There are several factors that collaborate to make this feasible. On Fantom, no single computer is selected to produce the next block. Instead, the block is appended to the blockchain once the majority of the computers in the system have received it. As such, there can never be a situation on Fantom in which the computers disagree on the state of the database. If you’re curious to learn more about the technical details behind Fantom’s architecture, read our accessible article on the topic.
Conclusion
To sum up things, time to finality is really important for several reasons:
- Security: The longer it takes for a transaction to reach finality, the greater the risk of something going awry, like a double spend (where someone attempts to spend the same digital asset twice).
- Efficiency: For businesses and users, knowing how long a transaction will take to be finalized is crucial for planning and operations.
- User experience: Shorter time to finality leads to an enhanced user experience, as users don’t have to wait long to be certain their transaction is irreversible.