From 66145d6ac2ea447248b7a400d58b2878d95110fc Mon Sep 17 00:00:00 2001 From: green Date: Fri, 27 Jan 2023 23:55:19 +0000 Subject: [PATCH] Added fields to configure the production mode --- .../charts/templates/fuel-core-deploy.yaml | 20 +++++++++++++++++++ deployment/charts/values.yaml | 5 +++++ deployment/scripts/.env | 16 ++++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/deployment/charts/templates/fuel-core-deploy.yaml b/deployment/charts/templates/fuel-core-deploy.yaml index 966edae4811..79cbd19207c 100644 --- a/deployment/charts/templates/fuel-core-deploy.yaml +++ b/deployment/charts/templates/fuel-core-deploy.yaml @@ -85,6 +85,26 @@ spec: {{- end}} {{- if .Values.app.reserved_nodes_only_mode }} - "--reserved_nodes_only_mode" + {{- end}} + {{- if .Values.app.poa_instant }} + - "--poa-instant" + - "{{ .Values.app.poa_instant }}" + {{- end}} + {{- if .Values.app.poa_interval_period }} + - "--poa-interval-period" + - "{{ .Values.app.poa_interval_period }}" + {{- end}} + {{- if .Values.app.poa_hybrid_min_time }} + - "--poa-hybrid-min-time" + - "{{ .Values.app.poa_hybrid_min_time }}" + {{- end}} + {{- if .Values.app.poa_hybrid_idle_time }} + - "--poa-hybrid-idle-time" + - "{{ .Values.app.poa_hybrid_idle_time }}" + {{- end}} + {{- if .Values.app.poa_hybrid_max_time }} + - "--poa-hybrid-max-time" + - "{{ .Values.app.poa_hybrid_max_time }}" {{- end}} - "--min-gas-price" - "{{ .Values.app.min_gas_price }}" diff --git a/deployment/charts/values.yaml b/deployment/charts/values.yaml index 27a53b4bbb5..727aa222b47 100644 --- a/deployment/charts/values.yaml +++ b/deployment/charts/values.yaml @@ -16,6 +16,11 @@ app: vm_backtrace: ${fuel_core_vm_backtrace} min_gas_price: ${fuel_core_min_gas_price} reserved_nodes_only_mode: ${fuel_core_reserved_only} + poa_instant: ${poa_instant} + poa_interval_period: ${poa_interval_period} + poa_hybrid_min_time: ${poa_hybrid_min_time} + poa_hybrid_idle_time: ${poa_hybrid_idle_time} + poa_hybrid_max_time: ${poa_hybrid_max_time} reserved_nodes: ${fuel_core_reserved_nodes} relayer: ${fuel_core_relayer} relayer_v2_listening_contracts: ${fuel_core_relayer_v2_listening_contracts} diff --git a/deployment/scripts/.env b/deployment/scripts/.env index d238f02b26c..6ab36e5c7e7 100644 --- a/deployment/scripts/.env +++ b/deployment/scripts/.env @@ -18,6 +18,19 @@ fuel_core_min_gas_price=0 # consensus key secret fuel_core_consensus_key_secret="dGVzdA==" +# The validator should have disabled production. It can be done by uncommenting the `fuel_core_poa_instant=false` below. +# fuel_core_poa_instant=false + +# The block producer of the network should enable one of the three modes listed below. +# Either instant +# fuel_core_poa_instant=true +# Or interval, where teh value can be `10s` in seconds, `1m` minutes, or `1h` hours. +# poa_interval_period="3s" +# Or hybrid, all 3 fields should be set. +# poa_hybrid_min_time="2s" +# poa_hybrid_idle_time="500ms" +# poa_hybrid_max_time="1h" + # allow multiple fuel-core nodes in the same namespace, also used for setting up reserved nodes fuel_core_service_name="fuel-core" fuel_core_p2p_key="0x123123123123" @@ -28,7 +41,8 @@ fuel_core_reserved_only=false # a list of other fuel core's that we must always remain connected to fuel_core_reserved_nodes="/dns4/test.test.svc.cluster.local/tcp/30333/16Uiu2HAmEB6RQuDfEZjvosRRundrEddfGqgRq51EReNV9E4pfDw5,/dns4/sentry-3/tcp/30333/16Uiu2HAmEB6RQuDfEZjvosRRundrEddfGqgRq51EReNV9E4pfDw5" -# a unique ID for this set of fuel core nodes, they will not connect to anyone with a different network name +# A unique ID for this set of fuel core nodes, they will not connect to anyone with a different network name, +# so it should be the same for the network. fuel_core_network_name="beta-3" # disables discovery using internal ip addresses