Use config/

This commit is contained in:
Thomas E Lackey 2022-10-14 13:48:54 -05:00
parent d537538943
commit 2bd5c729dc
3 changed files with 26 additions and 17 deletions

View File

@ -3,9 +3,10 @@ version: '3.7'
services: services:
fixturenet-eth-bootnode-geth: fixturenet-eth-bootnode-geth:
hostname: fixturenet-eth-bootnode-geth hostname: fixturenet-eth-bootnode-geth
env_file:
- ../config/fixturenet-eth/fixturenet-eth.env
environment: environment:
RUN_BOOTNODE: "true" RUN_BOOTNODE: "true"
NETWORK_ID: "1212"
image: cerc/fixturenet-eth-geth:local image: cerc/fixturenet-eth-geth:local
networks: networks:
fixturenet-eth-net: fixturenet-eth-net:
@ -13,12 +14,8 @@ services:
fixturenet-eth-geth-1: fixturenet-eth-geth-1:
hostname: fixturenet-eth-geth-1 hostname: fixturenet-eth-geth-1
environment: env_file:
NETWORK_ID: "1212" - ../config/fixturenet-eth/fixturenet-eth.env
ACCOUNT_PASSWORD: "secret1212"
ETHERBASE: "0xe6CE22afe802CAf5fF7d3845cec8c736ecc8d61F"
ENODE: "enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@fixturenet-eth-bootnode-geth:30303"
JWT: "0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"
image: cerc/fixturenet-eth-geth:local image: cerc/fixturenet-eth-geth:local
depends_on: depends_on:
- fixturenet-eth-bootnode-geth - fixturenet-eth-bootnode-geth
@ -29,12 +26,8 @@ services:
fixturenet-eth-geth-2: fixturenet-eth-geth-2:
hostname: fixturenet-eth-geth-2 hostname: fixturenet-eth-geth-2
environment: env_file:
NETWORK_ID: "1212" - ../config/fixturenet-eth/fixturenet-eth.env
ACCOUNT_PASSWORD: "secret1212"
ETHERBASE: "0xe6CE22afe802CAf5fF7d3845cec8c736ecc8d61F"
ENODE: "enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@fixturenet-eth-bootnode-geth:30303"
JWT: "0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"
image: cerc/fixturenet-eth-geth:local image: cerc/fixturenet-eth-geth:local
depends_on: depends_on:
- fixturenet-eth-bootnode-geth - fixturenet-eth-bootnode-geth
@ -52,9 +45,10 @@ services:
fixturenet-eth-lighthouse-1: fixturenet-eth-lighthouse-1:
hostname: fixturenet-eth-lighthouse-1 hostname: fixturenet-eth-lighthouse-1
env_file:
- ../config/fixturenet-eth/fixturenet-eth.env
environment: environment:
NODE_NUMBER: "1" NODE_NUMBER: "1"
JWT: "0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545" ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
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
@ -68,9 +62,10 @@ services:
fixturenet-eth-lighthouse-2: fixturenet-eth-lighthouse-2:
hostname: fixturenet-eth-lighthouse-2 hostname: fixturenet-eth-lighthouse-2
env_file:
- ../config/fixturenet-eth/fixturenet-eth.env
environment: environment:
NODE_NUMBER: "2" NODE_NUMBER: "2"
JWT: "0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545" ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551" EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
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"

View File

@ -0,0 +1,11 @@
# The password used to access test accounts (eg, via personal_unlockAccount). The password is the same for all accounts.
ACCOUNT_PASSWORD=secret1212
# ENODE of the geth bootnode.
ENODE="enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@fixturenet-eth-bootnode-geth:30303"
# JWT shared by geth and lighthouse for authentication.
JWT="0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"
# Should match the definition of fixturenet-eth-net.
NETRESTRICT="172.16.254.0/28"

View File

@ -1,12 +1,15 @@
#!/bin/bash #!/bin/bash
ETHERBASE=`cat /opt/testnet/accounts/accounts.csv | head -1 | cut -d',' -f2`
NETWORK_ID=`cat /opt/testnet/el/el-config.yaml | grep 'chain_id' | awk '{ print $2 }'`
if [ "true" == "$RUN_BOOTNODE" ]; then if [ "true" == "$RUN_BOOTNODE" ]; then
geth \ geth \
--nodekeyhex="b0ac22adcad37213c7c565810a50f1772291e7b0ce53fb73e7ec2a3c75bc13b5" \ --nodekeyhex="b0ac22adcad37213c7c565810a50f1772291e7b0ce53fb73e7ec2a3c75bc13b5" \
--nodiscover \ --nodiscover \
--ipcdisable \ --ipcdisable \
--networkid=${NETWORK_ID} \ --networkid=${NETWORK_ID} \
--netrestrict="172.16.254.0/28" 2>&1 | tee /var/log/geth_bootnode.log --netrestrict="${NETRESTRICT}" 2>&1 | tee /var/log/geth_bootnode.log
else else
cd /opt/testnet/accounts cd /opt/testnet/accounts
./import_keys.sh ./import_keys.sh
@ -25,7 +28,7 @@ else
--authrpc.vhosts="*" \ --authrpc.vhosts="*" \
--authrpc.jwtsecret="/opt/testnet/build/el/jwtsecret" \ --authrpc.jwtsecret="/opt/testnet/build/el/jwtsecret" \
--networkid=${NETWORK_ID} \ --networkid=${NETWORK_ID} \
--netrestrict="172.16.254.0/28" \ --netrestrict="${NETRESTRICT}" \
--syncmode=full \ --syncmode=full \
--mine \ --mine \
--miner.threads=1 \ --miner.threads=1 \