Skip to content

🔧 Stress Test Program for the Gravity DEX Testnet Competition

Notifications You must be signed in to change notification settings

b-harvest/cosmos-module-stress-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B-Harvest

Cosmos Module Stress Testing Program 🔧

Overview

This program performs stress testing for the Cosmos module. Support: Liquidity , IBC transfer

Note: Requires Go 1.15+

Version

Usage

Configuration

This stress testing program for the liquidity module requires a configuration file, config.toml in current working directory. An example of configuration file is available in example.toml and the config source code can be found in here.

Build

# Clone the project 
git clone https://github.com/b-harvest/cosmos-module-stress-test.git
cd liquidity-stress-test

# Build executable
make install

Setup local testnet

Just by running simple command make localnet, it bootstraps a single local testnet in your local computer and it automatically creates 4 genesis accounts with enough amounts of different types of coins. You can customize them in this script for your own usage.

# Run a single blockchain in your local computer 
make localnet

CLI Commands

$ tester -h

comos module stress testing program

Usage:
  tester [command]

Available Commands:
  create-all-pools create liquidity pools of every pair of coins exist in the network.
  deposit     deposit new coins to every existing pools.
  help        Help about any command
  swap        swap some coins from the exisiting pools.
  transfer    Transfer a fungible token through IBC.
  withdraw    withdraw coins from every existing pools.

Flags:
  -h, --help                help for tester
      --log-format string   logging format; must be either json or text; (default "text")
      --log-level string    logging level; (default "debug")

Test

localnet

# This command is useful for local testing.
tester ca

# tester deposit [pool-id] [deposit-coins] [round] [tx-num] [flags]
tester d 1 2000000uakt,2000000uatom 5 5

# tester withdraw [pool-id] [pool-coin] [round] [tx-num] [flags]
tester w 1 10pool94720F40B38D6DD93DCE184D264D4BE089EDF124A9C0658CDBED6CA18CF27752 5 5

# tester swap [pool-id] [offer-coin] [demand-coin-denom][round] [tx-num] [msg-num]
tester s 1 1000000uakt uatom 2 2 5

# tester transfer [src-port] [src-channel] [receiver] [amount] [round] [tx-num] [msg-num]
tester transfer transfer channel-0 cosmos18zh6zd2kwtekjeg0ns5xvn2x28hgj8n6gxhe8c 1stake 1 1 1

About

🔧 Stress Test Program for the Gravity DEX Testnet Competition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published