Blockchain engineer Patrick O’Grady from Ava Labs gave a rundown on the invalid minting bug that affected the smooth running of the Avalanche network last week. According to him, increased congestion on the network triggered a non-deterministic bug that affected the transaction system on the proof-of-stake blockchain. Even though funds of the network were not at risk, the mistake itself was a valuable lesson for the industry.
Heavy Load on Avalanche’s System Triggered Invalid Minting Bug
Avalanche has three default chains, C-chain for contracts, X-chain for asset transfers, and P-chain for staking and subnet management. The C-chain for contracts is part of the bug issue.
Heavy load on the system triggered a non-deterministic bug related to state verification. This resulted in some of the validators accepting some invalid mint transactions. Meanwhile, the rest of the network refused the invalid transactions while obstructing the C-chain.
Once the problem was identified, the code was quickly patched to apply the requisite checks in the future, without fund loss. The patched code was then distributed to the community and applied to the network. A solution was found through the incremental deployment of a patch.
The existing code and the deployed patch ensured all funds remained safe and permitted recovery of the system. The network is currently back to normal.
Avalanche Claims to Process 4,500 Transactions Per Second
At an initial glance, the easiest way to fix a problem might to rewrite the blockchain and undo accepted transactions. But due to the Avalanche network’s decentralized nature, such an approach was actually infeasible.
Instead, the best feasible fix was one that is incrementally deployable. The developers put together a patch that accepted all of the blocks that the network had accepted, and rolled the network forwards to the same set of common tips.
AVAX token is trading currently $37, down from $53 on Feb. 11 when the problem initially occurred. Launched on September 11, Avalanche claims it could process 4,500 transactions per second. It’s backed by prominent cryptocurrency firms including Mike Novogratz’s Galaxy Digital, Bitmain, and Initialized Capital.