From b95f76ca733340490918ddbc617aca7fb11ac1e6 Mon Sep 17 00:00:00 2001 From: Yorick Downe Date: Thu, 27 Aug 2026 13:44:03 +0100 Subject: [PATCH] Support ENR bootnodes for Nethermind custom net --- nethermind/docker-entrypoint.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nethermind/docker-entrypoint.sh b/nethermind/docker-entrypoint.sh index 7ba6c40f..4fe38024 100755 --- a/nethermind/docker-entrypoint.sh +++ b/nethermind/docker-entrypoint.sh @@ -68,10 +68,20 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then git pull origin "${branch}" fi config_dir_path="/var/lib/nethermind/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="--config none.cfg --Init.ChainSpecPath=${config_dir_path}/chainspec.json --Discovery.Bootnodes=${bootnodes}" if [[ ! "${NODE_TYPE}" = "archive" ]]; then