Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ###
Expand Down Expand Up @@ -49,19 +49,19 @@ 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
rm -rf localnet/build*

# 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"
Expand All @@ -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
18 changes: 9 additions & 9 deletions localnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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: ../.
Expand All @@ -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:
Expand Down
14 changes: 5 additions & 9 deletions localnet/setup_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove the comment

Suggested change
# 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
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit remove comment

Suggested change
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove comment

Suggested change
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit remove comment

Suggested change
# 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
9 changes: 5 additions & 4 deletions single-node/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ services:
restart: always

tx-bot1:
image: evmos/tx-bot-dev
image: tx-bot-dev
build:
context: ../.
dockerfile: Dockerfile.bot
Expand All @@ -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
Expand All @@ -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:
Expand Down