2021-10-18 18:16:32 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
source /scripts/utils.sh
|
|
|
|
|
|
|
|
DATA_DIR=/root/.ethereum
|
|
|
|
|
|
|
|
wait_for_host_port ${BOOTSTRAP_HOST} ${BOOTSTRAP_TCP_PORT}
|
|
|
|
BOOTSTRAP_IP=$(get_host_ip $BOOTSTRAP_HOST)
|
|
|
|
VALIDATOR_ADDR=$(cat ${DATA_DIR}/address)
|
|
|
|
HOST_IP=$(hostname -i)
|
|
|
|
|
|
|
|
echo "validator id: ${HOST_IP}"
|
|
|
|
|
|
|
|
geth --config ${DATA_DIR}/config.toml --datadir ${DATA_DIR} --netrestrict ${CLUSTER_CIDR} \
|
|
|
|
--verbosity ${VERBOSE} --nousb \
|
|
|
|
--bootnodes enode://${BOOTSTRAP_PUB_KEY}@${BOOTSTRAP_IP}:${BOOTSTRAP_TCP_PORT} \
|
2023-09-08 18:04:03 +08:00
|
|
|
--mine -unlock ${VALIDATOR_ADDR} --miner.etherbase ${VALIDATOR_ADDR} --password /dev/null \
|
2021-10-18 18:16:32 +08:00
|
|
|
--light.serve 50 \
|
2023-12-06 18:32:31 +08:00
|
|
|
--rpc.allow-unprotected-txs --history.transactions 15768000 >${DATA_DIR}/bscnode-validator.log
|