ValidIpAddress -> IpAddress related vendor bumps and changes (#1892)

This commit is contained in:
Kim De Mey 2023-11-10 19:38:11 +01:00 committed by GitHub
parent c41d531c51
commit 86f93fdba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 31 additions and 33 deletions

View File

@ -29,8 +29,8 @@ proc defaultDataDir*(): string =
getHomeDir() / dataDir getHomeDir() / dataDir
const const
defaultListenAddress* = (static ValidIpAddress.init("0.0.0.0")) defaultListenAddress* = (static parseIpAddress("0.0.0.0"))
defaultAdminListenAddress* = (static ValidIpAddress.init("127.0.0.1")) defaultAdminListenAddress* = (static parseIpAddress("127.0.0.1"))
defaultProxyAddress* = (static "http://127.0.0.1:8546") defaultProxyAddress* = (static "http://127.0.0.1:8546")
defaultClientConfig* = getHttpClientConfig(defaultProxyAddress) defaultClientConfig* = getHttpClientConfig(defaultProxyAddress)
@ -80,7 +80,7 @@ type
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
defaultValueDesc: $defaultListenAddressDesc defaultValueDesc: $defaultListenAddressDesc
desc: "Listening address for the Discovery v5 traffic" desc: "Listening address for the Discovery v5 traffic"
name: "listen-address" .}: ValidIpAddress name: "listen-address" .}: IpAddress
portalNetwork* {. portalNetwork* {.
desc: desc:
@ -150,7 +150,7 @@ type
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
desc: "Listening address of the metrics server" desc: "Listening address of the metrics server"
name: "metrics-address" .}: ValidIpAddress name: "metrics-address" .}: IpAddress
metricsPort* {. metricsPort* {.
defaultValue: 8008 defaultValue: 8008
@ -171,7 +171,7 @@ type
desc: "Listening address of the RPC server" desc: "Listening address of the RPC server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "rpc-address" .}: ValidIpAddress name: "rpc-address" .}: IpAddress
# it makes little sense to have default value here in final release, but until then # it makes little sense to have default value here in final release, but until then
# it would be troublesome to add some fake uri param every time # it would be troublesome to add some fake uri param every time

View File

@ -1,5 +1,5 @@
# Nimbus - Portal Network # Nimbus - Portal Network
# Copyright (c) 2021 Status Research & Development GmbH # Copyright (c) 2021-2023 Status Research & Development GmbH
# Licensed and distributed under either of # Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@ -13,7 +13,7 @@ import
../network/history/[accumulator, history_content] ../network/history/[accumulator, history_content]
proc localAddress*(port: int): Address = proc localAddress*(port: int): Address =
Address(ip: ValidIpAddress.init("127.0.0.1"), port: Port(port)) Address(ip: parseIpAddress("127.0.0.1"), port: Port(port))
proc initDiscoveryNode*( proc initDiscoveryNode*(
rng: ref HmacDrbgContext, rng: ref HmacDrbgContext,

View File

@ -113,7 +113,7 @@ type BeaconBridgeConf* = object
desc: "Listening address for the Ethereum LibP2P and Discovery v5 traffic" desc: "Listening address for the Ethereum LibP2P and Discovery v5 traffic"
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
defaultValueDesc: $defaultListenAddressDesc defaultValueDesc: $defaultListenAddressDesc
name: "listen-address" .}: ValidIpAddress name: "listen-address" .}: IpAddress
tcpPort* {. tcpPort* {.
desc: "Listening TCP port for Ethereum LibP2P traffic" desc: "Listening TCP port for Ethereum LibP2P traffic"

View File

@ -1,5 +1,5 @@
# Nimbus - Portal Network # Nimbus - Portal Network
# Copyright (c) 2021 Status Research & Development GmbH # Copyright (c) 2021-2023 Status Research & Development GmbH
# Licensed and distributed under either of # Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@ -19,8 +19,8 @@ import
../network/history/[history_content, history_network] ../network/history/[history_content, history_network]
const const
defaultListenAddress* = (static ValidIpAddress.init("0.0.0.0")) defaultListenAddress* = (static parseIpAddress("0.0.0.0"))
defaultAdminListenAddress* = (static ValidIpAddress.init("127.0.0.1")) defaultAdminListenAddress* = (static parseIpAddress("127.0.0.1"))
defaultListenAddressDesc = $defaultListenAddress defaultListenAddressDesc = $defaultListenAddress
defaultAdminListenAddressDesc = $defaultAdminListenAddress defaultAdminListenAddressDesc = $defaultAdminListenAddress
@ -51,7 +51,7 @@ type
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
defaultValueDesc: $defaultListenAddressDesc defaultValueDesc: $defaultListenAddressDesc
desc: "Listening address for the Discovery v5 traffic" desc: "Listening address for the Discovery v5 traffic"
name: "listen-address" }: ValidIpAddress name: "listen-address" }: IpAddress
# Note: This will add bootstrap nodes for both Discovery v5 network and each # Note: This will add bootstrap nodes for both Discovery v5 network and each
# enabled Portal network. No distinction is made on bootstrap nodes per # enabled Portal network. No distinction is made on bootstrap nodes per
@ -94,7 +94,7 @@ type
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
desc: "Listening address of the metrics server" desc: "Listening address of the metrics server"
name: "metrics-address" .}: ValidIpAddress name: "metrics-address" .}: IpAddress
metricsPort* {. metricsPort* {.
defaultValue: 8008 defaultValue: 8008

View File

@ -20,7 +20,7 @@ import
../../rpc/rpc_discovery_api ../../rpc/rpc_discovery_api
const const
defaultListenAddress* = (static ValidIpAddress.init("127.0.0.1")) defaultListenAddress* = (static parseIpAddress("127.0.0.1"))
type AppConf* = object type AppConf* = object
rpcPort* {. rpcPort* {.
@ -36,12 +36,12 @@ type AppConf* = object
udpListenAddress* {. udpListenAddress* {.
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
desc: "UDP listening address" desc: "UDP listening address"
name: "udp-listen-address" .}: ValidIpAddress name: "udp-listen-address" .}: IpAddress
rpcListenAddress* {. rpcListenAddress* {.
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
desc: "RPC listening address" desc: "RPC listening address"
name: "rpc-listen-address" .}: ValidIpAddress name: "rpc-listen-address" .}: IpAddress
proc `%`*(value: enr.Record): JsonNode = proc `%`*(value: enr.Record): JsonNode =
newJString(value.toURI()) newJString(value.toURI())

View File

@ -1,4 +1,4 @@
# Copyright (c) 2018-2022 Status Research & Development GmbH # Copyright (c) 2018-2023 Status Research & Development GmbH
# Licensed under either of # Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT)) # * MIT license ([LICENSE-MIT](LICENSE-MIT))
@ -92,8 +92,8 @@ const
defaultEthGraphqlPort = 8547 defaultEthGraphqlPort = 8547
defaultEngineApiPort = 8550 defaultEngineApiPort = 8550
defaultEngineApiWsPort = 8551 defaultEngineApiWsPort = 8551
defaultListenAddress = (static ValidIpAddress.init("0.0.0.0")) defaultListenAddress = (static parseIpAddress("0.0.0.0"))
defaultAdminListenAddress = (static ValidIpAddress.init("127.0.0.1")) defaultAdminListenAddress = (static parseIpAddress("127.0.0.1"))
defaultListenAddressDesc = $defaultListenAddress & ", meaning all network interfaces" defaultListenAddressDesc = $defaultListenAddress & ", meaning all network interfaces"
defaultAdminListenAddressDesc = $defaultAdminListenAddress & ", meaning local host only" defaultAdminListenAddressDesc = $defaultAdminListenAddress & ", meaning local host only"
logLevelDesc = getLogLevels() logLevelDesc = getLogLevels()
@ -316,7 +316,7 @@ type
desc: "Listening IP address for Ethereum P2P and Discovery traffic" desc: "Listening IP address for Ethereum P2P and Discovery traffic"
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
defaultValueDesc: $defaultListenAddressDesc defaultValueDesc: $defaultListenAddressDesc
name: "listen-address" }: ValidIpAddress name: "listen-address" }: IpAddress
tcpPort* {. tcpPort* {.
desc: "Ethereum P2P network listening TCP port" desc: "Ethereum P2P network listening TCP port"
@ -395,7 +395,7 @@ type
desc: "Listening IP address of the JSON-RPC server" desc: "Listening IP address of the JSON-RPC server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "rpc-address" }: ValidIpAddress name: "rpc-address" }: IpAddress
rpcApi {. rpcApi {.
desc: "Enable specific set of RPC API (available: eth, debug)" desc: "Enable specific set of RPC API (available: eth, debug)"
@ -418,7 +418,7 @@ type
desc: "Listening IP address of the Websocket JSON-RPC server" desc: "Listening IP address of the Websocket JSON-RPC server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "ws-address" }: ValidIpAddress name: "ws-address" }: IpAddress
wsApi {. wsApi {.
desc: "Enable specific set of Websocket RPC API (available: eth, debug)" desc: "Enable specific set of Websocket RPC API (available: eth, debug)"
@ -441,7 +441,7 @@ type
desc: "Listening address for the Engine API" desc: "Listening address for the Engine API"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "engine-api-address" .}: ValidIpAddress name: "engine-api-address" .}: IpAddress
engineApiWsEnabled* {. engineApiWsEnabled* {.
desc: "Enable the WebSocket Engine API" desc: "Enable the WebSocket Engine API"
@ -458,7 +458,7 @@ type
desc: "Listening address for the WebSocket Engine API" desc: "Listening address for the WebSocket Engine API"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "engine-api-ws-address" .}: ValidIpAddress name: "engine-api-ws-address" .}: IpAddress
terminalTotalDifficulty* {. terminalTotalDifficulty* {.
desc: "The terminal total difficulty of the eth2 merge transition block." & desc: "The terminal total difficulty of the eth2 merge transition block." &
@ -495,7 +495,7 @@ type
desc: "Listening IP address of the GraphQL HTTP server" desc: "Listening IP address of the GraphQL HTTP server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "graphql-address" }: ValidIpAddress name: "graphql-address" }: IpAddress
metricsEnabled* {. metricsEnabled* {.
desc: "Enable the built-in metrics HTTP server" desc: "Enable the built-in metrics HTTP server"
@ -512,7 +512,7 @@ type
desc: "Listening IP address of the built-in metrics HTTP server" desc: "Listening IP address of the built-in metrics HTTP server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "metrics-address" }: ValidIpAddress name: "metrics-address" }: IpAddress
statelessModeDataSourceUrl* {. statelessModeDataSourceUrl* {.
desc: "URL of the node to use as a data source for on-demand data fetching via the JSON-RPC API" desc: "URL of the node to use as a data source for on-demand data fetching via the JSON-RPC API"

View File

@ -32,8 +32,6 @@ func getConfiguredChainId(networkMetadata: Eth2NetworkMetadata): Quantity =
net = networkMetadata.eth1Network.get() net = networkMetadata.eth1Network.get()
chainId = case net chainId = case net
of mainnet: 1.Quantity of mainnet: 1.Quantity
of ropsten: 3.Quantity
of rinkeby: 4.Quantity
of goerli: 5.Quantity of goerli: 5.Quantity
of sepolia: 11155111.Quantity of sepolia: 11155111.Quantity
of holesky: 17000.Quantity of holesky: 17000.Quantity

View File

@ -87,7 +87,7 @@ type VerifiedProxyConf* = object
desc: "Listening address of the JSON-RPC server" desc: "Listening address of the JSON-RPC server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc defaultValueDesc: $defaultAdminListenAddressDesc
name: "rpc-address" .}: ValidIpAddress name: "rpc-address" .}: IpAddress
rpcPort* {. rpcPort* {.
desc: "Listening port of the JSON-RPC server" desc: "Listening port of the JSON-RPC server"
@ -109,7 +109,7 @@ type VerifiedProxyConf* = object
desc: "Listening address for the Ethereum LibP2P and Discovery v5 traffic" desc: "Listening address for the Ethereum LibP2P and Discovery v5 traffic"
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
defaultValueDesc: $defaultListenAddressDesc defaultValueDesc: $defaultListenAddressDesc
name: "listen-address" .}: ValidIpAddress name: "listen-address" .}: IpAddress
tcpPort* {. tcpPort* {.
desc: "Listening TCP port for Ethereum LibP2P traffic" desc: "Listening TCP port for Ethereum LibP2P traffic"

@ -1 +1 @@
Subproject commit 674c9e4c8e0cad2b7193cc9a59c12d39a397750f Subproject commit 7568f1b7c3142d8e87c1f3dd42924238926affbe

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit 700360fde2cf91c0c6d66af42851ee21c947e23a Subproject commit ca4898e24a4ffb61759d57469f208b542123a092

2
vendor/nimbus-eth2 vendored

@ -1 +1 @@
Subproject commit 9fd52ebe9f9f23f378c71260d26827fc98af3ae8 Subproject commit c7952ff7780fde117a8998fa799e93a8f2d78c32