From 57090d1b456b0bd793a156484376ac9aebd55a67 Mon Sep 17 00:00:00 2001 From: amitz Date: Sun, 2 Jun 2024 16:31:12 +0300 Subject: [PATCH 01/30] test --- cmd/lavad/Dockerfile | 1 + cmd/lavap/Dockerfile | 1 + docker/docker-compose.state-sync.yml | 71 ++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 docker/docker-compose.state-sync.yml diff --git a/cmd/lavad/Dockerfile b/cmd/lavad/Dockerfile index 39efa9dbcd..3ebc399d08 100644 --- a/cmd/lavad/Dockerfile +++ b/cmd/lavad/Dockerfile @@ -50,6 +50,7 @@ EXPOSE 1317 EXPOSE 8080 # grpc EXPOSE 9090 +EXPOSE 9091 # tendermint p2p EXPOSE 26656 # tendermint rpc diff --git a/cmd/lavap/Dockerfile b/cmd/lavap/Dockerfile index 2df889dd10..fe49d3cac9 100644 --- a/cmd/lavap/Dockerfile +++ b/cmd/lavap/Dockerfile @@ -50,6 +50,7 @@ EXPOSE 1317 EXPOSE 8080 # grpc EXPOSE 9090 +EXPOSE 9091 # tendermint p2p EXPOSE 26656 # tendermint rpc diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml new file mode 100644 index 0000000000..bfd6d0e96a --- /dev/null +++ b/docker/docker-compose.state-sync.yml @@ -0,0 +1,71 @@ +version: '3.9' + +services: + + lava-node-init: + build: + context: .. + dockerfile: cmd/lavad/Dockerfile + command: > + config chain-id lava-testnet-2 && \ + lavad config keyring-backend test && \ + lavad init DOCKER_MONIKER --chain-id lava-testnet-2 + volumes: + - lava_data:/lava + + lava-node-init-2: + image: ghcr.io/tomwright/dasel:v2.7.0 + entrypoint: ["sh", "-c"] + environment: + - STATE_SYNC_RPC=https://lava-testnet.rpc.kjnodes.com:443 + - STATE_SYNC_PEER=d5519e378247dfb61dfe90652d1fe3e2b3005a5b@lava-testnet.rpc.kjnodes.com:14456 + command: > + " + apt-get -y update && apt-get install -y jq curl && + curl -Ls https://snapshots.kjnodes.com/lava-testnet/genesis.json > /lava/.lava/config/genesis.json && + curl -Ls https://snapshots.kjnodes.com/lava-testnet/addrbook.json > /lava/.lava/config/addrbook.json && + dasel put -f /lava/.lava/config/config.toml -t string -v 3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459 'p2p.seeds' && + dasel put -f /lava/.lava/config/app.toml -t string -v 0ulava 'minimum-gas-prices' && + dasel put -f /lava/.lava/config/app.toml -t string -v custom 'pruning' && + dasel put -f /lava/.lava/config/app.toml -t string -v 100 'pruning-keep-recent' && + dasel put -f /lava/.lava/config/app.toml -t string -v 0 'pruning-keep-every' && + dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && + + LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC/block | jq -r .result.block.header.height) && + SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - 1500)) && + SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && + + dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC,$$STATE_SYNC_RPC\" 'statesync.rpc_servers' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HEIGHT\" 'statesync.trust_height' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_PEER\" 'p2p.persistent_peers' + " + volumes: + - lava_data:/lava + depends_on: + lava-node-init: + condition: service_completed_successfully + + lava-node: + build: + context: .. + dockerfile: cmd/lavad/Dockerfile + command: ["start"] + ports: + - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_API:-1317}:1317' + - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_GRPC:-9090}:9090' + - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_GRPC_WEB:-9091}:9091' + - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_P2P:-26656}:26656' + - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_RPC:-26657}:26657' + volumes: + - lava_data:/lava + restart: on-failure + depends_on: + lava-node-init: + condition: service_completed_successfully + lava-node-init-2: + condition: service_completed_successfully + +volumes: + lava_data: \ No newline at end of file From 94c7618a173a9625a650a5d2ce08e3aef78bf7c1 Mon Sep 17 00:00:00 2001 From: amitz Date: Sun, 2 Jun 2024 16:33:05 +0300 Subject: [PATCH 02/30] lava-node-config --- docker/docker-compose.state-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index bfd6d0e96a..0bdc6c9e31 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -13,7 +13,7 @@ services: volumes: - lava_data:/lava - lava-node-init-2: + lava-node-config: image: ghcr.io/tomwright/dasel:v2.7.0 entrypoint: ["sh", "-c"] environment: @@ -64,7 +64,7 @@ services: depends_on: lava-node-init: condition: service_completed_successfully - lava-node-init-2: + lava-node-config: condition: service_completed_successfully volumes: From 25ac0e084916bea4e2a4a8ce2c71dc1bced3620f Mon Sep 17 00:00:00 2001 From: amitz Date: Sun, 2 Jun 2024 16:37:10 +0300 Subject: [PATCH 03/30] ip --- docker/docker-compose.state-sync.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 0bdc6c9e31..6fe32830f1 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -53,11 +53,11 @@ services: dockerfile: cmd/lavad/Dockerfile command: ["start"] ports: - - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_API:-1317}:1317' - - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_GRPC:-9090}:9090' - - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_GRPC_WEB:-9091}:9091' - - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_P2P:-26656}:26656' - - '${LAVA_LISTEN_IP:-0.0.0.0}:${LAVA_NODE_PORT_RPC:-26657}:26657' + - '${LAVA_NODE_PORT_API:-1317}:1317' + - '${LAVA_NODE_PORT_GRPC:-9090}:9090' + - '${LAVA_NODE_PORT_GRPC_WEB:-9091}:9091' + - '${LAVA_NODE_PORT_P2P:-26656}:26656' + - '${LAVA_NODE_PORT_RPC:-26657}:26657' volumes: - lava_data:/lava restart: on-failure From 732a01a2d70436f61734f3513cd475f1682e64b3 Mon Sep 17 00:00:00 2001 From: amitz Date: Sun, 2 Jun 2024 16:38:25 +0300 Subject: [PATCH 04/30] version --- docker/docker-compose.state-sync.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 6fe32830f1..acdb4ac278 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -1,4 +1,3 @@ -version: '3.9' services: @@ -60,7 +59,7 @@ services: - '${LAVA_NODE_PORT_RPC:-26657}:26657' volumes: - lava_data:/lava - restart: on-failure + restart: always depends_on: lava-node-init: condition: service_completed_successfully From 612a5e0b1e9f32874205d891e6f6f80c8cd2bfa0 Mon Sep 17 00:00:00 2001 From: amitz Date: Sun, 2 Jun 2024 18:35:39 +0300 Subject: [PATCH 05/30] id-token: write --- .github/workflows/lava.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lava.yml b/.github/workflows/lava.yml index df8d75ff69..a004b57786 100644 --- a/.github/workflows/lava.yml +++ b/.github/workflows/lava.yml @@ -382,8 +382,9 @@ jobs: build_docker: permissions: - contents: read + contents: write packages: write + id-token: write needs: [test-consensus, test-protocol] runs-on: ubuntu-latest strategy: From 88e6369f7388cb5fe848c22e781abede71d18b01 Mon Sep 17 00:00:00 2001 From: amitz Date: Sun, 2 Jun 2024 23:45:14 +0300 Subject: [PATCH 06/30] 2.0.0 --- docker/docker-compose.state-sync.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index acdb4ac278..845b13cc19 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -2,9 +2,7 @@ services: lava-node-init: - build: - context: .. - dockerfile: cmd/lavad/Dockerfile + image: ghcr.io/lavanet/lava/lavad:v2.0.0 command: > config chain-id lava-testnet-2 && \ lavad config keyring-backend test && \ @@ -47,9 +45,7 @@ services: condition: service_completed_successfully lava-node: - build: - context: .. - dockerfile: cmd/lavad/Dockerfile + image: ghcr.io/lavanet/lava/lavad:v2.0.0 command: ["start"] ports: - '${LAVA_NODE_PORT_API:-1317}:1317' From 3aeb8f6337e809c2c734d3cd7e4658e57b872c8f Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 11:21:47 +0300 Subject: [PATCH 07/30] env vars --- docker/docker-compose.state-sync.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 845b13cc19..53281b5f3c 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -3,10 +3,13 @@ services: lava-node-init: image: ghcr.io/lavanet/lava/lavad:v2.0.0 + environment: + - CHAIN_ID=lava-testnet-2 + - KEYRING_BACKEND=test command: > - config chain-id lava-testnet-2 && \ - lavad config keyring-backend test && \ - lavad init DOCKER_MONIKER --chain-id lava-testnet-2 + config chain-id $$CHAIN_ID && \ + lavad config keyring-backend $$KEYRING_BACKEND && \ + lavad init DOCKER_MONIKER --chain-id $$CHAIN_ID volumes: - lava_data:/lava @@ -16,12 +19,16 @@ services: environment: - STATE_SYNC_RPC=https://lava-testnet.rpc.kjnodes.com:443 - STATE_SYNC_PEER=d5519e378247dfb61dfe90652d1fe3e2b3005a5b@lava-testnet.rpc.kjnodes.com:14456 + - P2P_SEEDS=3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459 + - GENESIS_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/genesis.json + - ADDRBOOK_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/addrbook.json + - NUM_BLOCKS=150 command: > " apt-get -y update && apt-get install -y jq curl && - curl -Ls https://snapshots.kjnodes.com/lava-testnet/genesis.json > /lava/.lava/config/genesis.json && - curl -Ls https://snapshots.kjnodes.com/lava-testnet/addrbook.json > /lava/.lava/config/addrbook.json && - dasel put -f /lava/.lava/config/config.toml -t string -v 3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459 'p2p.seeds' && + curl -Ls $$GENESIS_ADDRESS > /lava/.lava/config/genesis.json && + curl -Ls $$ADDRBOOK_ADDRESS > /lava/.lava/config/addrbook.json && + dasel put -f /lava/.lava/config/config.toml -t string -v $$P2P_SEEDS 'p2p.seeds' && dasel put -f /lava/.lava/config/app.toml -t string -v 0ulava 'minimum-gas-prices' && dasel put -f /lava/.lava/config/app.toml -t string -v custom 'pruning' && dasel put -f /lava/.lava/config/app.toml -t string -v 100 'pruning-keep-recent' && @@ -29,7 +36,7 @@ services: dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC/block | jq -r .result.block.header.height) && - SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - 1500)) && + SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && From 1e94d24b46f36304a45a2663998e21152ec83c8e Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 11:37:24 +0300 Subject: [PATCH 08/30] rpc1,2,3 --- docker/docker-compose.state-sync.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 53281b5f3c..59c9906688 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -17,8 +17,9 @@ services: image: ghcr.io/tomwright/dasel:v2.7.0 entrypoint: ["sh", "-c"] environment: - - STATE_SYNC_RPC=https://lava-testnet.rpc.kjnodes.com:443 - - STATE_SYNC_PEER=d5519e378247dfb61dfe90652d1fe3e2b3005a5b@lava-testnet.rpc.kjnodes.com:14456 + - STATE_SYNC_RPC_1=https://lava-testnet.rpc.kjnodes.com:443 + - STATE_SYNC_RPC_2=https://lava-testnet-rpc.polkachu.com:443 + - STATE_SYNC_RPC_3=https://lava-testnet.rpc.nodex.one:443 - P2P_SEEDS=3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459 - GENESIS_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/genesis.json - ADDRBOOK_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/addrbook.json @@ -40,10 +41,9 @@ services: SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && - dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC,$$STATE_SYNC_RPC\" 'statesync.rpc_servers' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_2,$$STATE_SYNC_RPC_3\" 'statesync.rpc_servers' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HEIGHT\" 'statesync.trust_height' && - dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' && - dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_PEER\" 'p2p.persistent_peers' + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' " volumes: - lava_data:/lava From b0560461542fbfa714f13b6ccc654c43bec85e9d Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 11:43:13 +0300 Subject: [PATCH 09/30] STATE_SYNC_RPC_1 --- docker/docker-compose.state-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 59c9906688..c39d1475dc 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -34,9 +34,9 @@ services: dasel put -f /lava/.lava/config/app.toml -t string -v custom 'pruning' && dasel put -f /lava/.lava/config/app.toml -t string -v 100 'pruning-keep-recent' && dasel put -f /lava/.lava/config/app.toml -t string -v 0 'pruning-keep-every' && - dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && + dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' &&ß - LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC/block | jq -r .result.block.header.height) && + LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC_1/block | jq -r .result.block.header.height) && SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && From 81bd1062fa716792cc30e5ede3d0edaf3f807e06 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 11:45:12 +0300 Subject: [PATCH 10/30] STATE_SYNC_RPC_1 --- docker/docker-compose.state-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index c39d1475dc..2ef558e277 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -38,7 +38,7 @@ services: LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC_1/block | jq -r .result.block.header.height) && SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && - SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && + SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_2,$$STATE_SYNC_RPC_3\" 'statesync.rpc_servers' && From 2aea73aba530e6e9ea7fe035845adff1582d6970 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 11:51:09 +0300 Subject: [PATCH 11/30] 1500 --- docker/docker-compose.state-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 2ef558e277..c192c46352 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -23,7 +23,7 @@ services: - P2P_SEEDS=3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459 - GENESIS_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/genesis.json - ADDRBOOK_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/addrbook.json - - NUM_BLOCKS=150 + - NUM_BLOCKS=1500 command: > " apt-get -y update && apt-get install -y jq curl && @@ -41,7 +41,7 @@ services: SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && - dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_2,$$STATE_SYNC_RPC_3\" 'statesync.rpc_servers' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_1\" 'statesync.rpc_servers' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HEIGHT\" 'statesync.trust_height' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' " From e5f63dc0e7181e60940c1742fd1cac76732c3bac Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 11:54:30 +0300 Subject: [PATCH 12/30] s --- docker/docker-compose.state-sync.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index c192c46352..97a7a84b00 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -34,8 +34,7 @@ services: dasel put -f /lava/.lava/config/app.toml -t string -v custom 'pruning' && dasel put -f /lava/.lava/config/app.toml -t string -v 100 'pruning-keep-recent' && dasel put -f /lava/.lava/config/app.toml -t string -v 0 'pruning-keep-every' && - dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' &&ß - + dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC_1/block | jq -r .result.block.header.height) && SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && From 9b624ccf757e174b2e8ac0358c6e2623e9cda6b2 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 12:18:21 +0300 Subject: [PATCH 13/30] docker build args --- cmd/lavad/Dockerfile | 3 +++ cmd/lavap/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmd/lavad/Dockerfile b/cmd/lavad/Dockerfile index 3ebc399d08..7e4bfb69cc 100644 --- a/cmd/lavad/Dockerfile +++ b/cmd/lavad/Dockerfile @@ -21,6 +21,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ COPY . . +ARG GIT_VERSION +ARG GIT_COMMIT + RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ GOWORK=off go build \ diff --git a/cmd/lavap/Dockerfile b/cmd/lavap/Dockerfile index fe49d3cac9..3e87af4c9b 100644 --- a/cmd/lavap/Dockerfile +++ b/cmd/lavap/Dockerfile @@ -21,6 +21,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ COPY . . +ARG GIT_VERSION +ARG GIT_COMMIT + RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ GOWORK=off go build \ From 3acfb0e91932080d22d6a1d01e99dfbe3490e6fe Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 12:22:16 +0300 Subject: [PATCH 14/30] P2P --- docker/docker-compose.state-sync.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 97a7a84b00..25ee441711 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -20,7 +20,6 @@ services: - STATE_SYNC_RPC_1=https://lava-testnet.rpc.kjnodes.com:443 - STATE_SYNC_RPC_2=https://lava-testnet-rpc.polkachu.com:443 - STATE_SYNC_RPC_3=https://lava-testnet.rpc.nodex.one:443 - - P2P_SEEDS=3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459 - GENESIS_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/genesis.json - ADDRBOOK_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/addrbook.json - NUM_BLOCKS=1500 @@ -29,7 +28,6 @@ services: apt-get -y update && apt-get install -y jq curl && curl -Ls $$GENESIS_ADDRESS > /lava/.lava/config/genesis.json && curl -Ls $$ADDRBOOK_ADDRESS > /lava/.lava/config/addrbook.json && - dasel put -f /lava/.lava/config/config.toml -t string -v $$P2P_SEEDS 'p2p.seeds' && dasel put -f /lava/.lava/config/app.toml -t string -v 0ulava 'minimum-gas-prices' && dasel put -f /lava/.lava/config/app.toml -t string -v custom 'pruning' && dasel put -f /lava/.lava/config/app.toml -t string -v 100 'pruning-keep-recent' && From f8c1dfedb4d73fd4107e4f69e9628300f2a13ea1 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 12:29:31 +0300 Subject: [PATCH 15/30] container_name --- docker/docker-compose.state-sync.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 25ee441711..d06bfa0e51 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -50,6 +50,7 @@ services: lava-node: image: ghcr.io/lavanet/lava/lavad:v2.0.0 + container_name: lava-node command: ["start"] ports: - '${LAVA_NODE_PORT_API:-1317}:1317' From 09a71631cb25af3a0dccbae0afcfd0315ee28a1a Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 14:35:23 +0300 Subject: [PATCH 16/30] iprpc --- docker/docker-compose.state-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index d06bfa0e51..64ebb7d86d 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -38,7 +38,7 @@ services: SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && - dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_1\" 'statesync.rpc_servers' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_1\" 'statesync.rpc_servers' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HEIGHT\" 'statesync.trust_height' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' " From 57726c3203152465a908d53afcd0427fc4e64c5c Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 15:02:45 +0300 Subject: [PATCH 17/30] pi.enable --- docker/docker-compose.state-sync.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 64ebb7d86d..c3585d605d 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -33,6 +33,7 @@ services: dasel put -f /lava/.lava/config/app.toml -t string -v 100 'pruning-keep-recent' && dasel put -f /lava/.lava/config/app.toml -t string -v 0 'pruning-keep-every' && dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && + dasel put -f /lava/.lava/config/app.toml -t string -v true 'api.enable' && LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC_1/block | jq -r .result.block.header.height) && SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && From 552ddf8adb0b725d0d1fa21c37203b45779a9259 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 15:27:29 +0300 Subject: [PATCH 18/30] rpc.laddr --- docker/docker-compose.state-sync.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index c3585d605d..c1c4ef80af 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -34,6 +34,7 @@ services: dasel put -f /lava/.lava/config/app.toml -t string -v 0 'pruning-keep-every' && dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && dasel put -f /lava/.lava/config/app.toml -t string -v true 'api.enable' && + LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC_1/block | jq -r .result.block.header.height) && SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && @@ -41,7 +42,8 @@ services: dasel put -f /lava/.lava/config/config.toml -t string -v true 'statesync.enable' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$STATE_SYNC_RPC_1,$$STATE_SYNC_RPC_1\" 'statesync.rpc_servers' && dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HEIGHT\" 'statesync.trust_height' && - dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' + dasel put -f /lava/.lava/config/config.toml -t string -v \"$$SYNC_BLOCK_HASH\" 'statesync.trust_hash' && + dasel put -f /lava/.lava/config/config.toml -t string -v \"tcp://0.0.0.0:26657\" 'rpc.laddr' " volumes: - lava_data:/lava From 9b04e43783c3e0ca61f6c5819e3449b4e521c568 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:17:59 +0300 Subject: [PATCH 19/30] s --- docker/docker-compose.state-sync.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index c1c4ef80af..1d63a40721 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -34,7 +34,7 @@ services: dasel put -f /lava/.lava/config/app.toml -t string -v 0 'pruning-keep-every' && dasel put -f /lava/.lava/config/app.toml -t string -v 19 'pruning-interval' && dasel put -f /lava/.lava/config/app.toml -t string -v true 'api.enable' && - + LATEST_HEIGHT=$(curl -s $$STATE_SYNC_RPC_1/block | jq -r .result.block.header.height) && SYNC_BLOCK_HEIGHT=$(($$LATEST_HEIGHT - $$NUM_BLOCKS)) && SYNC_BLOCK_HASH=$(curl -s "$$STATE_SYNC_RPC_1/block?height=$$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && @@ -64,6 +64,12 @@ services: volumes: - lava_data:/lava restart: always + healthcheck: + test: lavad status || exit 1 + interval: 40s + timeout: 30s + retries: 3 + start_period: 60s depends_on: lava-node-init: condition: service_completed_successfully From 96f11fb0c06b7126c50eeba77533088ff4122fc9 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:22:02 +0300 Subject: [PATCH 20/30] health remove --- docker/docker-compose.state-sync.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 1d63a40721..a0485471ce 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -64,12 +64,6 @@ services: volumes: - lava_data:/lava restart: always - healthcheck: - test: lavad status || exit 1 - interval: 40s - timeout: 30s - retries: 3 - start_period: 60s depends_on: lava-node-init: condition: service_completed_successfully From 8f069867641b7e0d0ebaee5e7951578b0c4fe731 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:22:47 +0300 Subject: [PATCH 21/30] vars --- docker/docker-compose.state-sync.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index a0485471ce..5c8e5e2b15 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -16,10 +16,9 @@ services: lava-node-config: image: ghcr.io/tomwright/dasel:v2.7.0 entrypoint: ["sh", "-c"] + # Example variables for kjnodes nodes environment: - STATE_SYNC_RPC_1=https://lava-testnet.rpc.kjnodes.com:443 - - STATE_SYNC_RPC_2=https://lava-testnet-rpc.polkachu.com:443 - - STATE_SYNC_RPC_3=https://lava-testnet.rpc.nodex.one:443 - GENESIS_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/genesis.json - ADDRBOOK_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/addrbook.json - NUM_BLOCKS=1500 From 9db61c82f69ee9c366adab0311f5d4b292ab5dd5 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:25:24 +0300 Subject: [PATCH 22/30] MONIKER --- docker/docker-compose.state-sync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 5c8e5e2b15..6dc621ad39 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -6,10 +6,11 @@ services: environment: - CHAIN_ID=lava-testnet-2 - KEYRING_BACKEND=test + - MONIKER=DOCKER_COMPOSE_MONIKER command: > config chain-id $$CHAIN_ID && \ lavad config keyring-backend $$KEYRING_BACKEND && \ - lavad init DOCKER_MONIKER --chain-id $$CHAIN_ID + lavad init $$MONIKER --chain-id $$CHAIN_ID volumes: - lava_data:/lava From 88eed1d98a3c70a654a904a0025ef5ae426f57d4 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:26:27 +0300 Subject: [PATCH 23/30] comments --- docker/docker-compose.state-sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 6dc621ad39..3467df4d13 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -2,6 +2,7 @@ services: lava-node-init: + # Update with the most recent supported version of lavad image: ghcr.io/lavanet/lava/lavad:v2.0.0 environment: - CHAIN_ID=lava-testnet-2 @@ -52,6 +53,7 @@ services: condition: service_completed_successfully lava-node: + # Update with the most recent supported version of lavad image: ghcr.io/lavanet/lava/lavad:v2.0.0 container_name: lava-node command: ["start"] From ce559201258466ef06ab7e716840390d480effa5 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:34:13 +0300 Subject: [PATCH 24/30] docs --- README.md | 5 +++++ docker/README.md | 47 +---------------------------------------------- 2 files changed, 6 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 2703e2a779..206f675a1e 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ Lava is built using the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/) whic **Note**: Requires [Go 1.20.5](https://golang.org/dl/) +### Running Lava + +The best way to start working with lava is to use docker, for additional reading go to: +[Running via compose](docker/README.md) + ### Installing development dependencies before running the scripts make sure you have go installed and added to $PATH, you can validate by running `which go` diff --git a/docker/README.md b/docker/README.md index faba5bca55..65357b035e 100644 --- a/docker/README.md +++ b/docker/README.md @@ -49,49 +49,4 @@ runtime"). The default settings are usually suitable for all deployments. # to destroy the node: docker-compose --profile node --env-file env -f docker-compose.yml down - ``` - -**Run Lava Portal / Provider** - -This section is outdated and is temporarily removed. - - + ``` \ No newline at end of file From 30e40498041252b91558eed8d4a2f2539776908e Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:45:46 +0300 Subject: [PATCH 25/30] docs --- README.md | 2 +- docker/README.md | 20 +++++++++++++++++++- docker/docker-compose.state-sync.yml | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 206f675a1e..89e59964cb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Lava is built using the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/) whic **Note**: Requires [Go 1.20.5](https://golang.org/dl/) ### Running Lava - + The best way to start working with lava is to use docker, for additional reading go to: [Running via compose](docker/README.md) diff --git a/docker/README.md b/docker/README.md index 65357b035e..f35c8a8a78 100644 --- a/docker/README.md +++ b/docker/README.md @@ -49,4 +49,22 @@ runtime"). The default settings are usually suitable for all deployments. # to destroy the node: docker-compose --profile node --env-file env -f docker-compose.yml down - ``` \ No newline at end of file + ``` + +## Running node using state-sync with docker-compose + +From the root path run: +```sh +docker compose -f docker/docker-compose.state-sync.yml -d +``` + +To test the setup run: +```sh +curl -X POST -H "Content-Type: application/json" localhost:26657 --data '{"jsonrpc": "2.0", "id": 1, "method": "status", "params": []}' +``` +and expect to see the lastest block. + +You can run change the version of `lavad` using the `LAVAD_VERSION` var: +```sh +LAVAD_VERSION=v2.0.1 docker compose -f docker/docker-compose.state-sync.yml -d +``` \ No newline at end of file diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 3467df4d13..89d4e2fe6b 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -3,7 +3,7 @@ services: lava-node-init: # Update with the most recent supported version of lavad - image: ghcr.io/lavanet/lava/lavad:v2.0.0 + image: ghcr.io/lavanet/lava/lavad:${LAVAD_VERSION:-v2.0.0} environment: - CHAIN_ID=lava-testnet-2 - KEYRING_BACKEND=test @@ -54,7 +54,7 @@ services: lava-node: # Update with the most recent supported version of lavad - image: ghcr.io/lavanet/lava/lavad:v2.0.0 + image: ghcr.io/lavanet/lava/lavad:${LAVAD_VERSION:-v2.0.0} container_name: lava-node command: ["start"] ports: From 97a01cb7678263d993ecfe6072e1739b4644e1b8 Mon Sep 17 00:00:00 2001 From: Amit Zafran Date: Mon, 3 Jun 2024 16:54:18 +0300 Subject: [PATCH 26/30] table --- docker/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index f35c8a8a78..88876dd494 100644 --- a/docker/README.md +++ b/docker/README.md @@ -67,4 +67,16 @@ and expect to see the lastest block. You can run change the version of `lavad` using the `LAVAD_VERSION` var: ```sh LAVAD_VERSION=v2.0.1 docker compose -f docker/docker-compose.state-sync.yml -d -``` \ No newline at end of file +``` + +### Full configuration options: +|Name |Description +|----------------|------------------------------- +|LAVAD_VERSION | The Lavad version to use +|CHAIN_ID | The chain id +|KEYRING_BACKEND | The keyring backend +|MONIKER | The moniker for the `init` command +|STATE_SYNC_RPC_1| The RPC node to sync on +|GENESIS_ADDRESS | The `genesis.json` URL +|ADDRBOOK_ADDRESS| The `addrbook.json` URL +|NUM_BLOCKS | The number of blocks to sync on from behind the latest block \ No newline at end of file From 29a784b49597a57b7d27ea8370103f08e0b1eb0a Mon Sep 17 00:00:00 2001 From: amitz Date: Tue, 4 Jun 2024 15:41:00 +0300 Subject: [PATCH 27/30] docs and vars --- docker/README.md | 10 ++++++++-- docker/docker-compose.state-sync.yml | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docker/README.md b/docker/README.md index 88876dd494..4f193e5f46 100644 --- a/docker/README.md +++ b/docker/README.md @@ -55,7 +55,7 @@ runtime"). The default settings are usually suitable for all deployments. From the root path run: ```sh -docker compose -f docker/docker-compose.state-sync.yml -d +docker compose -f docker/docker-compose.state-sync.yml up -d ``` To test the setup run: @@ -79,4 +79,10 @@ LAVAD_VERSION=v2.0.1 docker compose -f docker/docker-compose.state-sync.yml -d |STATE_SYNC_RPC_1| The RPC node to sync on |GENESIS_ADDRESS | The `genesis.json` URL |ADDRBOOK_ADDRESS| The `addrbook.json` URL -|NUM_BLOCKS | The number of blocks to sync on from behind the latest block \ No newline at end of file +|NUM_BLOCKS | The number of blocks to sync on from behind the latest block + + +To clean the lava node setup including volumes run: +```sh +docker compose -f docker/docker-compose.state-sync.yml down -v +``` \ No newline at end of file diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 89d4e2fe6b..6bd0747fde 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -5,9 +5,9 @@ services: # Update with the most recent supported version of lavad image: ghcr.io/lavanet/lava/lavad:${LAVAD_VERSION:-v2.0.0} environment: - - CHAIN_ID=lava-testnet-2 - - KEYRING_BACKEND=test - - MONIKER=DOCKER_COMPOSE_MONIKER + - CHAIN_ID=${CHAIN_ID:-lava-testnet-2} + - KEYRING_BACKEND=${KEYRING_BACKEND:-test} + - MONIKER=${MONIKER:-DOCKER_COMPOSE_MONIKER} command: > config chain-id $$CHAIN_ID && \ lavad config keyring-backend $$KEYRING_BACKEND && \ From 6a2de06210c1a19d846ef5540c49b95ce2f77f8d Mon Sep 17 00:00:00 2001 From: amitz Date: Tue, 4 Jun 2024 15:46:36 +0300 Subject: [PATCH 28/30] defaults --- docker/docker-compose.state-sync.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 6bd0747fde..67340f8777 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -20,10 +20,10 @@ services: entrypoint: ["sh", "-c"] # Example variables for kjnodes nodes environment: - - STATE_SYNC_RPC_1=https://lava-testnet.rpc.kjnodes.com:443 - - GENESIS_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/genesis.json - - ADDRBOOK_ADDRESS=https://snapshots.kjnodes.com/lava-testnet/addrbook.json - - NUM_BLOCKS=1500 + - STATE_SYNC_RPC_1=${STATE_SYNC_RPC_1:-https://lava-testnet.rpc.kjnodes.com:443} + - GENESIS_ADDRESS=${GENESIS_ADDRESS:-https://snapshots.kjnodes.com/lava-testnet/genesis.json} + - ADDRBOOK_ADDRESS=${ADDRBOOK_ADDRESS:-https://snapshots.kjnodes.com/lava-testnet/addrbook.json} + - NUM_BLOCKS=${NUM_BLOCKS:-1500} command: > " apt-get -y update && apt-get install -y jq curl && From d72ab0873ccfa721b19f3472b785d56f052a2401 Mon Sep 17 00:00:00 2001 From: amitz Date: Tue, 4 Jun 2024 15:48:49 +0300 Subject: [PATCH 29/30] network --- docker/docker-compose.state-sync.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.state-sync.yml b/docker/docker-compose.state-sync.yml index 67340f8777..491ee546f9 100644 --- a/docker/docker-compose.state-sync.yml +++ b/docker/docker-compose.state-sync.yml @@ -14,7 +14,9 @@ services: lavad init $$MONIKER --chain-id $$CHAIN_ID volumes: - lava_data:/lava - + networks: + - lava_network + lava-node-config: image: ghcr.io/tomwright/dasel:v2.7.0 entrypoint: ["sh", "-c"] @@ -48,6 +50,8 @@ services: " volumes: - lava_data:/lava + networks: + - lava_network depends_on: lava-node-init: condition: service_completed_successfully @@ -65,6 +69,8 @@ services: - '${LAVA_NODE_PORT_RPC:-26657}:26657' volumes: - lava_data:/lava + networks: + - lava_network restart: always depends_on: lava-node-init: @@ -73,4 +79,7 @@ services: condition: service_completed_successfully volumes: - lava_data: \ No newline at end of file + lava_data: + +networks: + lava_network: \ No newline at end of file From 280fac266a670247165829ba1645af2966f34068 Mon Sep 17 00:00:00 2001 From: amitz Date: Tue, 4 Jun 2024 15:49:02 +0300 Subject: [PATCH 30/30] typo --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 4f193e5f46..ad16255dec 100644 --- a/docker/README.md +++ b/docker/README.md @@ -66,7 +66,7 @@ and expect to see the lastest block. You can run change the version of `lavad` using the `LAVAD_VERSION` var: ```sh -LAVAD_VERSION=v2.0.1 docker compose -f docker/docker-compose.state-sync.yml -d +LAVAD_VERSION=v2.0.1 docker compose -f docker/docker-compose.state-sync.yml up -d ``` ### Full configuration options: