2

What’s the recommended approach for configuring a private ethereum network using Parity to achieve the highest possible transaction throughput? Which is theoretically around 1000 TPS.

Let’s say my use case involves only one organization (one authority) and i have a single ERC20 contract for token transfer.

I need answers for the following:

  1. Consensus/engine used
  2. Number of nodes
  3. Node/server specs
  4. Chain specs file
2

These are multiple factors that would come into play. I can't bet 1000 TPS, but definitely much higher throughput than average. I have achieved transactions in three digits by playing with these factors in a private network.

  1. Consensus/ Engine used- PoA will always beat PoW in your case.
  2. Number of Nodes the lower the better! The more the number of nodes you have, the more difficulty in reaching consensus (probabilistically speaking), but you also lose resilience in the network. What if the only node you have just crashed or someone turns it off? Based on your infrastructure 2-3 could be optimum.
  3. Node/ server specs Depends on the use case and volume. You mentioned transfer event based off of ERC20, but volume matters too (only in terms of storage and not RAM actually). Anything with 2GB RAM on a linux machine should be fine. I used t3.medium on AWS (with a storage of 40GB, but storage depends on your volume).

But above all, these are the main spices the recipe:

Block Size The higher the block size, the more transactions you can pack in a single block. Technically, you would increase the block size by increasing the gas limit in the configuration file.

Block Time The lower the block time, the quicker the blocks will get mined. But if it is too low and your network has many nodes, then there could increse chances of stale transactions. I have used 5 secs, and it works and should work in your case too.

-1
> Consensus/engine used
Will have no effect on speed
> Number of nodes
Will have no effect on speed
> Node/server specs
Configuration of the node will not affect much its speed, though higher cache limit will make it faster
> Chain specs file
Will have no effect on speed

To increase the TPS you need to do this:

  1. Set Block Limit to its maximum. Currently miners are voting on Block Limit, so the theoretical speed of 800 TPS on Ethereum Main Net can't be reached because of that.

  2. Use better hardware on all nodes that are mining. This includes network and the machine itself. So you can theoretically achieve 2,000 or more TPS if you use twice as fast hardware. Put the SSD disks in RAID 0 and get the doble in speed increase.

The bottleneck in Ethereum is the State Trie and the EVM. To speed up State Trie access get faster SSDs and large amount of RAM to cache disk blocks. To speed up the EVM get faster RAM and and CPUs.

If you won't create many accounts and many contracts on your private net, it will be very fast, much faster than 1,000 TPS. Ethereum is slow because it has around 40 million accounts, and its State Trie has around 300 milion nodes. Getting the balance of 1 account takes 10 to 20 milliseconds because it has to do dozens of lookups to disk at random location. If you don't have that many accounts, just increasing RAM size of your nodes will make Linux cache all the blocks and processing time will be very fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.