Table of Contents
Introduction
opBNB project aims to enhance the BNB Chain ecosystem in line with the strategic goals outlined in the BNB Chain 2024 outlook. This initiative focuses on two key improvements: enhanced network performance and accelerated transaction finality.
1. Enhanced Network Performance: opBNB is positioned as a high-capacity Layer 2 solution within the BNB ecosystem, with a gas limit of 100 million per second. This capacity is projected to support approximately 4600 transactions per second (TPS), a significant increase compared to Optimism on ETH, which operates with a 30M gas limit every 2 seconds, achieving a TPS of around 700.
2. Accelerated Transaction Finality: opBNB is dedicated to minimizing the confirmation and finalization time for transactions. This enhancement is especially vital for platforms that demand swift transaction confirmations, including high-frequency DeFi platforms and Web3 gaming applications.
High Capacity
opBNB demonstrates superior capacity compared to other Layer 2 solutions, providing 100 million gas per second. On the mainnet, opBNB achieved a record-breaking peak on December 17, 2023, when its daily transactions soared to 23 million. This milestone is attributed to its design principle of high capacity, enabling such significant transaction volumes.
Let’s examine the challenges opBNB has faced in implementing high capacity.
Parallel Pre-Fetch Logic of L1 Block Receipts
Challenge of bigger L1 block size
The production of opBNB Layer 2 blocks is intricately linked to the existing conditions on Layer 1 (BSC), requiring the acquisition of transaction receipts from L1. This task becomes increasingly demanding during times of heightened activity on the L1 network.
In contrast to Ethereum, BSC has a significantly higher block size capacity (140 million compared to Ethereum’s 30 million gas limit), enabling it to accommodate a greater number of transactions. This increased transaction throughput intensifies the workload for the L2 sequencer in collecting transaction receipts from L1. Given that BSC processes on average ten times more transactions per block than Ethereum, the task of aggregating L1 receipts for the sequencer becomes notably more challenging.
Challenge of 1 Second Block Time
The opBNB block time is only 1 second, necessitating the completion of the block creation and validation process—encompassing Block download, Block import, Block mining (execute, finalize, and commit), and Block broadcast—within this tight timeframe as shown in the diagram below. Given this rapid cycle, the actual time for block construction is significantly compressed, emphasizing the need for highly efficient and optimized operations.
Solution
opBNB has implemented a cutting-edge mechanism known as parallel prefetching of Layer 1 block receipts to enhance the speed of block construction. This mechanism operates through a dedicated background process that fetches L1 block receipts in a non-intrusive manner, simultaneously preparing receipts for several upcoming blocks.
These pre-fetched receipts are then stored in the Layer 1 Receipts cache within the sequencer. This innovative approach markedly improves the pre-fetching efficiency, ensuring the system remains robust and responsive, even when the performance of Layer 1 endpoints is less than ideal.
Fast transaction finality
opBNB Transaction Lifecycle
Transactions first fall into the “unsafe” category, where they’re in an L2 block but not yet sent to BSC Layer 1 (L1), meaning they lack full security guarantees. Then, they move to “soft confirmed,” showing that the L2 batch is on L1 but hasn’t fully completed, providing a moderate level of security.The process culminates in the “confirmed” or “finalized” status, achieved when the L1 block that includes the L2 batch submission is finalized on the BSC blockchain, thus extending the highest level of security and finality to the transactions within the batch.
opBNB Implementation of Fast Finality
The incorporation of opBNB into the BNB Chain ecosystem markedly enhances the speed at which transactions are finalized, utilizing reduced block intervals, optimized batching periods, and the naturally fast finality characteristic of BSC. On average, transactions transition from an “unsafe” status to a “soft confirmed” state, deemed sufficiently secure for the majority of applications, in under 10 seconds. Complete finalization of transactions occurs within approximately 20 seconds, significantly streamlining the overall process.
- Shorter block times (1s) enable quicker inclusion of transactions in blocks, thereby speeding up the initial step of transaction processing.
- opBNB has refined the submission process for L2 transaction batches, achieving greater frequency. A batch is submitted to L1 once it reaches the 128k BSC call data size or after a maximum of one minute, striking a balance between efficiency and cost. This streamlined approach minimizes the delay between L2 transaction aggregation and L1 submission, accelerating the finalization process. Particularly during periods of high activity on L2, transactions swiftly progress from “unsafe” to “safe” status, often in just a few seconds.
- Most critically, BSC’s design for fast finality ensures that once these batches are submitted to L1, they are rapidly confirmed(after 7-9 seconds) as final and irreversible, significantly reducing the potential for transaction reversals and enhancing the overall security and efficiency of cross-chain interactions.
Conclusion
The opBNB initiative strategically enhances the BNB Chain ecosystem by boosting network capacity to 100M gas per second, speeding up transaction finality, and ensuring stability during high traffic. This tackles execution bottlenecks and block-building pressures within a tight 1-second block time constraint. By implementing pre-fetching techniques for efficient L1 data handling, optimizing block building to maintain rapid pace, and leveraging BSC’s fast finality, opBNB skillfully balances the demands of capacity, speed, and stability. Furthermore, innovations such as minimizing L2 block reorganizations through confirmed L1 blocks and transaction pool optimizations, including a renouncing mechanism for unreceived transactions, significantly improve network robustness.
In 2024, opBNB will integrate advanced technical implementations like Parallel EVM Re-Architecture and PBSS (Path Based Storage Scheme), ensuring seamless L1-L2 interactions and setting a new efficiency and user experience standard in the blockchain space, in line with the BNB Chain 2024 roadmap objectives.