From 384ca94fd6727068073528a72c70c39c8799e4ca Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Fri, 14 Apr 2023 19:19:20 +0530 Subject: [PATCH] Mount parent datadir for lighthouse nodes --- app/data/compose/docker-compose-fixturenet-eth.yml | 12 ++++++------ .../genesis/cl/bootnode.sh | 1 + .../genesis/cl/reset_genesis_time.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/data/compose/docker-compose-fixturenet-eth.yml b/app/data/compose/docker-compose-fixturenet-eth.yml index 940c1a8e..2024cacb 100644 --- a/app/data/compose/docker-compose-fixturenet-eth.yml +++ b/app/data/compose/docker-compose-fixturenet-eth.yml @@ -9,7 +9,7 @@ services: RUN_BOOTNODE: "true" image: cerc/fixturenet-eth-geth:local volumes: - - bootnode_geth_data:/root/ethdata + - fixturenet_eth_bootnode_geth_data:/root/ethdata ports: - "9898" - "30303" @@ -64,7 +64,7 @@ services: RUN_BOOTNODE: "true" image: cerc/fixturenet-eth-lighthouse:local volumes: - - fixturenet_eth_bootnode_data:/opt/testnet/build/cl/bootnode + - fixturenet_eth_bootnode_lighthouse_data:/opt/testnet/build/cl fixturenet-eth-lighthouse-1: hostname: fixturenet-eth-lighthouse-1 @@ -82,7 +82,7 @@ services: EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551" image: cerc/fixturenet-eth-lighthouse:local volumes: - - fixturenet_eth_lighthouse_1_data:/opt/testnet/build/cl/node_1 + - fixturenet_eth_lighthouse_1_data:/opt/testnet/build/cl depends_on: fixturenet-eth-bootnode-lighthouse: condition: service_started @@ -108,7 +108,7 @@ services: LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0" image: cerc/fixturenet-eth-lighthouse:local volumes: - - fixturenet_eth_lighthouse_2_data:/opt/testnet/build/cl/node_2 + - fixturenet_eth_lighthouse_2_data:/opt/testnet/build/cl depends_on: fixturenet-eth-bootnode-lighthouse: condition: service_started @@ -117,9 +117,9 @@ services: volumes: fixturenet_geth_accounts: - bootnode_geth_data: + fixturenet_eth_bootnode_geth_data: fixturenet_eth_geth_1_data: fixturenet_eth_geth_2_data: - fixturenet_eth_bootnode_data: + fixturenet_eth_bootnode_lighthouse_data: fixturenet_eth_lighthouse_1_data: fixturenet_eth_lighthouse_2_data: diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/bootnode.sh b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/bootnode.sh index e6970650..7563371c 100755 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/bootnode.sh +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/bootnode.sh @@ -24,6 +24,7 @@ if [ ! -f "$DATADIR/bootnode/enr.dat" ]; then --output-dir $DATADIR/bootnode-temp # Output ENR to a temp dir and mv as "lcli generate-bootnode-enr" will not overwrite an empty dir (mounted volume) + mkdir -p $DATADIR/bootnode mv $DATADIR/bootnode-temp/* $DATADIR/bootnode rm -r $DATADIR/bootnode-temp diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/reset_genesis_time.sh b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/reset_genesis_time.sh index a8cc2e2b..f21a8ee0 100755 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/reset_genesis_time.sh +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/reset_genesis_time.sh @@ -16,4 +16,4 @@ lcli \ $TESTNET_DIR/genesis.ssz \ $NOW -echo "Reset genesis time to now ($NOW)" +echo "Reset genesis time to ($NOW)"