Chaosnet is a Docker-based local multi-service environment for Nibiru development.
It can run:
- one or two validator nodes (
nibiru-0,nibiru-1) - Hermes IBC relayer services (with
ibcprofile) - Heart Monitor stack (Postgres, indexer, GraphQL with
heartmonitorprofile)
- Install and start Docker.
- Install command
make. - (Optional) Authenticate to
ghcr.ioif you use theheartmonitorprofile:
docker login ghcr.ioFrom the repository root:
make chaosnetOther profiles:
- command
make chaosnet-ibc: starts two validators plus Hermes relayer - command
make chaosnet-heartmonitor: starts validator plus Heart Monitor stack
To force rebuilding images:
make chaosnet-buildTo stop and clean volumes:
make chaosnet-downmake chaosnet-logs
make chaosnet-ssh-nibiru-0
make chaosnet-ssh-nibiru-1These Make targets are defined in file contrib/make/chaosnet.mk.
http://localhost:26657- Tendermint RPCtcp://localhost:9090- Cosmos SDK gRPChttp://localhost:1317- Cosmos SDK LCD (REST)
http://localhost:36657- Tendermint RPCtcp://localhost:19090- Cosmos SDK gRPChttp://localhost:11317- Cosmos SDK LCD (REST)
http://localhost:5555- Heart Monitor GraphQL (heartmonitorprofile)http://localhost:3000andhttp://localhost:3001- Hermes ports (ibcprofile)
The following examples assume make chaosnet-ibc is running.
- Enter
nibiru-0:
docker compose -f ./contrib/docker-compose/docker-compose-chaosnet.yml exec -it nibiru-0 /bin/sh- Send an IBC transfer to
nibiru-1:
nibid tx ibc-transfer transfer transfer \
channel-0 \
nibi18mxturdh0mjw032c3zslgkw63cukkl4q5skk8g \
1000000unibi \
--from validator \
--fees 5000unibi \
--yes | jq- In another shell, enter
nibiru-1and query balances:
docker compose -f ./contrib/docker-compose/docker-compose-chaosnet.yml exec -it nibiru-1 /bin/sh
nibid config node "http://localhost:36657"
nibid q bank balances "$(nibid keys show validator -a)" | jqGoal: use controller chain nibiru-0 to drive an ICA on host chain nibiru-1.
- On
nibiru-0, register an ICA:
FROM=nibi1zaavvzxez0elundtn32qnk9lkm8kmcsz44g7xl
nibid tx interchain-accounts controller register \
connection-0 \
--from "$FROM" \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 0.025unibi \
--yes- Query the ICA address:
nibid q interchain-accounts controller interchain-account \
nibi1zaavvzxez0elundtn32qnk9lkm8kmcsz44g7xl \
connection-0 | jq- Fund the ICA from
nibiru-1and verify:
nibid tx bank send \
nibi18mxturdh0mjw032c3zslgkw63cukkl4q5skk8g \
<ica-address> \
1000000unibi \
--yes | jq
nibid q bank balances <ica-address> | jq- Create and send an ICA packet from
nibiru-0to delegate onnibiru-1:
nibid tx interchain-accounts host generate-packet-data "<msg-json>" --encoding proto3 | jq
nibid tx interchain-accounts controller send-tx connection-0 packet.json --from "$FROM" --yes | jq- Verify delegation on
nibiru-1:
nibid q staking delegations <ica-address> | jqUse Docker version 23.0.1 or newer.
No. Command make chaosnet-down removes Chaosnet volumes so each fresh start begins from a clean state.
The first run builds/pulls images and creates IBC channels. Check logs with command make chaosnet-logs if startup stalls.