Update networking defaults (#2783)

* prefer IPv6 dual stack address, if available
* use `8551` as default engine api port
This commit is contained in:
Jacek Sieka 2024-10-26 09:18:02 +02:00 committed by GitHub
parent 34e7e39cd4
commit a1c34efed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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):