For legacy setup, with voting required and binary swaps, see ../singleval-vote
Allows to take a network state snapshot, devnetify to run it locally with multi validators (4), and perform an upgrade handler. This allows to test upgrade handler locally for both testnet and mainnet live state.
NOTE:
Docker images always have a version tag, you can build image locally and make a special version tag. Meanwhile, locally avaialable binaries (injectived), are not tagged, it uses whatever binary is available.
STEPS:
- Re-generate target validators dirs and keys using
make genif target version changes. Uses chain-stresser binary. - Download the latest mainnet state snapshot from Polkachu
data->injective-1/validators/0/datawasm->injective-1/validators/0/wasm
- Run
./injective-1/cli/devnetify-local.sh, wait for it to finish. Tip: setUPGRADE_HANDLER_VERSIONto trigger an upgrade handler for store migrations. - At this moment you have a single-validator state with 1 validator.
- Run network locally via
./injective-1/cli/injectived-local.sh. - Access the node using CLI via local binary
./injective-1/cli/injectived-cli-local.sh
Use this to debug any step of devnetify process. All endpoints are pointing to the first node inside compose.
Last proposal
http://localhost:10337/cosmos/gov/v1beta1/proposals?pagination.limit=1&pagination.reverse=trueVoting params
http://localhost:10337/cosmos/gov/v1/params/votingValidators set
http://localhost:10337/cosmos/staking/v1beta1/validatorsThere is a handy Makefile to automate the process.
Default environment values:
CHAIN_ID=1 # set the chain id
VERSION_TO=v1.16.4 # set the version to
DOCKER_IMAGE?=injectivelabs/injective-core:$(VERSION_TO)Targets:
make devnetify-local # devnetify the state using local bin
make devnetify # devnetify the state using tagged docker image
make injectived-local # run the node using local binary
make injectived # run the node using tagged docker image
make clean # clean up the data and wasm directories
make unpack # unpack the snapshot from the tar.lz4 fileThere is also a unpack target to unpack the snapshot from any *.tar.lz4 file. Just download the snapshot from Polkachu to the target chain dir and run make unpack. Use CHAIN_ID to set the valid chain dir prefix, e.g. CHAIN_ID=1 make unpack.