From 5dfd8cca416cc83f29da49c7541d1ef84ca2752b Mon Sep 17 00:00:00 2001 From: daniel1302 Date: Wed, 4 Oct 2023 16:12:23 +0200 Subject: [PATCH] feat: updates for nullchain --- net_confs/config_nullchain.hcl | 2 +- net_confs/config_nullchain_no_erc20.hcl | 47 +++++++++---------- .../data_node_external_postgresql.tmpl | 45 ++++++++++++++++++ .../nullchain/genesis.json.tmpl | 2 +- .../nullchain/genesis_no_erc20.json.tmpl | 2 +- 5 files changed, 71 insertions(+), 27 deletions(-) create mode 100644 net_confs/node_set_templates/nullchain/data_node_external_postgresql.tmpl diff --git a/net_confs/config_nullchain.hcl b/net_confs/config_nullchain.hcl index 0abf3513..21f20616 100644 --- a/net_confs/config_nullchain.hcl +++ b/net_confs/config_nullchain.hcl @@ -88,7 +88,7 @@ EOT config_templates { vega_file = "./node_set_templates/nullchain/vega_validator.toml" tendermint_file = "./node_set_templates/nullchain/tendermint_validator.toml" - data_node_file = "./node_set_templates/nullchain/data_node.tmpl" + data_node_file = "./node_set_templates/nullchain/data_node_external_postgresql.tmpl" } } diff --git a/net_confs/config_nullchain_no_erc20.hcl b/net_confs/config_nullchain_no_erc20.hcl index ba300cf0..3da943d9 100644 --- a/net_confs/config_nullchain_no_erc20.hcl +++ b/net_confs/config_nullchain_no_erc20.hcl @@ -33,28 +33,26 @@ EOT } pre_start { - docker_service "postgres-1" { - image = "vegaprotocol/timescaledb:2.8.0-pg14" - cmd = "postgres" - args = [] - env = { - POSTGRES_USER="vega" - POSTGRES_PASSWORD="vega" - POSTGRES_DBS="vega,vega0,vega1,vega2,vega3,vega4,vega5,vega6,vega7,vega8,vega9,vega10,vega11,vega12,vega13,vega14,vega15,vega16,vega17,vega18,vega19,vega20,vega21,vega22,vega23,vega24,vega25" - } - - static_port { - value = 5432 - to = 5432 - } - resources { - cpu = 600 - memory = 900 - } - - volume_mounts = ["${network_home_path}:${network_home_path}"] - - auth_soft_fail = true + docker_service "postgres-1" { + image = "vegaprotocol/timescaledb:2.8.0-pg14" + cmd = "postgres" + args = [] + env = { + POSTGRES_USER="vega" + POSTGRES_PASSWORD="vega" + POSTGRES_DBS="vega" + } + + static_port { + value = 5332 + to = 5432 + } + resources { + cpu = 600 + memory = 900 + } + + auth_soft_fail = true } } @@ -69,8 +67,9 @@ EOT use_data_node = true config_templates { - vega_file = "./node_set_templates/nullchain/vega_validator.toml" - tendermint_file = "./node_set_templates/nullchain/tendermint_validator.toml" + vega_file = "./node_set_templates/nullchain/vega_validator_no_erc20.toml" + tendermint_file = "./node_set_templates/nullchain/tendermint_validator.toml" + data_node_file = "./node_set_templates/nullchain/data_node_external_postgresql.tmpl" } } diff --git a/net_confs/node_set_templates/nullchain/data_node_external_postgresql.tmpl b/net_confs/node_set_templates/nullchain/data_node_external_postgresql.tmpl new file mode 100644 index 00000000..83ef5650 --- /dev/null +++ b/net_confs/node_set_templates/nullchain/data_node_external_postgresql.tmpl @@ -0,0 +1,45 @@ +GatewayEnabled = true + +[SqlStore] + Level = "Info" + Enabled = false + WipeOnStartup = true + UseEmbedded = false + [SQLStore.ConnectionConfig] + Database = "vega" + Host = "localhost" + Password = "vega" + Port = 5332 + UseTransactions = true + Username = "vega" + +[API] + Level = "Info" + Port = {{add 300 .NodeNumber}}7 + CoreNodeGRPCPort = {{add 300 .NodeNumber}}2 + +[Pprof] + Level = "Info" + Enabled = true + Port = {{add 60 .NodeNumber}}60 + ProfilesDir = "{{.NodeHomeDir}}" + +[Gateway] + Level = "Info" + Port = {{add 300 .NodeNumber}}8 + [Gateway.Node] + Port = {{add 300 .NodeNumber}}7 + +[Metrics] + Level = "Info" + Timeout = "5s" + Port = {{add 210 .NodeNumber}}2 + Enabled = false +[Broker] + Level = "Info" + UseEventFile = false + [Broker.SocketConfig] + Port = {{add 300 .NodeNumber}}5 + +[NetworkHistory] + Enabled = false diff --git a/net_confs/node_set_templates/nullchain/genesis.json.tmpl b/net_confs/node_set_templates/nullchain/genesis.json.tmpl index 0daf8108..b641bd59 100644 --- a/net_confs/node_set_templates/nullchain/genesis.json.tmpl +++ b/net_confs/node_set_templates/nullchain/genesis.json.tmpl @@ -207,7 +207,7 @@ "spam.protection.proposal.min.tokens": "1000000000000000000", "spam.protection.voting.min.tokens": "1000000000000000000", "validators.delegation.minAmount": "100000000000000000", - "validators.epoch.length": "5s", + "validators.epoch.length": "1m", "snapshot.interval.length": "100", "validators.vote.required": "0.67" }, diff --git a/net_confs/node_set_templates/nullchain/genesis_no_erc20.json.tmpl b/net_confs/node_set_templates/nullchain/genesis_no_erc20.json.tmpl index 5548594b..d9aa61be 100644 --- a/net_confs/node_set_templates/nullchain/genesis_no_erc20.json.tmpl +++ b/net_confs/node_set_templates/nullchain/genesis_no_erc20.json.tmpl @@ -159,7 +159,7 @@ "spam.protection.proposal.min.tokens": "1000000000000000000", "spam.protection.voting.min.tokens": "1000000000000000000", "validators.delegation.minAmount": "100000000000000000", - "validators.epoch.length": "5s", + "validators.epoch.length": "1m", "snapshot.interval.length": "100", "validators.vote.required": "0.67" },