diff --git a/config/wallet_config.go b/config/wallet_config.go index a1d83e3a..76af2616 100644 --- a/config/wallet_config.go +++ b/config/wallet_config.go @@ -55,7 +55,7 @@ type WalletConfig struct { /* description: | - [Go template](templates.md) of a Vega Wallet config. + [Go template](templates.md) of a Vega Wallet network configuration. The [wallet.ConfigTemplateContext](templates.md#walletconfigtemplatecontext) can be used in the template. Example can be found in [default network config](net_confs/config.hcl). diff --git a/generator/initiate.go b/generator/initiate.go index 67b1ec0a..de5e3729 100644 --- a/generator/initiate.go +++ b/generator/initiate.go @@ -4,11 +4,12 @@ import ( "fmt" "sync" + "golang.org/x/sync/errgroup" + "code.vegaprotocol.io/vegacapsule/config" "code.vegaprotocol.io/vegacapsule/generator/nomad" "code.vegaprotocol.io/vegacapsule/generator/wallet" "code.vegaprotocol.io/vegacapsule/types" - "golang.org/x/sync/errgroup" ) func (g *Generator) initiateNodeSet(absoluteIndex, relativeIndex, groupIndex int, nc config.NodeConfig) (*types.NodeSet, error) { diff --git a/net_confs/config.hcl b/net_confs/config.hcl index 19c012dc..28bdaa96 100644 --- a/net_confs/config.hcl +++ b/net_confs/config.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:{{add 300 $i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_checkpoint.hcl b/net_confs/config_checkpoint.hcl index 2f19f304..b8c20ee9 100644 --- a/net_confs/config_checkpoint.hcl +++ b/net_confs/config_checkpoint.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_clef.hcl b/net_confs/config_clef.hcl index a9e0099a..1bfe38f7 100644 --- a/net_confs/config_clef.hcl +++ b/net_confs/config_clef.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_data_node_snapshot.hcl b/net_confs/config_data_node_snapshot.hcl index adb292e4..5aa2c8b7 100644 --- a/net_confs/config_data_node_snapshot.hcl +++ b/net_confs/config_data_node_snapshot.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_external_postgres.hcl b/net_confs/config_external_postgres.hcl index ff483260..1a8d7428 100644 --- a/net_confs/config_external_postgres.hcl +++ b/net_confs/config_external_postgres.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_frontends.hcl b/net_confs/config_frontends.hcl index 7d636919..2af50be2 100644 --- a/net_confs/config_frontends.hcl +++ b/net_confs/config_frontends.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:{{add 300 $i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_nullchain.hcl b/net_confs/config_nullchain.hcl index 0abf3513..6ed06214 100644 --- a/net_confs/config_nullchain.hcl +++ b/net_confs/config_nullchain.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_nullchain_no_erc20.hcl b/net_confs/config_nullchain_no_erc20.hcl index ba300cf0..1f3043b7 100644 --- a/net_confs/config_nullchain_no_erc20.hcl +++ b/net_confs/config_nullchain_no_erc20.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_sentry_datanode.hcl b/net_confs/config_sentry_datanode.hcl index a0b5ef50..6525fd86 100644 --- a/net_confs/config_sentry_datanode.hcl +++ b/net_confs/config_sentry_datanode.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .NonValidators}}{{if eq $v.GroupName "sentry-0" "sentry-1" "sentry-2"}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$v.Index}}2"{{end}}{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_visor_mixed.hcl b/net_confs/config_visor_mixed.hcl index 0951b849..9d02a880 100644 --- a/net_confs/config_visor_mixed.hcl +++ b/net_confs/config_visor_mixed.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/config_visor_only.hcl b/net_confs/config_visor_only.hcl index e2312667..78f05193 100644 --- a/net_confs/config_visor_only.hcl +++ b/net_confs/config_visor_only.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT } diff --git a/net_confs/stagnet_config.hcl b/net_confs/stagnet_config.hcl index 154ca8ef..d4c2a4a7 100644 --- a/net_confs/stagnet_config.hcl +++ b/net_confs/stagnet_config.hcl @@ -20,15 +20,10 @@ EOT wallet "wallet-1" { template = <<-EOT Name = "DV" -Level = "info" -TokenExpiry = "168h0m0s" -Port = 1789 -Host = "0.0.0.0" [API] [API.GRPC] Hosts = [{{range $i, $v := .Validators}}{{if ne $i 0}},{{end}}"127.0.0.1:30{{$i}}2"{{end}}] - Retries = 5 EOT }