Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion besu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- NODE_TYPE=${EL_NODE_TYPE:-pre-merge-expiry}
- NETWORK=${NETWORK}
- IPV6=${IPV6:-false}
- EL_P2P_PORT_2=${EL_P2P_PORT_2:-30304}
- EL_P2P_PORT=${EL_P2P_PORT:-30303}
- COMPOSE_FILE=${COMPOSE_FILE}
volumes:
- besu-el-data:/var/lib/besu
Expand Down
20 changes: 15 additions & 5 deletions besu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,22 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then
git pull origin "${branch}"
fi
config_dir_path="/var/lib/besu/testnet/${config_dir}"
if [[ -f "${config_dir_path}/enodes.yaml" ]]; then
if [[ -f "${config_dir_path}/enodes.txt" ]]; then
bootnodes="$(paste -sd, "${config_dir_path}/enodes.txt")"
else
bootnodes="$(awk -F'- ' '!/^#/ && NF>1 { split($2, a, /[ \t#]/); if (a[1] != "") printf (first++ ? "," : "") a[1] } END { print "" }' "${config_dir_path}/enodes.yaml")"
fi
if [[ -f "${config_dir_path}/bootstrap_nodes.txt" ]]; then
v5_bootnodes="$(paste -sd, "${config_dir_path}/bootstrap_nodes.txt")"
else
bootnodes="$(paste -sd, "${config_dir_path}/enodes.txt")"
v5_bootnodes="$(awk -F'- ' '!/^#/ && NF>1 { split($2, a, /[ \t#]/); if (a[1] != "") printf (first++ ? "," : "") a[1] } END { print "" }' "${config_dir_path}/bootstrap_nodes.yaml")"
fi
if [[ -n "${bootnodes}" && -n "${v5_bootnodes}" ]]; then
bootnodes+=",${v5_bootnodes}"
elif [[ -n "${v5_bootnodes}" ]]; then
bootnodes="${v5_bootnodes}"
fi
__network="--genesis-file=${config_dir_path}/besu.json --bootnodes=${bootnodes}"
__network="--genesis-file=${config_dir_path}/besu.json --bootnodes=${bootnodes} --bonsai-limit-trie-logs-enabled=false"
else
__network="--network ${NETWORK}"
fi
Expand Down Expand Up @@ -116,9 +126,9 @@ else
fi

# DiscV5 for IPV6
if [[ "${IPV6:-false}" = "true" ]]; then
if [[ "${IPV6}" = "true" ]]; then
echo "Configuring Besu for discv5 for IPv6 advertisements"
__ipv6="--Xv5-discovery-enabled --p2p-interface-ipv6=:: --p2p-port-ipv6=${EL_P2P_PORT_2} --p2p-ipv6-outbound-enabled"
__ipv6="--p2p-interface-ipv6=:: --p2p-port-ipv6=${EL_P2P_PORT} --p2p-ipv6-outbound-enabled"
# Address discovery on v6 is not implemented
ipv6_pattern="^[0-9A-Fa-f]{1,4}:" # Sufficient to check the start
set +e
Expand Down
2 changes: 0 additions & 2 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ DOCKER_EXT_NETWORK=rocketpool_net
# P2P ports you will forward to your staking node. Adjust here if you are
# going to use something other than defaults.
EL_P2P_PORT=30303
# second EL P2P port used by Besu IPv6
EL_P2P_PORT_2=30304
CL_P2P_PORT=9000
PRYSM_PORT=9000
PRYSM_UDP_PORT=9000
Expand Down
Loading