From a1c34efed753528ef6dfaf83e38683c4414c71bc Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Sat, 26 Oct 2024 09:18:02 +0200 Subject: [PATCH] Update networking defaults (#2783) * prefer IPv6 dual stack address, if available * use `8551` as default engine api port --- nimbus/config.nim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nimbus/config.nim b/nimbus/config.nim index 8226e703b..6ab9835a1 100644 --- a/nimbus/config.nim +++ b/nimbus/config.nim @@ -18,6 +18,7 @@ import net ], pkg/[ + chronos/transports/common, chronicles, confutils, confutils/defs, @@ -85,13 +86,16 @@ const defaultPort = 30303 defaultMetricsServerPort = 9093 defaultHttpPort = 8545 - defaultEngineApiPort = 8550 - defaultListenAddress = (static parseIpAddress("0.0.0.0")) + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/authentication.md#jwt-specifications + defaultEngineApiPort = 8551 defaultAdminListenAddress = (static parseIpAddress("127.0.0.1")) - defaultListenAddressDesc = $defaultListenAddress & ", meaning all network interfaces" defaultAdminListenAddressDesc = $defaultAdminListenAddress & ", meaning local host only" logLevelDesc = getLogLevels() +let + defaultListenAddress = getAutoAddress(Port(0)).toIpAddress() + defaultListenAddressDesc = $defaultListenAddress & ", meaning all network interfaces" + # `when` around an option doesn't work with confutils; it fails to compile. # Workaround that by setting the `ignore` pragma on EVMC-specific options. when defined(evmc_enabled):