Skip to content

Commit

Permalink
chore: delete default snapshot url for bitcoind docker-compose (#3442)
Browse files Browse the repository at this point in the history
* Delete default snapshot url for bitcoind docker-compose

- Delete default snapshot URL for bitcoind docker-compose

* Remove docker-compose, make commands and docs for launching BTC full nodes

* retrieve filter-missed-btc debug make target

---------

Co-authored-by: Julian Rubino <julian@zetachain.com>
  • Loading branch information
julianrubino and Julian Rubino authored Jan 30, 2025
1 parent 5181e25 commit 1ac6f71
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 91 deletions.
28 changes: 6 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GOFLAGS := ""
GOPATH ?= '$(HOME)/go'

# common goreaser command definition
GOLANG_CROSS_VERSION ?= v1.23.3@sha256:380420abb74844aaebca5bf9e2d00b1d7c78f59ce9e6d47cdb3276281702ca23
GOLANG_CROSS_VERSION ?= v1.22.7@sha256:24b2d75007f0ec8e35d01f3a8efa40c197235b200a1a91422d78b851f67ecce4
GORELEASER := $(DOCKER) run \
--rm \
--privileged \
Expand Down Expand Up @@ -170,7 +170,7 @@ fmt:
### Generation commands ###
###############################################################################

protoVer=0.14.0
protoVer=0.13.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --user $(shell id -u):$(shell id -g) $(protoImageName)

Expand Down Expand Up @@ -290,7 +290,7 @@ start-e2e-consensus-test: e2e-images
@echo "--> Starting e2e consensus test"
export ZETACORE1_IMAGE=ghcr.io/zeta-chain/zetanode:develop && \
export ZETACORE1_PLATFORM=linux/amd64 && \
cd contrib/localnet/ && $(DOCKER_COMPOSE) up -d
cd contrib/localnet/ && $(DOCKER_COMPOSE) up -d

start-stress-test: e2e-images
@echo "--> Starting stress test"
Expand Down Expand Up @@ -327,7 +327,7 @@ ifdef UPGRADE_TEST_FROM_SOURCE
zetanode-upgrade: e2e-images
@echo "Building zetanode-upgrade from source"
$(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime-source \
--build-arg OLD_VERSION='release/v26' \
--build-arg OLD_VERSION='release/v25' \
--build-arg NODE_VERSION=$(NODE_VERSION) \
--build-arg NODE_COMMIT=$(NODE_COMMIT)
.
Expand All @@ -336,7 +336,7 @@ else
zetanode-upgrade: e2e-images
@echo "Building zetanode-upgrade from binaries"
$(DOCKER) build -t zetanode:old -f Dockerfile-localnet --target old-runtime \
--build-arg OLD_VERSION='https://github.com/zeta-chain/node/releases/download/v26.0.0' \
--build-arg OLD_VERSION='https://github.com/zeta-chain/node/releases/download/v25.0.0' \
--build-arg NODE_VERSION=$(NODE_VERSION) \
--build-arg NODE_COMMIT=$(NODE_COMMIT) \
.
Expand Down Expand Up @@ -409,7 +409,7 @@ test-sim-fullappsimulation:
$(call run-sim-test,"TestFullAppSimulation",TestFullAppSimulation,100,200,30m)

test-sim-import-export:
$(call run-sim-test,"test-import-export",TestAppImportExport,100,200,30m)
$(call run-sim-test,"test-import-export",TestAppImportExport,50,100,30m)

test-sim-after-import:
$(call run-sim-test,"test-sim-after-import",TestAppSimulationAfterImport,100,200,30m)
Expand All @@ -430,12 +430,6 @@ test-sim-after-import-long: runsim
@echo "Running application simulation-after-import. This may take several minute"
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 500 50 TestAppSimulationAfterImport

# Use to run all simulation tests quickly (for example, before a creating a PR)
test-sim-quick:
$(call run-sim-test,"test-full-app-sim",TestFullAppSimulation,10,20,30m)
$(call run-sim-test,"test-import-export",TestAppImportExport,10,20,30m)
$(call run-sim-test,"test-sim-after-import",TestAppSimulationAfterImport,10,20,30m)

.PHONY: \
test-sim-nondeterminism \
test-sim-fullappsimulation \
Expand Down Expand Up @@ -468,16 +462,6 @@ release:
### Local Mainnet Development ###
###############################################################################

#BTC
start-bitcoin-node-mainnet:
cd contrib/rpc/bitcoind-mainnet && DOCKER_TAG=$(DOCKER_TAG) docker-compose up

stop-bitcoin-node-mainnet:
cd contrib/rpc/bitcoind-mainnet && DOCKER_TAG=$(DOCKER_TAG) docker-compose down

clean-bitcoin-node-mainnet:
cd contrib/rpc/bitcoind-mainnet && DOCKER_TAG=$(DOCKER_TAG) docker-compose down -v

#ETHEREUM
start-eth-node-mainnet:
cd contrib/rpc/ethereum && DOCKER_TAG=$(DOCKER_TAG) docker-compose up
Expand Down
4 changes: 2 additions & 2 deletions cmd/zetae2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contracts:
```

### Bitcoin setup
Interaction with the Bitcoin node will require setting up a specific node tracking the address. It can be set locally following the guide [Using Bitcoin Docker Image for Local Development](https://www.notion.so/Using-Bitcoin-Docker-Image-for-Local-Development-bf7e84c58f22431fb52f17a471997e1f?pvs=21)
Interaction with the Bitcoin node will require setting up a specific node tracking the address.

If an error occurs mention that wallets are not loaded, this command can be run to set it up:

Expand Down Expand Up @@ -171,4 +171,4 @@ contracts:
uniswap_router
```

### TODO: message passing
### TODO: message passing
23 changes: 0 additions & 23 deletions contrib/rpc/bitcoind-mainnet/docker-compose.yml

This file was deleted.

47 changes: 3 additions & 44 deletions docs/development/DEPLOY_NODES.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
## Full Deployment Guide for Zetacored and Bitcoin Nodes
## Full Deployment Guide for Zetacored

This guide details deploying Zetacored nodes on both ZetaChain mainnet and Athens3 (testnet), alongside setting up a Bitcoin node for mainnet. The setup utilizes Docker Compose with environment variables for a streamlined deployment process.
This guide details deploying Zetacored nodes on both ZetaChain mainnet and Athens3 (testnet). The setup utilizes Docker Compose with environment variables for a streamlined deployment process.

Here's a comprehensive documentation using markdown tables to cover all the `make` commands for managing Zetacored and Bitcoin nodes, including where to modify the environment variables in Docker Compose configurations.
Here's a comprehensive documentation using markdown tables to cover all the `make` commands for managing Zetacored, including where to modify the environment variables in Docker Compose configurations.

### Zetacored / BTC Node Deployment and Management

#### Commands Overview for Zetacored

| Environment | Action | Command | Docker Compose Location |
|-------------------------------------|-----------------------------|---------------------------------------------------------------|------------------------------------------|
| **Mainnet** | Start Bitcoin Node | `make start-bitcoin-node-mainnet` | `contrib/rpc/bitcoind-mainnet` |
| **Mainnet** | Stop Bitcoin Node | `make stop-bitcoin-node-mainnet` | `contrib/rpc/bitcoind-mainnet` |
| **Mainnet** | Clean Bitcoin Node Data | `make clean-bitcoin-node-mainnet` | `contrib/rpc/bitcoind-mainnet` |
| **Mainnet** | Start Ethereum Node | `make start-eth-node-mainnet` | `contrib/rpc/ethereum` |
| **Mainnet** | Stop Ethereum Node | `make stop-eth-node-mainnet` | `contrib/rpc/ethereum` |
| **Mainnet** | Clean Ethereum Node Data | `make clean-eth-node-mainnet` | `contrib/rpc/ethereum` |
Expand All @@ -28,41 +25,3 @@ Here's a comprehensive documentation using markdown tables to cover all the `mak
| **Testnet Local Build (Athens3)** | Start Zetacored Node | `make start-zetacored-rpc-testnet-localbuild` | `contrib/rpc/zetacored` |
| **Testnet Local Build (Athens3)** | Stop Zetacored Node | `make stop-zetacored-rpc-testnet-localbuild` | `contrib/rpc/zetacored` |
| **Testnet Local Build (Athens3)** | Clean Zetacored Node Data | `make clean-zetacored-rpc-testnet-localbuild` | `contrib/rpc/zetacored` |


### Bitcoin Node Setup for Mainnet

#### Commands Overview for Bitcoin

| Action | Command | Docker Compose Location |
|--------|---------|-------------------------|
| Start Node | `make start-mainnet-bitcoind-node DOCKER_TAG=36-mainnet` | `contrib/mainnet/bitcoind` |
| Stop Node | `make stop-mainnet-bitcoind-node` | `contrib/mainnet/bitcoind` |
| Clean Node Data | `make clean-mainnet-bitcoind-node` | `contrib/mainnet/bitcoind` |

### Configuration Options

#### Where to Modify Environment Variables

The environment variables for both Zetacored and Bitcoin nodes are defined in the `docker-compose.yml` files located in the respective directories mentioned above. These variables control various operational aspects like the sync type, networking details, and client behavior.

#### Example Environment Variables for Zetacored

| Variable | Description | Example |
|----------|-------------|---------|
| `DAEMON_HOME` | Daemon's home directory | `/root/.zetacored` |
| `NETWORK` | Network identifier | `mainnet`, `athens3` |
| `CHAIN_ID` | Chain ID for the network | `zetachain_7000-1`, `athens_7001-1` |
| `RESTORE_TYPE` | Node restoration method | `snapshot`, `statesync` |
| `SNAPSHOT_API` | API URL for fetching snapshots | `https://snapshots.rpc.zetachain.com` |

#### Example Environment Variables for Bitcoin

| Variable | Description | Example |
|----------|-------------|---------|
| `bitcoin_username` | Username for Bitcoin RPC | `user` |
| `bitcoin_password` | Password for Bitcoin RPC | `pass` |
| `WALLET_NAME` | Name of the Bitcoin wallet | `tssMainnet` |
| `WALLET_ADDRESS` | Bitcoin wallet address for transactions | `bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y` |

This detailed tabulation ensures all necessary commands and configurations are neatly organized, providing clarity on where to manage the settings and how to execute different operations for Zetacored and Bitcoin nodes across different environments.

0 comments on commit 1ac6f71

Please sign in to comment.