链
开发者
生态
Staking
Earn BNB and rewards effortlessly
Tokenization Solutions
Get Your Business Into Web3
社区
This is a community post written by the Ankr team and published on Binance.org Blog.
BNB Chain began life as a fork of go-ethereum. The aim was to bring interoperability and programmability alongside compatibility with existing Ethereum Smart Contracts. The increasing success of BNB Chain has led to significant scalability issues that trace back to its origins as a fork of Geth.
One of the key issues for running a BNB Chain Archive Node has been demands on local storage. Archive Nodes can store approximately 17TB of data.
This cumbersome storage size requires significantly more time to index or compact the data, and reduces the performance of the Geth client when requesting data. Geth (Go Ethereum) is a command-line interface used to operate in conjunction with the EVM – the Ethereum Virtual Machine.
EVM compatibility is one of the major benefits of the BNB Chain as it supports the extensive existing Ethereum tooling, block time speeds, and low costs. We need to create a more efficient storage mechanism to keep the BNB Chain operating at peak performance levels while ensuring Geth is running smoothly.
Erigon originally started as turbo-geth and an improvement of Geth. However, it soon evolved into a very different product to Geth hence the new name.
Ankr is implementing an Erigon BNB Chain version based on https://github.com/ledgerwatch/erigon to solve the existing problems in the BNB Chain. The new version will be open-source and available to all. Implementation of the Erigon client aims to improve efficiency in data storage and increase blockchain performance in several key ways:
The improvements in the Erigon client have significant benefits over Geth and other existing ethereum clients. Specifically:
This solution is mutually beneficial for BNB Chain and Ankr. Creating Erigon as open-source means that BNB Chain node operators can freely use it and be able to contribute their computing power to the Ankr Protocol and multi-chain RPC network. With an incredibly fast and reliable network of BNB Chain nodes, Ankr will be better able to serve the blockchain and dApp developers that depend on the protocol to communicate with the BNB Chain.
Erigon is an amazing solution for the above reasons. However, it is not fully compatible with BNB Chain since the BNB Chain has a unique way of handling consensus and block processing. For that reason, Ankr has been working with the BNB Chain team to merge Erigon capabilities to the BNB Chain and resolve some key migration challenges. A key priority has been to ensure compatibility with all nodes throughout the migration from BNB Chain Geth to Erigon,
Features that were migrated from BNB Chain node:
In the first release of Erigon for BNB Chain, we decided not to enable Validator Mode and instead let it work just as a full blockchain node. Currently, Erigon doesn’t support accounting to avoid creating disruptions to the Erigon node. We will support this function correctly with the Erigon team.
The first milestone will be to ensure that the Erigon solution works without errors in implementation with BNB Chain full nodes (both Mainnet and Testnet).
Once full node capabilities are complete, we will verify that Erigon is compatible with the BNB Chain validator nodes.
Erigon’s Improvements on BNB Chain
Upon benchmark testing, the Erigon BNB Chain version performed remarkably well. Here is a brief overview of our process.
We deliberately used a below-average server from Digital Ocean to show the excellent performance of Erigon for BNB Chain. The server used included:
The Testnet synchronization process started on December 6 at 21:34:41 and lasted to the latest height at December 7, 22:54:31. Completed on block 14778509.
The entire process took 25 hours and 10 minutes. However, Erigon for BNB Chain is using only one processor from the CPU, which leaves a lot of room for future improvement. Having only 1 CPU makes it very challenging to speed up because blocks & transactions executions are inherently consecutive, not parallel. At Ankr, our preliminary estimate of this code refractory could be approximately 4-5 times faster than it is now although it is very challenging to implement. But again, this is much better than the current Go-Ethereum based clients already.
The Ankr team used ethspam and versus to test the performance of the Erigon client. Conducting tests with 100, 200, 300 concurrent requests, respectively, we encountered unquestionably outperforming results with 0% error. We compared this to an identical server using the Geth Goreli testnet with 100 requests, and the test encountered 6.75% connection errors.
Erigon with 100 concurrent requests
Erigon with 200 concurrent requests
Erigon with 300 concurrent requests
GETH Goreli testnet with 100 concurrent requests
We choose a Digital Ocean server with the exact same specifications for similar benchmark testing. The results show much worse performance (in terms of tp95 tp99) with 6.75% connection errors.
There are even more opportunities for improvement that Ankr can follow now. And we will be in conversations with the BNB Chain team to coordinate and plan our efforts. However, here are some potential priorities:
Follow our GitHub to learn more about Erigon and follow future test results.
Ankr has a close relationship with the BNB Chain ecosystem, and we are proud to announce this new project that will benefit the BNB Chain community and applications.
Ankr offers a further boost to BNB Chain developer capabilities with our bscrpc.com public RPC. This open access, free RPC allows anyone to make request calls to the chain and receive responses exactly as if they were running a BNB Chain full node themselves.
“The BNB Chain is seeing an all-time high in transactions as emerging markets heavily adopt it for DeFi, NFT’s, and gaming. The low gas fees and EVM compatibility make it a favorite. However, this comes at a cost: nodes are struggling to keep up. With Ankr open-sourcing our custom implementation of Erigon, we can help node providers keep at block height, ensuring the BNB Chain community keeps thriving.” – Josh Neuroth, Ankr’s Head of Product
“We are proud that BNB Chain is reaching lofty goals as an open protocol and community-driven ecosystem.” – Samy, BNB Chain’s Ecosystem Coordinator
BNB Chain Core team remark: We believe that all participants in the BNB Chain ecosystem will greatly benefit from these network upgrades. This is the evolution of BNB Chain to become faster and more efficient, enabling it to handle the ever-growing demand and staggering number of transactions. BNB Chain continues its journey towards mass crypto adoption and it will continue to evolve whenever new challenges arise.
Follow us to stay updated on everything BNB Chain!