Discovery v0.2.0 Update (#926)

* Merge #913

* Correct release tests

* Completed release test corrections

* Initial work on upgrading discovery

* Updates discovery to latest version

* Update ENR initialisation logic

* Remove debug statements
This commit is contained in:
Age Manning
2020-03-19 15:11:08 +11:00
committed by GitHub
parent 41c3294c16
commit e4ca896694
11 changed files with 223 additions and 131 deletions

View File

@@ -62,6 +62,14 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.default_value("9000")
.takes_value(true),
)
.arg(
Arg::with_name("discovery-port")
.long("discovery-port")
.value_name("PORT")
.help("The UDP port that discovery will listen on.")
.default_value("9000")
.takes_value(true),
)
.arg(
Arg::with_name("maxpeers")
.long("maxpeers")
@@ -78,20 +86,43 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.takes_value(true),
)
.arg(
Arg::with_name("discovery-port")
.long("disc-port")
Arg::with_name("enr-udp-port")
.long("enr-udp-port")
.value_name("PORT")
.help("The discovery UDP port.")
.default_value("9000")
.help("The UDP port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port.")
.takes_value(true),
)
.arg(
Arg::with_name("discovery-address")
.long("discovery-address")
Arg::with_name("enr-tcp-port")
.long("enr-tcp-port")
.value_name("PORT")
.help("The TCP port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port.\
The --port flag is used if this is not set.")
.takes_value(true),
)
.arg(
Arg::with_name("enr-address")
.long("enr-address")
.value_name("ADDRESS")
.help("The IP address to broadcast to other peers on how to reach this node. \
Default will load previous values from disk failing this it is set to 127.0.0.1 \
and will be updated when connecting to other nodes on the network.")
Set this only if you are sure other nodes can connect to your local node on this address. \
Discovery will automatically find your external address,if possible.
")
.takes_value(true),
)
.arg(
Arg::with_name("enr-match")
.short("e")
.long("enr-match")
.help("Sets the local ENR IP address and port to match those set for lighthouse. \
Specifically, the IP address will be the value of --listen-address and the UDP port will be --discovery-port.")
)
.arg(
Arg::with_name("disable-enr-auto-update")
.short("s")
.long("disable-enr-auto-update")
.help("Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. \
This disables this feature, fixing the ENR's IP/PORT to those specified on boot.")
.takes_value(true),
)
.arg(