Sub-second latency: the instantaneous trading speed that Aptos can provide

Author:Brian ChoManu DhundiSital KediaZekun LiAlexander SpiegelmanSatya Vusirikala
Compilation: vergil.apt

Sub-second latency: the instantaneous trading speed that Aptos can provide

Aptos is revolutionizing the blockchain experience by becoming the first platform to achieve sub-second end-to-end latency.

In the fast-paced world of digital trading, timing is crucial. Whether you're quickly exchanging assets on a decentralized exchange (DEX) or immersed in an exciting role-playing game, waiting for a blockchain confirmation can be demoralizing. Even mundane tasks like paying for coffee shouldn't be accompanied by long waits. In short, low end-to-end transaction latency is critical to a great Web3 user experience.

End-to-end (E2E) latency

End-to-end latency is the duration required for a transaction to be submitted by a user and recognized as irrevocably settled (or finalized) on the blockchain. This includes the time it takes for the transaction to reach the validator, the time it takes to reach consensus, the time it takes to validate and execute the transaction, the time it takes to ensure reliable storage, and the time it takes to provide confirmation of the transaction to the user.

Sub-second latency: the instantaneous trading speed that Aptos can provide

E2E latency represents the true user experience when interacting with the blockchain, as opposed to internal measurements like "block time" which can be misleading. Transaction confirmations on Aptos guarantee irrevocable finality, which is stronger than the probabilistic and optimistic finality offered by some blockchains.

E2E Latency Comparison Benchmark

At Aptos, we recognize that verifiable and repeatable benchmarks that promote fair comparisons are critical to the prosperity of the blockchain industry as a whole. In ourThroughput benchmark 2023After the success of theNew benchmarksthat is used to measure the E2E latency of the blockchain. The number generated by the benchmark represents the observed latency from the time a user submits a transaction to the time it is confirmed.

We compare the latency of currency transfer transactions across multiple blockchain networks in their home network environments. Currency transfers are a simple and cost-effective transaction type widely supported by SDKs.

The benchmark is an operation that periodically transfers a small amount of cryptocurrency from the GCP Asia region to predefined sender and receiver accounts. It is run from Asia, where most Web3 users are today, and utilizes the JavaScript SDK for the respective blockchain at a frequency of 15 minutes to avoid overloading any blockchain and keep experimentation costs low. We use publicly available RPC endpoints and pay the default gas fee.

We made comparisons across several chains designed for high-performance use: Aptos, Solana, Near, Avalanche (C-chain), Sui, Arbitrum, Optimism, Base, and Polygon. more detailed information about the benchmark and how to run it can be found here. Live results from the benchmark can be found athere areView.

Sub-second latency: the instantaneous trading speed that Aptos can provide


As the chart above shows, Aptos is the fastest and only blockchain to achieve sub-second end-to-end latency. It's worth noting that while the above benchmarks were run in Asia, Aptos achieved sub-second latency in all other test regions as well.

Aptos: Designed for Speed

A transaction's journey continues throughout the blockchain: the transaction is created on the client/SDK, submitted to the memory pool on the full node, propagated to the set of verifiers, sorted and executed in consensus, then returned to the full node via state synchronization, and finally the result is read on the client/SDK.

Sub-second latency: the instantaneous trading speed that Aptos can provide

Achieving sub-second latency in a decentralized blockchain environment is challenging due to network and speed of light limitations. Clients/SDKs and full nodes are distributed across the globe. The geographically distributed set of decentralized verifiers requires an average latency of 100 milliseconds or more to send a message across the entire set, which makes fast finality a challenge.

To reduce latency, we rely on robust architecture and optimizations that optimize every part of the transaction path:

memory pool

The memory pool is a staging area for incoming transactions; the memory pool validates and forwards transactions upwards to the set of validators, and then these transactions are inserted into the Quorum store. The primary function of the memory pool is to queue and prioritize transactions under load, and is implemented across nodes and validators to prevent distributed denial-of-service (DDoS) attacks. The memory pool is gas-aware to prioritize transactions with the highest gas as they propagate upwards.

To achieve sub-second latency, the memory pool is optimized for fast propagation between the full node and the set of verifiers. Recently, full nodes have been upgraded to support latency-aware peer-to-peer node selection. They send ping requests to upstream validator full nodes to measure latency and select a set of upstream nodes that have the lowest latency and are closest to the validator set.

Lightning Fast Byzantine Fault Tolerance (BFT) Consensus

The validator set provides a replicated state machine where user transactions are executed via Quorum storage, BFT consensus, and block execution and commit.

The BFT consensus protocol AptosBFT v4 is based on Jolteon and is proven to be resilient to one-third of the shares of failed verifiers (including malicious behavior). Based on this, we have implemented a series of new optimizations that reduce the consensus latency from 5 to 3 message delays. This aligns Aptos' consensus latency with the theoretical lower bound, establishing Aptos as the fastest blockchain in the industry.

To further optimize sub-second latency, we implemented adaptive block proposals.The main purpose of the Quorum store is to increase throughput by including signed guarantee certificates for transaction batches in the proposal instead of the original transactions, which may be larger for a large number of transactions. With adaptive block proposals, proposers can include inline batches that have not yet received their guarantee certificates. This speeds up the time it takes for transactions to be added to the proposal.

High throughput supports low latency under heavy loads

Our software stack has been carefully crafted to ensure that our platform remains responsive during periods of peak demand. In a recent experiment on our preview network (similar to our main network), we reached a staggering peak throughput of 30,000 transactions per second (TPS) and seamlessly processed an unprecedented 2 billion transactions in a single day.

Behind this impressive performance are several key innovations unique to Aptos. Our horizontally scalable Quorum storage enables consensus to easily scale to meet growing demand. Dynamic parallel processing powered by BlockSTM ensures transactions are processed simultaneously, dramatically increasing execution throughput. In addition, our highly optimized bulk storage solution minimizes storage overhead, while pipeline processing at all stages optimizes resource utilization. Together, these innovations build a robust framework that enables our blockchain to maintain low latency under the most demanding conditions.

streaming state synchronization

Transaction results are sent downstream via streaming state synchronization, a feature designed to minimize user-perceived latency by streaming transaction confirmations to downstream nodes. Using our latency-aware peer-to-peer node selection mechanism, downstream nodes intelligently select the nearest and most reliable upstream node. Once connected, the downstream node subscribes to transaction confirmation notifications. When an upstream node receives a transaction confirmation, it immediately streams it downstream without any additional polling delay.

Observations beyond the original figures

block time
End-to-end latency should not be confused with "block time", which refers to the time it takes for the blockchain to generate a new block. While block time is a measure of blockchain performance, it does not provide a complete picture of end-to-end latency, as it relates to the duration of only a portion of a transaction's processing phase and not to the actual user experience.

Types of finality

When Aptos transactions are confirmed to the user, they have been written to the blockchain and are guaranteed to be irrevocably final. Some blockchains reduce end-to-end latency by providing weaker finality guarantees. Broadly speaking, there are three kinds of finality:

Probabilistic finality - In some blockchains (e.g., Bitcoin), the probability of a block being removed from the blockchain decreases over time due to the reorganization of blocks, and only after a certain threshold is reached does this probability approach zero, and then the block is considered final (e.g., after tens of minutes).

Optimistic finality - Some blockchains (e.g., Solana) provide early confirmation of blocks based on certain rules, such as collecting enough votes from verifiers to provide some assurance of finality - however, these finality guarantees are not irrevocably of the block. For example, in Solana's case, a dishonest validator (subject to a pledge deduction) may cause a transaction that was optimistically confirmed to be rolled back, thereby violating the assumed finality. As a result, a transaction is considered irrevocable after optimistic validation only after more than 31 validation blocks are built on top of the optimistic validation. As can be seen from our measurements, while Solana achieves optimistic confirmations in about 5 seconds, irrevocable finality (in the manner guaranteed by Aptos) takes about 25 seconds to achieve.

Sub-second latency: the instantaneous trading speed that Aptos can provide

Irrevocable finality - This is the strongest form of finality, which ensures that once a block has been finalized, it is impossible to revoke it as long as the BFT assumption holds true (no more than 33% of the pledged share is malicious).Aptos provides irrevocable finality to ensure the highest level of security for users Safeguard. Once a transaction has been confirmed, it will not be revoked.

Delay based on transaction type

In most of the blockchains evaluated in the benchmarking, an indication of all transaction-related latency is provided by the end-to-end latency observed for currency transfer transactions. In essence, currency transfer transactions experience the same path as any other typical transaction and receive no prioritization. However, the Sui blockchain is an exception in this regard, as Sui employs a "fast path" that is specialized for a limited type of transaction (e.g., a currency transfer transaction), which applies to approximately 201 TP3T of Sui's transactions, while the remaining 801 TP3T follow the regular consensus path.

Sub-second latency: the instantaneous trading speed that Aptos can provide

L2 Promise: But where is the finality?

Some L2 solutions are built to address the scalability issues of L1 blockchains like Ether. Popular L2s like Arbitrum, Optimism, Base, and Polygon aim to speed up transactions on Ether and reduce costs. However, they rely on submitting transaction proofs to Ether for finality, which can take hours or even days.

In our benchmarking, we only considered the end-to-end latency of L2, which is different from the L1 end-to-end latency that has finality. The actual Rollup process from L2 to Ether can take hours, followed by a 7-day challenge period on Ether. This means that on these L2 chains, it can take up to a week to achieve irrevocable finality on a transaction.

The future of blockchain must be faster

Our breakthrough in achieving sub-second end-to-end latency on Aptos marks an important milestone in the development of blockchain technology. With this level of speed and efficiency, the promise of blockchain applications can finally realize its full potential to bring the next billion users to Web3. Furthermore, as we continue to innovate and push the boundaries, it is clear that we have only begun the journey to even faster blockchain solutions.

All of the above content is reproduced from the Internet, does not represent the position of AptosNews, is not investment advice, investment risk, the market need to be cautious, such as infringement, please contact the administrator to delete.

Like (0)
Donate WeChat Sweep WeChat Sweep Alipay Sweep Alipay Sweep
Previous May 10, 2024 at 12:16 pm
Next May 16, 2024 at 5:07 pm

Related posts

Leave a Reply

Please Login to Comment
WeChat Sweep
Baidu Sweep

Subscribe to AptosNews

Subscribe to AptosNews to stay on top of Aptos.


This will close in 0 seconds

This site has no investment advice, investment risk, the market needs to be cautious.