Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: added local development testing node sync docker compose #2070

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,15 @@ mainnet-zetarpc-node:
mainnet-bitcoind-node:
cd contrib/mainnet/bitcoind && DOCKER_TAG=$(DOCKER_TAG) docker-compose up

athens3-zetarpc-node:
testnet-zetarpc-node:
cd contrib/athens3/zetacored && DOCKER_TAG=$(DOCKER_TAG) docker-compose up

mainnet-zetarpc-node-local-dev:
cd contrib/mainnet/zetacored-localbuild && docker-compose up

testnet-zetarpc-node-local-dev:
cd contrib/athens3/zetacored-localbuild && docker-compose up

###############################################################################
### Debug Tools ###
###############################################################################
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@

### CI

* [2070](https://github.com/zeta-chain/node/pull/2070) - Added commands to build binaries from the working branch as a live full node rpc to test non-governance changes.
lumtis marked this conversation as resolved.
Show resolved Hide resolved
* [1958](https://github.com/zeta-chain/node/pull/1958) - Fix e2e advanced test debug checkbox.
* [1945](https://github.com/zeta-chain/node/pull/1945) - update advanced testing pipeline to not execute tests that weren't selected so they show skipped instead of skipping steps.
* [1940](https://github.com/zeta-chain/node/pull/1940) - adjust release pipeline to be created as pre-release instead of latest
Expand Down
42 changes: 42 additions & 0 deletions contrib/athens3/zetacored-localbuild/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: '3.8'
services:
zetachain_mainnet_rpc:
platform: linux/amd64
build:
context: ../../..
dockerfile: Dockerfile
environment:
DAEMON_HOME: "/root/.zetacored"
NETWORK: athens3
#RESTORE_TYPE=snapshot/snapshot-archive/statesync
gzukel marked this conversation as resolved.
Show resolved Hide resolved
RESTORE_TYPE: "snapshot"
SNAPSHOT_API: https://snapshots.zetachain.com
TRUST_HEIGHT_DIFFERENCE_STATE_SYNC: 40000
CHAIN_ID: "athens_7001-1"
VISOR_NAME: "cosmovisor"
DAEMON_NAME: "zetacored"
DAEMON_ALLOW_DOWNLOAD_BINARIES: "false"
DAEMON_RESTART_AFTER_UPGRADE: "true"
UNSAFE_SKIP_BACKUP: "true"
CLIENT_DAEMON_NAME: "zetaclientd"
CLIENT_DAEMON_ARGS: ""
CLIENT_SKIP_UPGRADE: "true"
CLIENT_START_PROCESS: "false"
gzukel marked this conversation as resolved.
Show resolved Hide resolved
MONIKER: athens3-local-rpc
RE_DO_START_SEQUENCE: "false"
IS_LOCAL_DEVELOPMENT: "true"
gzukel marked this conversation as resolved.
Show resolved Hide resolved
ports:
- "26656:26656"
- "1317:1317"
- "8545:8545"
- "8546:8546"
- "26657:26657"
- "9090:9090"
- "9091:9091"
volumes:
- zetacored_data_athens3:/root/.zetacored/
- ../../../contrib/docker-scripts/start.sh:/scripts/start.sh
entrypoint: bash /scripts/start.sh

volumes:
zetacored_data_athens3:
6 changes: 1 addition & 5 deletions contrib/athens3/zetacored/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ version: '3.8'
services:
zetachain_mainnet_rpc:
platform: linux/amd64
#This will build the binary from the GIT_REF you are locally on.
# build:
# context: ../../..
# dockerfile: Dockerfile
image: zetachain/zetacored:${DOCKER_TAG:-ubuntu-v14.0.1}
environment:
DAEMON_HOME: "/root/.zetacored"
Expand All @@ -26,6 +22,7 @@ services:
CLIENT_START_PROCESS: "false"
MONIKER: local-test
RE_DO_START_SEQUENCE: "false"
IS_LOCAL_DEVELOPMENT: "false"
ports:
- "26656:26656"
- "1317:1317"
Expand All @@ -37,6 +34,5 @@ services:
volumes:
- zetacored_data_athens3:/root/.zetacored/
entrypoint: bash /scripts/start.sh

volumes:
zetacored_data_athens3:
21 changes: 15 additions & 6 deletions contrib/docker-scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,21 @@ function move_zetacored_binaries {
}

function start_network {
${VISOR_NAME} version
${VISOR_NAME} run start --home ${DAEMON_HOME} \
--log_level info \
--moniker ${MONIKER} \
--rpc.laddr tcp://0.0.0.0:26657 \
--minimum-gas-prices 1.0azeta "--grpc.enable=true"
if [ "${IS_LOCAL_DEVELOPMENT}" == "true" ]; then
${DAEMON_NAME} version
${DAEMON_NAME} start --home ${DAEMON_HOME} \
--log_level info \
--moniker ${MONIKER} \
--rpc.laddr tcp://0.0.0.0:26657 \
--minimum-gas-prices 1.0azeta "--grpc.enable=true"
else
${VISOR_NAME} version
${VISOR_NAME} run start --home ${DAEMON_HOME} \
--log_level info \
--moniker ${MONIKER} \
--rpc.laddr tcp://0.0.0.0:26657 \
--minimum-gas-prices 1.0azeta "--grpc.enable=true"
fi
}

logt "Load Default Values for ENV Vars if not set."
Expand Down
44 changes: 44 additions & 0 deletions contrib/mainnet/zetacored-localbuild/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: '3.8'
services:
zetachain_mainnet_rpc:
platform: linux/amd64
build:
context: ../../..
dockerfile: Dockerfile
container_name: zetachain_mainnet_rpc
environment:
DAEMON_HOME: "/root/.zetacored"
NETWORK: mainnet
RESTORE_TYPE: "snapshot"
SNAPSHOT_API: https://snapshots.zetachain.com
TRUST_HEIGHT_DIFFERENCE_STATE_SYNC: 40000
CHAIN_ID: "zetachain_7000-1"
VISOR_NAME: "cosmovisor"
DAEMON_NAME: "zetacored"
DAEMON_ALLOW_DOWNLOAD_BINARIES: "false"
DAEMON_RESTART_AFTER_UPGRADE: "true"
UNSAFE_SKIP_BACKUP: "true"
CLIENT_DAEMON_NAME: "zetaclientd"
CLIENT_DAEMON_ARGS: ""
CLIENT_SKIP_UPGRADE: "true"
CLIENT_START_PROCESS: "false"
MONIKER: local-test
RE_DO_START_SEQUENCE: "false"
IS_LOCAL_DEVELOPMENT: "true"
ports:
- "26656:26656"
- "1317:1317"
- "8545:8545"
- "8546:8546"
- "26657:26657"
- "9090:9090"
- "9091:9091"
volumes:
- zetacored_data_mainnet:/root/.zetacored/
- ../../../contrib/docker-scripts/start.sh:/scripts/start.sh
entrypoint: bash /scripts/start.sh
#for debugging
gzukel marked this conversation as resolved.
Show resolved Hide resolved
#entrypoint: ["/bin/sh", "-c"]
#command: ["while true; do sleep 86400; done"]
volumes:
zetacored_data_mainnet:
10 changes: 2 additions & 8 deletions contrib/mainnet/zetacored/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ version: '3.8'
services:
zetachain_mainnet_rpc:
platform: linux/amd64
#This will build the binary from the GIT_REF you are locally on.
# build:
# context: ../../..
# dockerfile: Dockerfile
image: zetachain/zetacored:${DOCKER_TAG:-ubuntu-v14.0.1}
image: zetachain/zetacored:${DOCKER_TAG:-ubuntu-v14.0.1.1}
container_name: zetachain_mainnet_rpc
environment:
DAEMON_HOME: "/root/.zetacored"
Expand All @@ -27,6 +23,7 @@ services:
CLIENT_START_PROCESS: "false"
MONIKER: local-test
RE_DO_START_SEQUENCE: "false"
IS_LOCAL_DEVELOPMENT: "false"
ports:
- "26656:26656"
- "1317:1317"
Expand All @@ -38,8 +35,5 @@ services:
volumes:
- zetacored_data_mainnet:/root/.zetacored/
entrypoint: bash /scripts/start.sh
#for debugging
#entrypoint: ["/bin/sh", "-c"]
#command: ["while true; do sleep 86400; done"]
volumes:
zetacored_data_mainnet:
14 changes: 13 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,25 @@ This guide details deploying Zetacored nodes on both ZetaChain mainnet and Athen
```shell
make mainnet-zetarpc-node DOCKER_TAG=ubuntu-v14.0.1
```

**For MAinnet:**
- Use this command for Mainnet to build form the current branch your on and launch with that binary with current athens3 state. This is for testing non-governance upgrade changes locally against a full node.
```shell
make mainnet-zetarpc-node-local-dev
```

**For Athens3 (Testnet):**
- Similar command structure for Athens3, ensuring the correct Docker tag is used.
```shell
make testnet-zetarpc-node DOCKER_TAG=ubuntu-v14.0.1
```


**For Athens3 (Testnet) Local Development:**
- Use this command for Athens3 to build form the current branch your on and launch with that binary with current athens3 state. This is for testing non-governance upgrade changes locally against a full node.
```shell
make testnet-zetarpc-node-local-dev
```

#### Modifying the Sync Type

**To change the sync type for your node:**
Expand Down
Loading