According to the BNB Chain Blog, opBNB, a layer 2 scaling solution for the BNB Chain, has successfully increased the block gas limit from 100M/s to 200M/s, doubling the throughput capacity to 10,000 transactions per second (TPS).
Performance Milestones
The significant performance milestone was achieved through a series of optimizations aimed at improving the efficiency and speed of transaction processing. These optimizations include improvements to network performance computing costs, distribution strategies, and block production processes.
Test environment and deployment
During the pressure testing phase, the opBNB team observed that direct connections required additional computing resources, which could affect transaction efficiency. To address this, we chose peer-to-peer (p2p) connections via proxy nodes to minimize resource waste and ensure that there were no bottlenecks in network connections.
In a test environment, the team simulated real mainnet data with 12,500,000 accounts, including 10,000 active accounts, to realistically evaluate the capabilities of opBNB.
Block production process
opBNB utilizes the OP stack and consists of two clients: RollupDriver (op-node) and EngineAPI (op-geth). RollupDriver manages the entire mining process, triggering EngineAPI to include Layer 2 (L2) transactions in blocks. The block production process includes several steps from the beginning of the process to the finalization of the block, ensuring efficient and stable transaction processing.
Optimization technology
Scheduling Optimization
The initial design placed a hard limit of 600ms on the block production and finalization process. To optimize performance, opBNB removed this hard limit, allowing more time for block production and transaction inclusion. This change significantly shortened the time required for kickoff and block production, improving overall efficiency.
Kickoff Optimization
By introducing a dedicated process to pre-fetch the Layer 1 (L1) state and store it in the cache, opBNB reduces the L1 state retrieval time from over 200ms to less than 10ms. This asynchronous mode of fetching the L1 state improves performance by eliminating the need for the sequencer to wait for the L1 endpoint.
Optimizing block production
Transaction execution during block production is optimized through caching and concurrency. Cached transaction execution results can be reused, reducing the number of steps required for block verification and commit. In addition, the block commit process is separated into concurrent steps, further improving throughput.
Hardware and Test Results
The tests were performed using AWS m6in 12X large with IO2 disk (6000 IOPS, 1500MB/s throughput). The opBNB technology stack included op-geth 0.4.3 and op-node 0.4.3. Depending on the optimization, the TPS of the transfer transaction is between 10,500 and 11,500, showing a significant performance improvement.
conclusion
Through continuous improvement and innovation, opBNB has successfully doubled its throughput capacity to 10,000 TPS by increasing the block gas limit to 200M/s. These improvements have made opBNB a high-performance environment suitable for demanding applications such as trading dApps and blockchain games.
Image source: Shutterstock