Add enr auto update cli option and bump nim-eth (#2278)
This commit is contained in:
parent
6141286547
commit
73d9c2aa53
|
@ -165,6 +165,13 @@ type
|
|||
"Must be one of: any, none, upnp, pmp, extip:<IP>"
|
||||
defaultValue: "any" }: string
|
||||
|
||||
enrAutoUpdate* {.
|
||||
defaultValue: false
|
||||
desc: "Discovery can automatically update its ENR with the IP address " &
|
||||
"and UDP port as seen by other nodes it communicates with. " &
|
||||
"This option allows to enable/disable this functionality"
|
||||
name: "enr-auto-update" .}: bool
|
||||
|
||||
weakSubjectivityCheckpoint* {.
|
||||
desc: "Weak subjectivity checkpoint in the format block_root:epoch_number"
|
||||
name: "weak-subjectivity-checkpoint" }: Option[Checkpoint]
|
||||
|
|
|
@ -93,4 +93,5 @@ proc new*(T: type Eth2DiscoveryProtocol,
|
|||
loadBootstrapFile(persistentBootstrapFile, bootstrapEnrs)
|
||||
|
||||
newProtocol(pk, ip, tcpPort, udpPort, enrFields, bootstrapEnrs,
|
||||
bindIp = conf.listenAddress, rng = rng)
|
||||
bindIp = conf.listenAddress, enrAutoUpdate = conf.enrAutoUpdate,
|
||||
rng = rng)
|
||||
|
|
|
@ -1560,8 +1560,8 @@ programMain:
|
|||
1, # sequence number
|
||||
networkKeys.seckey.asEthKey,
|
||||
some(config.bootstrapAddress),
|
||||
config.bootstrapPort,
|
||||
config.bootstrapPort,
|
||||
some(config.bootstrapPort),
|
||||
some(config.bootstrapPort),
|
||||
[toFieldPair("eth2", SSZ.encode(enrForkIdFromState initialState[])),
|
||||
toFieldPair("attnets", SSZ.encode(netMetadata.attnets))])
|
||||
|
||||
|
@ -1781,8 +1781,8 @@ programMain:
|
|||
config.seqNumber,
|
||||
netKeys.seckey.asEthKey,
|
||||
some(config.ipExt),
|
||||
config.tcpPortExt,
|
||||
config.udpPortExt,
|
||||
some(config.tcpPortExt),
|
||||
some(config.udpPortExt),
|
||||
fieldPairs).expect("Record within size limits")
|
||||
|
||||
echo record.toURI()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e25500c9f0597e91979a4c714989abd6e01f70d9
|
||||
Subproject commit 4e58eb48ce1b1a06d28802ad22215de9ff92a916
|
Loading…
Reference in New Issue