updateValsetmethod at least once every Cosmos unbonding period (usually 2 weeks). This is because if there has not been an update for longer than the unbonding period, the validator set stored by the Ethereum contract could contain validators who cannot be slashed for misbehavior.
bash tests/all-up-test.sh VALSET_STRESS
bash tests/all-up-test.sh BATCH_STRESS
bash tests/all-up-test.sh VALIDATOR_OUT
HUSKY_SKIP_INSTALL=1 npm install, then
npm run typechain.
npm run evmin a separate terminal and then
npm run testto run tests.
npm run typechainto recompile contract typedefs.
docker exec -it gravity_test_instance /bin/bashshould allow you to access a shell inside the test container
./tests/build-container.shbuilds the base container and builds the Gravity test zone for the first time. This results in a Docker container which contains cached Go dependencies (the base container).
./tests/start-chains.shstarts a test container based on the base container and copies the current source code (including any changes you have made) into it. It then builds the Gravity test zone, benefiting from the cached Go dependencies. It then starts the Cosmos chain running on your new code. It also starts an Ethereum node. These nodes stay running in the terminal you started it in, and it can be useful to look at the logs. Be aware that this also mounts the Gravity repo folder into the container, meaning changes you make will be reflected there.
./tests/run-tests.shconnects to the running test container and runs the integration test found in
./tests/reload-code.shto recompile and restart the testnet without restarting the container.
./tests/start-chains.sh, then edit the code inside the container, restart the testnet with
./tests/reload-code.sh, and run the tests with
./tests/reload-code.sh 1. Now kill the node with
pkill gravityd. Start the debugger from within VS Code, and you will have a 1 node debuggable testnet.