Integrate ipld-eth-beacon-indexer working with the fixturenet. (#36)
* Use explicit image hash, not latest tag. * Better syntax * No latest * Add fixturenet setup for beacon indexer. * Don't wait for merge. * Don't wait for merge.
This commit is contained in:
parent
5edfe5c0b8
commit
863548530a
@ -14,6 +14,12 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
image: cerc/fixturenet-eth-geth:local
|
image: cerc/fixturenet-eth-geth:local
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
depends_on:
|
depends_on:
|
||||||
- fixturenet-eth-bootnode-geth
|
- fixturenet-eth-bootnode-geth
|
||||||
ports:
|
ports:
|
||||||
@ -24,6 +30,12 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
CERC_RUN_STATEDIFF: "true"
|
CERC_RUN_STATEDIFF: "true"
|
||||||
CERC_STATEDIFF_DB_NODE_ID: 2
|
CERC_STATEDIFF_DB_NODE_ID: 2
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
image: cerc/fixturenet-eth-geth:local
|
image: cerc/fixturenet-eth-geth:local
|
||||||
@ -39,6 +51,12 @@ services:
|
|||||||
|
|
||||||
fixturenet-eth-lighthouse-1:
|
fixturenet-eth-lighthouse-1:
|
||||||
hostname: fixturenet-eth-lighthouse-1
|
hostname: fixturenet-eth-lighthouse-1
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
environment:
|
environment:
|
||||||
@ -47,13 +65,21 @@ services:
|
|||||||
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
||||||
image: cerc/fixturenet-eth-lighthouse:local
|
image: cerc/fixturenet-eth-lighthouse:local
|
||||||
depends_on:
|
depends_on:
|
||||||
- fixturenet-eth-bootnode-lighthouse
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
- fixturenet-eth-geth-1
|
condition: service_started
|
||||||
|
fixturenet-eth-geth-1:
|
||||||
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "8001"
|
- "8001"
|
||||||
|
|
||||||
fixturenet-eth-lighthouse-2:
|
fixturenet-eth-lighthouse-2:
|
||||||
hostname: fixturenet-eth-lighthouse-2
|
hostname: fixturenet-eth-lighthouse-2
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
environment:
|
environment:
|
||||||
@ -63,5 +89,7 @@ services:
|
|||||||
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
||||||
image: cerc/fixturenet-eth-lighthouse:local
|
image: cerc/fixturenet-eth-lighthouse:local
|
||||||
depends_on:
|
depends_on:
|
||||||
- fixturenet-eth-bootnode-lighthouse
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
- fixturenet-eth-geth-2
|
condition: service_started
|
||||||
|
fixturenet-eth-geth-2:
|
||||||
|
condition: service_healthy
|
||||||
|
@ -7,11 +7,11 @@ services:
|
|||||||
POSTGRES_USER: vdbm
|
POSTGRES_USER: vdbm
|
||||||
POSTGRES_DB: cerc_testing
|
POSTGRES_DB: cerc_testing
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
volumes:
|
healthcheck:
|
||||||
- vdb_db_eth-beacon_db:/var/lib/postgresql/data
|
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8076:5432"
|
- "127.0.0.1:8076:5432"
|
||||||
command: ["postgres", "-c", "log_statement=all"]
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
vdb_db_eth-beacon_db:
|
|
||||||
|
@ -3,12 +3,10 @@ services:
|
|||||||
ipld-eth-beacon-indexer:
|
ipld-eth-beacon-indexer:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipld-eth-beacon-db
|
ipld-eth-beacon-db:
|
||||||
- lighthouse
|
condition: service_healthy
|
||||||
|
fixturenet-eth-lighthouse-1:
|
||||||
|
condition: service_healthy
|
||||||
image: cerc/ipld-eth-beacon-indexer:local
|
image: cerc/ipld-eth-beacon-indexer:local
|
||||||
volumes:
|
env_file:
|
||||||
- type: bind
|
- ../config/ipld-eth-beacon-indexer/indexer.env
|
||||||
source: ${eth_beacon_config_file}
|
|
||||||
target: /root/ipld-eth-beacon-config.json
|
|
||||||
environment:
|
|
||||||
CAPTURE_MODE: ${eth_beacon_capture_mode}
|
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
version: "3.2"
|
|
||||||
services:
|
|
||||||
lighthouse:
|
|
||||||
restart: always
|
|
||||||
image: cerc/lighthouse:local
|
|
||||||
environment:
|
|
||||||
- NETWORK=mainnet
|
|
||||||
volumes:
|
|
||||||
- lighthouse_db:/root/.lighthouse
|
|
||||||
ports:
|
|
||||||
- 127.0.0.1:5052:5052
|
|
||||||
- 9000:9000/udp
|
|
||||||
- 9000:9000/tcp
|
|
||||||
command: ["tail", "-f", "/dev/null"]
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
lighthouse_db:
|
|
31
config/ipld-eth-beacon-indexer/indexer.env
Normal file
31
config/ipld-eth-beacon-indexer/indexer.env
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Match compose/docker-compose-ipld-eth-beacon-db.yml
|
||||||
|
POSTGRES_HOST=ipld-eth-beacon-db
|
||||||
|
POSTGRES_PORT=5432
|
||||||
|
POSTGRES_DB=cerc_testing
|
||||||
|
POSTGRES_USER=vdbm
|
||||||
|
POSTGRES_PASSWORD=password
|
||||||
|
|
||||||
|
# Match compose/docker-compose-fixturenet-eth.yml
|
||||||
|
LIGHTHOUSE_HOST=fixturenet-eth-lighthouse-1
|
||||||
|
LIGHTHOUSE_PORT=8001
|
||||||
|
LIGHTHOUSE_PROTOCOL=http
|
||||||
|
|
||||||
|
CAPTURE_MODE=head
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
|
BC_MAX_HISTORIC_PROCESS_WORKER=2
|
||||||
|
BC_UNIQUE_NODE_IDENTIFIER=1001
|
||||||
|
BC_CHECK_DB=true
|
||||||
|
BC_BEACON_STATE_PROCESSING_ENABLED=false
|
||||||
|
BC_BEACON_BLOCK_PROCESSING_ENABLED=true
|
||||||
|
BC_MINIMUM_SLOT=0
|
||||||
|
|
||||||
|
KG_INCREMENT=10000
|
||||||
|
KG_PROCESS_KNOWN_GAPS_ENABLED=true
|
||||||
|
KG_MAX_KNOWN_GAPS_WORKER=2
|
||||||
|
KG_MINIMUM_SLOT=0
|
||||||
|
|
||||||
|
# Match compose/docker-compose-prometheus-grafana.yml
|
||||||
|
PROM_HOST=prometheus
|
||||||
|
PROM_PORT=9000
|
||||||
|
PROM_METRICS_ENABLED=false
|
10
container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/ready.sh
Executable file
10
container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/ready.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LIGHTHOUSE_BASE_URL=http://localhost:8001
|
||||||
|
|
||||||
|
result=`wget --no-check-certificate --quiet -O - "$LIGHTHOUSE_BASE_URL/eth/v2/beacon/blocks/head" | jq -r '.data.message.body.execution_payload.block_number'`
|
||||||
|
if [ ! -z "$result" ] && [ $result -gt 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
@ -32,8 +32,8 @@ else
|
|||||||
sleep 5
|
sleep 5
|
||||||
result=`wget --no-check-certificate --quiet -O - --timeout=0 $LIGHTHOUSE_GENESIS_STATE_URL | jq -r '.data.genesis_time'`
|
result=`wget --no-check-certificate --quiet -O - --timeout=0 $LIGHTHOUSE_GENESIS_STATE_URL | jq -r '.data.genesis_time'`
|
||||||
if [ ! -z "$result" ]; then
|
if [ ! -z "$result" ]; then
|
||||||
./reset_genesis_time.sh $result
|
./reset_genesis_time.sh $result
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -44,8 +44,8 @@ else
|
|||||||
sleep 5
|
sleep 5
|
||||||
result=`wget --no-check-certificate --quiet -O - --timeout=0 $ENR_URL`
|
result=`wget --no-check-certificate --quiet -O - --timeout=0 $ENR_URL`
|
||||||
if [ ! -z "$result" ]; then
|
if [ ! -z "$result" ]; then
|
||||||
export ENR="$result"
|
export ENR="$result"
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user