This is a script that generates transactions according to given operations and given a TPS (transactions per second) rate. It reports the status to a given address in the daemon mode or the standard output in the oneshot mode.
It was mainly created to test longevity stand for Iroha 2.
- Rust 1.60.0 (Installation guide)
- Edit
config.jsondepending on your setup - Network should be started and have committed a genesis block
- Have the Iroha repository locally.
Clone this repository
git clone https://github.com/soramitsu/iroha2-longevity-load-rs-
Build from sources
cargo build
-
Or build using Docker
docker build .
In the project folder:
Get help how to use the CLI app:
./iroha2-longevity-load-rs --helpRun as a server in the background and it executes given operation
./iroha2-longevity-load-rs daemon --operation RegisterAccountTo run multiple operations simultaneously, you should use several --operation flags
./iroha2-longevity-load-rs daemon \
--operation RegisterAccount \
--operation RegisterDomainTo get the status (port 8084 by default), use CURL
curl 127.0.0.1:8084Run a single operation in the foreground and wait for the result that will be printed to stdout
./iroha2-longevity-load-rs oneshot --operation RegisterAccountHere is a list of operations you can use
RegisterAccount- it registers a new account.RegisterDomain- it registers a new domain.RegisterAssetQuantity- it registers a new quantity asset with a random mintable mode.RegisterAssetBigQuantity- it registers a new big quantity asset with a random mintable mode.RegisterAssetFixed- it registers a new fixed asset with a random mintable mode.RegisterAssetStore- it registers a new store asset with metadata containing a random value.TransferAsset- it registers two accounts with assets and transfers one (TODO: make this randomly generated) value between them.MintAsset- it registers a new asset and a new account that owns this asset, and then mints one (TODO: make this randomly generated) asset.