sentinel-tx-stress-test
In Sentinel Turing-3a, a stress test of the network and the readiness of validators to respond quickly to emerging problems was carried out. The essence of testing was to send many transactions with 0 fee from 50,000 wallets in multi-threaded mode
- Launching 3 Sentinel full nodes, launching REST servers over RPC
- Generation of private keys and addresses, followed by sending coins to all generated addresses
- Script for sending transactions in multithreaded mode
- the script can send batch transactions
- can send transactions to multiple REST servers
-
After starting and synchronizing the full Sentinel nodes, the REST servers were launched. There are methods required to send transactions
sentinel-hub-cli rest-server --laddr tcp://0.0.0.0:1318 --chain-id sentinel-turing-3a --trust-node true --max-open 15000
-
send_to_all.py
- generation of key pairs and batch sending coins to generated wallets -
tx_spam_rest.py
- multithreaded transaction sending from all addresses in the filekeypairs.txt
A brief description and instructions for launching here
A few tips to avoid getting into trouble:
- Keep RPC on localhost
- Set min fee in
~/.sentinel-hubd/config/app.toml
> 0
minimum-gas-prices ="0.0025tsent"
- for example - Set limitnofile to 15000-30000 in systemd unit file
/etc/systemd/system/sentinel.service
LimitNOFILE=30000
- Run unjail script. I wrote simple example - https://raw.githubusercontent.com/c29r3/cosmos-utils/main/unjail.sh
curl -s https://raw.githubusercontent.com/c29r3/cosmos-utils/main/unjail.sh > unjail.sh && chmod u+x unjail.sh
Then editunjail.sh
- specify your parameters in variables and run script via tmux
tmux new -s sentinel_unjail -d 'cat unjail.sh | bash'
Installation and launch
- Run command below
apt install -y python3-pip python3-virtualenv git; \
git clone https://github.com/c29r3/sentinel-tx-stress-test.git; \
cd sentinel-tx-stress-test; \
virtualenv venv && source venv/bin/activate && pip install --upgrade pip setuptools wheel; \
pip3 install -r requirements.txt
- Run REST server on your full node and specify the address in config.ini
sentinel-hub-cli rest-server --laddr tcp://0.0.0.0:1318 --chain-id sentinel-turing-3a --trust-node true --max-open 15000
- Run spam script
python3 tx_spam_rest.py
*This repository created for testing purposes only
*For generating wallets and sending transcations I used cosmospy