diff --git a/Makefile b/Makefile index a2c6b1a..5bebc31 100644 --- a/Makefile +++ b/Makefile @@ -18,10 +18,10 @@ build: stop docker build --no-cache --tag single-node2 . --build-arg repo=$$REPO --build-arg commit_hash=$(shell bash -c 'read -p "Version or Commit Hash for 2nd node: " version; echo $$version') --build-arg extra_flags=$(shell bash -c 'read -p "Extra flags: " flags; echo $$flags') --build-arg USERNAME=$$USER; \ start: stop - docker-compose -f $(SINGLE_NODE_SETUP_FILE) up --build -d + docker compose -f $(SINGLE_NODE_SETUP_FILE) up --build -d stop: - docker-compose -f $(SINGLE_NODE_SETUP_FILE) down -v + docker compose -f $(SINGLE_NODE_SETUP_FILE) down -v ############################################################################### ### Localnet ### @@ -49,11 +49,11 @@ localnet-start: localnet-clean mkdir localnet/build; \ docker run --rm -v $(CURDIR)/localnet/build:/$$REPO:Z localnet/node "./"$$bin" testnet init-files --v 4 -o /"$$REPO" --keyring-backend=test --starting-ip-address 192.167.10.2 --chain-id "$$chainID""; \ CHAIN=$$REPO localnet/setup_genesis.sh; \ - docker-compose -f $(LOCALNET_SETUP_FILE) up -d; + docker compose -f $(LOCALNET_SETUP_FILE) up -d; # Stop testnet localnet-stop: - docker-compose -f $(LOCALNET_SETUP_FILE) down + docker compose -f $(LOCALNET_SETUP_FILE) down # Clean testnet localnet-clean: localnet-stop @@ -61,7 +61,7 @@ localnet-clean: localnet-stop # Reset testnet localnet-unsafe-reset: - docker-compose -f $(LOCALNET_SETUP_FILE) down + docker compose -f $(LOCALNET_SETUP_FILE) down ifeq ($(OS),Windows_NT) @docker run --rm -v $(CURDIR)\build\node0\evmosd:/evmos\Z localnet/node "./evmosd tendermint unsafe-reset-all --home=/evmos" @docker run --rm -v $(CURDIR)\build\node1\evmosd:/evmos\Z localnet/node "./evmosd tendermint unsafe-reset-all --home=/evmos" @@ -76,6 +76,6 @@ endif # Show stream of logs localnet-show-logstream: - docker-compose logs --tail=1000 -f + docker compose logs --tail=1000 -f .PHONY: localnet-build localnet-start localnet-stop diff --git a/localnet/docker-compose.yml b/localnet/docker-compose.yml index f7e6647..da3af3e 100644 --- a/localnet/docker-compose.yml +++ b/localnet/docker-compose.yml @@ -6,9 +6,7 @@ services: image: "localnet/node" volumes: - ./build/node0/evmosd:/evmos:Z - # TODO replace this line to "./build/node0/ethermintd:/ethermint:Z" when issue https://github.com/evmos/ethermint/issues/1579 is solved - # same applies to the other nodes - - ./build/node0/evmosd:/ethermint:Z + - ./build/node0/ethermintd:/ethermint:Z command: - ./multi-node-start.sh # Use the 'pruning' env variable to set custom pruning settings @@ -31,7 +29,7 @@ services: - "26659-26660:26656-26657" volumes: - ./build/node1/evmosd:/evmos:Z - - ./build/node1/evmosd:/ethermint:Z + - ./build/node1/ethermintd:/ethermint:Z command: - ./multi-node-start.sh networks: @@ -49,7 +47,7 @@ services: image: "localnet/node" volumes: - ./build/node2/evmosd:/evmos:Z - - ./build/node2/evmosd:/ethermint:Z + - ./build/node2/ethermintd:/ethermint:Z command: - ./multi-node-start.sh networks: @@ -67,7 +65,7 @@ services: image: "localnet/node" volumes: - ./build/node3/evmosd:/evmos:Z - - ./build/node3/evmosd:/ethermint:Z + - ./build/node3/ethermintd:/ethermint:Z command: - ./multi-node-start.sh networks: @@ -85,7 +83,7 @@ services: image: "localnet/node" volumes: - ./build/node4/evmosd:/evmos:Z - - ./build/node4/evmosd:/ethermint:Z + - ./build/node4/ethermintd:/ethermint:Z command: - ./multi-node-start.sh networks: @@ -145,7 +143,8 @@ services: ipv4_address: 192.167.10.9 tx-bot1: - image: evmos/tx-bot-dev + # TODO: replace with remote build + image: tx-bot-dev container_name: tx-bot1 build: context: ../. @@ -158,7 +157,8 @@ services: - API_URL=http://node4:1317 - LOG_LEVEL=info - NUMBER_OF_WORKERS=15 - - WORKER_TYPES=bank,delegate,gasConsumer,converter,ethSender + # TODO: determine worker types via chain config + - WORKER_TYPES=bank,delegate,gasConsumer,ethSender restart: always networks: localnet: diff --git a/localnet/setup_genesis.sh b/localnet/setup_genesis.sh index 0fffd32..427b1e8 100755 --- a/localnet/setup_genesis.sh +++ b/localnet/setup_genesis.sh @@ -18,8 +18,7 @@ MNEMONIC="stumble tilt business detect father ticket major inner awake jeans nam BUILD_DIR=$(pwd)/localnet/build # TODO uncomment this when issue https://github.com/evmos/ethermint/issues/1579 is solved -# DATA_DIR=$BUILD_DIR/node4/$CHAIND -DATA_DIR=$BUILD_DIR/node4/evmosd +DATA_DIR=$BUILD_DIR/node4/$CHAIND CONF_DIR=$DATA_DIR/config GENESIS=$CONF_DIR/genesis.json @@ -75,19 +74,16 @@ $CHAIND validate-genesis --home $DATA_DIR echo "- Distribute final genesis.json to all validators" for i in $(ls $BUILD_DIR | grep 'node');do # TODO uncomment this when issue https://github.com/evmos/ethermint/issues/1579 is solved - # cp $GENESIS $BUILD_DIR/$i/$CHAIND/config/genesis.json - cp $GENESIS $BUILD_DIR/$i/evmosd/config/genesis.json + cp $GENESIS $BUILD_DIR/$i/$CHAIND/config/genesis.json [ $? -eq 0 ] && echo "$i: genesis updated successfully" || echo "$i: genesis update failed" - cp $CONF_DIR/client.toml $BUILD_DIR/$i/evmosd/config/client.toml + cp $CONF_DIR/client.toml $BUILD_DIR/$i/$CHAIND/config/client.toml done echo "copy config.toml to get the seeds" # TODO uncomment this when issue https://github.com/evmos/ethermint/issues/1579 is solved -# cp $BUILD_DIR/node0/$CHAIND/config/config.toml $CONFIG -cp $BUILD_DIR/node0/evmosd/config/config.toml $CONFIG +cp $BUILD_DIR/node0/$CHAIND/config/config.toml $CONFIG sed -i.bak 's/moniker = \"node0\"/moniker = \"orchestrator\"/g' $CONFIG echo "copy app.toml to have same config on all nodes" # TODO uncomment this when issue https://github.com/evmos/ethermint/issues/1579 is solved -# cp $BUILD_DIR/node0/$CHAIND/config/config.toml $CONF_DIR/app.toml -cp $BUILD_DIR/node0/evmosd/config/app.toml $CONF_DIR/app.toml +cp $BUILD_DIR/node0/$CHAIND/config/app.toml $CONF_DIR/app.toml diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index 65966f8..a5b7acd 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -77,7 +77,7 @@ services: restart: always tx-bot1: - image: evmos/tx-bot-dev + image: tx-bot-dev build: context: ../. dockerfile: Dockerfile.bot @@ -90,11 +90,11 @@ services: - API_URL=http://single-node1:1317 - LOG_LEVEL=info - NUMBER_OF_WORKERS=15 - - WORKER_TYPES=bank,delegate,gasConsumer,converter,ethSender + - WORKER_TYPES=bank,delegate,gasConsumer,ethSender restart: always tx-bot2: - image: evmos/tx-bot-dev + image: tx-bot-dev build: context: ../. dockerfile: Dockerfile.bot @@ -107,7 +107,8 @@ services: - API_URL=http://single-node2:1317 - LOG_LEVEL=info - NUMBER_OF_WORKERS=15 - - WORKER_TYPES=bank,delegate,gasConsumer,converter,ethSender + # TODO: use chain to determine worker types + - WORKER_TYPES=bank,delegate,gasConsumer,ethSender restart: always cadvisor: