GoChain/Ethereum blockchain load generator
Branch: master
Clone or download
Latest commit bb9a5ee Dec 4, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci ci var Sep 20, 2018
.gitignore ignore /tmp Apr 16, 2018
Dockerfile initial commit Apr 13, 2018
Gopkg.lock update dependencies Oct 17, 2018
LICENSE Create LICENSE Apr 13, 2018
Makefile add make release Apr 16, 2018
README.md Update README.md Jul 17, 2018
account.go create seeder accounts if none present Apr 28, 2018
backoff.go adjust timers; restore rounding May 3, 2018
dist.go support < 10 tps with batch buckets (#16) Dec 4, 2018
error.go initial commit Apr 13, 2018
main.go raise sender limit from 2x to 10x Dec 4, 2018
node.go update dependencies Sep 19, 2018
release.sh fix ci Sep 19, 2018
seeder.go seeds and refunds use suggested gas price; senders jitter +/-20% (#10) May 23, 2018
sender.go rate limit individual senders at 2x ideal May 29, 2018
state.go rename metrics Apr 13, 2018
stats.go vary tx rate (#15) Dec 4, 2018
version.go chainload: 0.0.31 release [skip ci] Dec 4, 2018




chainload is a GoChain/Ethereum blockchain load generator.

How to use

By default, simply executing chainload will fire 1 transaction per second at http://localhost:8545 with chain id 1234. Reports are logged every 30s, with pprof and other metrics available via expvar.

The target url(s), transaction rate, chain id, and more can be set via flags:

chainload --help

Usage of chainload:
  -amount uint
    	tx amount (approximate) (default 10)
  -cycle duration
    	how often to cycle a sender's account (default 5m0s)
  -dur duration
    	duration to run - omit for unlimited
  -gas uint
    	gas (approximate) (default 200000)
  -id uint
    	id (default 1234)
  -pass string
    	passphrase to unlock accounts (default "#go@chain42")
  -pprof string
    	pprof addr (default ":6060")
  -senders int
    	total number of concurrent senders/accounts - defaults to tps
  -tps int
    	transactions per second (default 1)
  -urls string
    	csv of urls (default "http://localhost:8545")
  -v	verbose logging


chainload -id 9876 -urls http://node1:8545,http://node2:8545 -tps 100 -senders 50 -dur 5m
chainload version
> chainload version: 0.0.18

How it works

Accounts are managed locally under keystore/. Pre-existing accounts are reused and new ones are created as necessary. One seeder goroutine is started per url to seed funds to senders, and to continually re-claim funds from other accounts. Senders goroutines continually send txs to a set of receivers, while periodically cycling out the sender and receiver addresses. The gas and amount of each transaction varies randomly from the suggested approximate values.


At high volume, the error Too many open files may occur. This system limit can be inspected via ulimit -n, and temporarily raised via ulimit -n <new limit>. It can be permanently set in /etc/security/limits.conf by adding a line like:

root             soft    nofile          100000