How Scalable is Ethereum?
In a Medium blog of his, Andre went ahead and scaled Ethereum up to 1.5 million TPS!
How Did He Do It?
He booted up a new EC2 medium from AWS, pulled the latest go-ethereum (Geth) repo, and built it. Following the build were certain tests to actually analyze how the system was performing under various conditions. Here are the tests which were performed:
Single node, self-mining, full mempool
This test is a centralized perfect condition test in which the tester controls the hardware, the mempool, and the mining. It excludes network broadcasting and uses Geth as an immutable centralized concatenated list. The test was performed on an increasing number of transactions and here are the results:
For 10 transactions
The amount of time taken to mine for 10 transactions was 2 seconds, which gives us 5 TPS.
For 1000 transactions – PoW difficulty
Interestingly, it only took 8 seconds, which gives us 125 TPS. Normal Ethereum doesn’t have a throughput this high, but Geth. The reason behind that is the fact that Ethereum core takes 13-15 seconds for mining a block. Hence the TPS of Ethereum core would always be its block capacity (mutable). In the setup used, the difficulty was just 1. Hence blocks could be mined as quickly as they were created.
For 10,000 transactions – mempool
It took just 1 second, which gives us 10k TPS with the out of the box Geth installation. All transactions were already in the mempool. If the CPU allowed for it, the number could have easily be taken up to 500k TPS.
For 100,000 transactions
Initially, native web3.js limited the speed to 500 TPS. Later, however, once transactions were in mempool, there were no issues faced and you could see 1000 and even 7000 TPS but the streaming limit still stayed 500 TPS. After working on the issue of slowness for a while, it was found that it was web3.js which was making things slow. So when it was bypassed, and internal API sendTransaction was used, the throughput increased to 15,000 TPS with 90,000 block sizes. Eventually, Andre managed to get 100k TPS!
For 1,000,000 transactions
Upon dropping PoW, and working on trusted nodes instead, Andre was able to get 1,500,000 transactions! But it came at the cost of losing out on decentralization. Since these were trusted nodes, there was no time spent between sealing and mining which saved the system a lot of time. This was the reason behind the extraordinary speeds achieved.
And that is just what Andre wanted to tell us. He wanted to tell us that making a blockchain project with over a million transactions per second isn’t difficult. The difficulty instead lies in making a blockchain project with over a million transactions per second while retaining a decentralized, trustless blockchain.
Projects which are termed as “Ethereum Killers” are making huge sacrifices like opening the blockchain to changes being made in order to achieve high TPS instead of making it immutable.