do the thing
This commit is contained in:
@@ -2,6 +2,8 @@ services:
|
||||
|
||||
berachain-bepolia:
|
||||
image: ghcr.io/paradigmxyz/reth:${RETH_VERSION:-v1.3.2}
|
||||
depends_on:
|
||||
- berachain-bepolia-node
|
||||
user: root
|
||||
volumes:
|
||||
- "berachain-bepolia-reth:/data"
|
||||
@@ -17,7 +19,30 @@ services:
|
||||
- "54371:54371"
|
||||
- "54371:54371/udp"
|
||||
restart: unless-stopped
|
||||
command: node --chain /config/eth-genesis.json --p2p-secret-key /config/discovery-secret --datadir /data --rpc-max-connections 429496729 --metrics 0.0.0.0:9001 --http --http.addr 0.0.0.0 --http.port 8545 --ws --ws.addr 0.0.0.0 --ws.port 8545 --ws.origins '*' --port 6444 --discovery.port 6444 --authrpc.addr 0.0.0.0 --authrpc.jwtsecret /jwtsecret --http.api "debug,eth,net,trace,txpool,web3,rpc,reth" --ws.api "debug,eth,net,trace,txpool,web3,rpc,reth" --http.corsdomain '*' --rpc.max-logs-per-response 1100000 --rpc.gascap 600000000 --bootnodes enode://0c5a4a3c0e81fce2974e4d317d88df783731183d534325e32e0fdf8f4b119d7889fa254d3a38890606ec300d744e2aa9c87099a4a032f5c94efe53f3fcdfecfe@34.64.176.79:30303,enode://5b037f66099d5ded86eb7e1619f6d06ceb15609e8cc345ced22a4772b06178004e1490a3cd32fd1222789de4c6e4021c2d648a3d750f6d5323e64b771bbd8de7@34.87.142.180:30303,enode://bb7e44178543431feac8f0ee3827056b7b84d8235b802a8bdbbcd4939dab7f7dd2579ff577a38b002bb0139792af67abd2dd5c9f4f85b8da6e914fa76dca82bc@35.198.150.35:30303,enode://d071fa740e063ce1bb9cdc2b7937baeff6dc4000f91588d730a731c38a6ff0d4015814812c160fab8695e46f74b9b618735368ea2f16db4d785f16d29b3fb7b0@35.203.2.210:30303,enode://0c5a4a3c0e81fce2974e4d317d88df783731183d534325e32e0fdf8f4b119d7889fa254d3a38890606ec300d744e2aa9c87099a4a032f5c94efe53f3fcdfecfe@34.64.176.79:30303
|
||||
command: >
|
||||
node
|
||||
--chain /config/eth-genesis.json
|
||||
--p2p-secret-key /config/discovery-secret
|
||||
--datadir /data
|
||||
--rpc-max-connections 429496729
|
||||
--metrics 0.0.0.0:9001
|
||||
--http
|
||||
--http.addr 0.0.0.0
|
||||
--http.port 8545
|
||||
--ws
|
||||
--ws.addr 0.0.0.0
|
||||
--ws.port 8545
|
||||
--ws.origins '*'
|
||||
--port 6444
|
||||
--discovery.port 6444
|
||||
--authrpc.addr 0.0.0.0
|
||||
--authrpc.jwtsecret /jwtsecret
|
||||
--http.api "debug,eth,net,trace,txpool,web3,rpc,reth"
|
||||
--ws.api "debug,eth,net,trace,txpool,web3,rpc,reth"
|
||||
--http.corsdomain '*'
|
||||
--rpc.max-logs-per-response 1100000
|
||||
--rpc.gascap 600000000
|
||||
--bootnodes enode://0c5a4a3c0e81fce2974e4d317d88df783731183d534325e32e0fdf8f4b119d7889fa254d3a38890606ec300d744e2aa9c87099a4a032f5c94efe53f3fcdfecfe@34.64.176.79:30303,enode://5b037f66099d5ded86eb7e1619f6d06ceb15609e8cc345ced22a4772b06178004e1490a3cd32fd1222789de4c6e4021c2d648a3d750f6d5323e64b771bbd8de7@34.87.142.180:30303,enode://bb7e44178543431feac8f0ee3827056b7b84d8235b802a8bdbbcd4939dab7f7dd2579ff577a38b002bb0139792af67abd2dd5c9f4f85b8da6e914fa76dca82bc@35.198.150.35:30303,enode://d071fa740e063ce1bb9cdc2b7937baeff6dc4000f91588d730a731c38a6ff0d4015814812c160fab8695e46f74b9b618735368ea2f16db4d785f16d29b3fb7b0@35.203.2.210:30303,enode://0c5a4a3c0e81fce2974e4d317d88df783731183d534325e32e0fdf8f4b119d7889fa254d3a38890606ec300d744e2aa9c87099a4a032f5c94efe53f3fcdfecfe@34.64.176.79:30303
|
||||
stop_grace_period: 1m
|
||||
labels:
|
||||
- "prometheus-scrape.enabled=true"
|
||||
@@ -35,18 +60,18 @@ services:
|
||||
- chains
|
||||
|
||||
berachain-bepolia-node:
|
||||
image: icculp/berachain_beacon:v1.1.1
|
||||
depends_on:
|
||||
- berachain-bepolia
|
||||
image: ghcr.io/berachain/beacon-kit:v1.1.3
|
||||
expose:
|
||||
- 26657 #rpc
|
||||
ports:
|
||||
- "9692:9692"
|
||||
- "9692:9692/udp"
|
||||
- "55696:55696"
|
||||
- "55696:55696/udp"
|
||||
environment:
|
||||
- "MONIKER=d${DOMAIN:-local}"
|
||||
entrypoint: [ "sh", "/init.sh" ]
|
||||
command: --beacon-kit.engine.jwt-secret-path /jwtsecret
|
||||
#- "BEACOND_PATH=beacond"
|
||||
- "CHAIN_SPEC=testnet"
|
||||
#- "P2P_PORT=55696"
|
||||
entrypoint: /init.sh
|
||||
networks:
|
||||
- chains
|
||||
volumes:
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
50
berachain/bepolia/script/init.sh
Normal file → Executable file
50
berachain/bepolia/script/init.sh
Normal file → Executable file
@@ -4,20 +4,36 @@ set -e # Exit on failure
|
||||
|
||||
echo "MONIKER: $MONIKER"
|
||||
|
||||
CHAIN_SPEC=${CHAIN_SPEC:-testnet}
|
||||
BEACOND=${BEACOND_PATH:-beacond}
|
||||
CONFIG_DIR="/root/.beacond/config"
|
||||
|
||||
# Create config directory
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
|
||||
JWTSECRET="0x$(cat /jwtsecret)" # reth and bepolia don't speak the same language
|
||||
CHAINID=80069
|
||||
P2P_STRING="tcp:\\/\\/0\\.0\\.0\\.0\\:${P2P_PORT:-55696}"
|
||||
|
||||
echo "$JWTSECRET" > "$CONFIG_DIR/jwt.hex"
|
||||
|
||||
# this goes first because it won't overwrite shit
|
||||
if /usr/bin/beacond init ${MONIKER} --chain-id bepolia-beacon-80069 --consensus-key-algo bls12_381 --home /root/.beacond/; then
|
||||
apt-get update && apt-get install -y curl
|
||||
#if $BEACOND init ${MONIKER} --chain-id bepolia-beacon-80069 --consensus-key-algo bls12_381 --home /root/.beacond/; then
|
||||
if $BEACOND init ${MONIKER} --chain-id bepolia-beacon-80069 --home /root/.beacond/; then
|
||||
apk add curl
|
||||
|
||||
# Define variables
|
||||
CONFIG_DIR="/root/.beacond/config"
|
||||
CONFIG_TOML_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80069/config.toml"
|
||||
APP_TOML_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80069/app.toml"
|
||||
SEEDS_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/80069/cl-seeds.txt"
|
||||
|
||||
# Create config directory
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
CONFIG_TOML_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/$CHAINID/config.toml"
|
||||
APP_TOML_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/$CHAINID/app.toml"
|
||||
SEEDS_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/$CHAINID/cl-seeds.txt"
|
||||
KZG_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/$CHAINID/kzg-trusted-setup.json"
|
||||
ETH_GENESIS_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/$CHAINID/eth-genesis.json"
|
||||
GENESIS_URL="https://raw.githubusercontent.com/berachain/beacon-kit/main/testing/networks/$CHAINID/genesis.json"
|
||||
|
||||
# Download config files
|
||||
curl -sL "$GENESIS_URL" -o "$CONFIG_DIR/genesis.json"
|
||||
curl -sL "$ETH_GENESIS_URL" -o "$CONFIG_DIR/eth-genesis.json"
|
||||
curl -sL "$KZG_URL" -o "$CONFIG_DIR/kzg-trusted-setup.json"
|
||||
curl -sL "$CONFIG_TOML_URL" -o "$CONFIG_DIR/config.toml"
|
||||
curl -sL "$APP_TOML_URL" -o "$CONFIG_DIR/app.toml"
|
||||
|
||||
@@ -43,5 +59,19 @@ else
|
||||
echo "Already initialized, continuing!" >&2
|
||||
fi
|
||||
|
||||
|
||||
# apply a port change to the config
|
||||
sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$P2P_STRING\"|}" "$CONFIG_DIR/config.toml"
|
||||
#sed -i "s/^laddr = \".*\"/laddr = \"$P2P_STRING\"/" "$CONFIG_DIR/config.toml"
|
||||
sed -i 's|~/|/root/|g' "$CONFIG_DIR/config.toml"
|
||||
sed -i 's|~/|/root/|g' "$CONFIG_DIR/app.toml"
|
||||
|
||||
echo "$CONFIG_DIR/jwt.hex: $(cat $CONFIG_DIR/jwt.hex)"
|
||||
|
||||
#cd "$CONFIG_DIR"
|
||||
|
||||
# Execute beacond
|
||||
exec /usr/bin/beacond start --beacon-kit.kzg.trusted-setup-path /root/.beacond/config/kzg-trusted-setup.json --minimum-gas-prices 0atom "$@"
|
||||
#exec $BEACOND start --beacon-kit.kzg.trusted-setup-path /root/.beacond/config/kzg-trusted-setup.json --minimum-gas-prices 0atom "$@"
|
||||
exec $BEACOND start --home /root/.beacond $@
|
||||
# --beacon-kit.engine.jwt-secret-path $CONFIG_DIR/jwt.hex --beacon-kit.kzg.trusted-setup-path $CONFIG_DIR/kzg-trusted-setup.json --home /root/.beacond
|
||||
#--minimum-gas-prices 0atom
|
||||
|
||||
Reference in New Issue
Block a user