diff --git a/tools/confutils/cli_args.nim b/tools/confutils/cli_args.nim index d4b7185f2..53109b83c 100644 --- a/tools/confutils/cli_args.nim +++ b/tools/confutils/cli_args.nim @@ -45,6 +45,13 @@ logScope: # Git version in git describe format (defined at compile time) const git_version* {.strdefine.} = "n/a" +# CLI defaults that differ from confbuilder defaults +const + DefaultCLIRelay = true + DefaultCLIPeerExchange = true + DefaultCLIRendezvous = true + DefaultCLINat = "any" + type ConfResult*[T] = Result[T, string] type EthRpcUrl* = distinct string @@ -184,7 +191,7 @@ type WakuNodeConf* = object .}: Option[uint16] agentString* {. - defaultValue: "logos-delivery-" & cli_args.git_version, + defaultValue: DefaultAgentString, desc: "Node agent string which is used as identifier in network", name: "agent-string" .}: string @@ -209,7 +216,7 @@ type WakuNodeConf* = object desc: "Specify method to use for determining public address. " & "Must be one of: any, none, upnp, pmp, extip:.", - defaultValue: "any" + defaultValue: DefaultCLINat .}: string extMultiAddrs* {. @@ -281,7 +288,8 @@ hence would have reachability issues.""", ## Relay config relay* {. - desc: "Enable relay protocol: true|false", defaultValue: true, name: "relay" + desc: "Enable relay protocol: true|false", defaultValue: DefaultCLIRelay, + name: "relay" .}: bool relayPeerExchange* {. @@ -621,7 +629,7 @@ hence would have reachability issues.""", ## waku peer exchange config peerExchange* {. desc: "Enable waku peer exchange protocol (responder side): true|false", - defaultValue: true, + defaultValue: DefaultCLIPeerExchange, name: "peer-exchange" .}: bool @@ -635,7 +643,7 @@ hence would have reachability issues.""", ## Rendez vous rendezvous* {. desc: "Enable waku rendezvous discovery server", - defaultValue: true, + defaultValue: DefaultCLIRendezvous, name: "rendezvous" .}: bool diff --git a/waku/factory/conf_builder/waku_conf_builder.nim b/waku/factory/conf_builder/waku_conf_builder.nim index ceecf7f00..e1766aee5 100644 --- a/waku/factory/conf_builder/waku_conf_builder.nim +++ b/waku/factory/conf_builder/waku_conf_builder.nim @@ -43,11 +43,11 @@ const git_version {.strdefine.} = "(unknown)" const DefaultMaxConnections* = 150 - DefaultRelay*: bool = false + DefaultRelay*: bool = false # historical confbuilder default; wakunode2 CLI deviates (true) DefaultLightPush*: bool = false - DefaultPeerExchange*: bool = false + DefaultPeerExchange*: bool = false # historical confbuilder default; wakunode2 CLI deviates (true) DefaultStoreSyncMount*: bool = false - DefaultRendezvous*: bool = false + DefaultRendezvous*: bool = false # historical confbuilder default; wakunode2 CLI deviates (true) DefaultMix*: bool = false DefaultRelayPeerExchange*: bool = false DefaultLogLevel*: logging.LogLevel = logging.LogLevel.INFO @@ -60,7 +60,7 @@ const DefaultDnsAddrsNameServers*: seq[IpAddress] = @[static parseIpAddress("1.1.1.1"), static parseIpAddress("1.0.0.1")] DefaultPeerPersistence*: bool = false - DefaultAgentString*: string = "logos-delivery " & git_version + DefaultAgentString*: string = "logos-delivery-" & git_version DefaultRelayShardedPeerManagement*: bool = false DefaultRelayServiceRatio*: string = "50:50" DefaultCircuitRelayClient*: bool = false