Skip to main content

How to run the loadbot for stress testing your network


This how-to assumes that:

  • You have a working polygon-sdk network up and running (using IBFT or dev)
  • Both your JSON-RPC and gRPC endpoints are reachable
  • For each of the accounts you use, its private key must be saved as an environment variable with the following format:

e.g. to export the variable :

export PSDK_0x9876e8b849437703A34808e926a8a5B48bCb3ccf=07eb13980486964e7e6f1172e0ed65a18117a74ac49503d2878b980ae224e90a

Start the loadbot

Feel free to take a look at the flag reference here.

As an example, here is a valid command you can use to run the loadbot using two premined accounts and an IBFT setup:

go run main.go loadbot  --url --grpc --account 0xE696952149F3e17A3F2EcD4672207CcF7Df00096 --account 0x9876e8b849437703A34808e926a8a5B48bCb3ccf --count 10 --value 0x100 --tps 100

You should get a result similar to this on your terminal :

Transactions submitted = 10
Transactions failed = 0
Duration = 10.035877088s