From 806db470a794b454ffd9fe418b3c76b514b37fac Mon Sep 17 00:00:00 2001 From: Teddy Ding Date: Mon, 28 Oct 2024 16:34:07 -0400 Subject: [PATCH] flag (#126) --- indexer/backup_full_node_ap_northeast_1.tf | 11 ++++++----- indexer/full_node_ap_northeast_1.tf | 9 +++++---- indexer/snapshot_full_node_ap_northeast_1.tf | 7 ++++--- indexer/variables.tf | 6 ++++++ modules/validator/ecs.tf | 1 + modules/validator/variables.tf | 5 +++++ 6 files changed, 27 insertions(+), 12 deletions(-) diff --git a/indexer/backup_full_node_ap_northeast_1.tf b/indexer/backup_full_node_ap_northeast_1.tf index d248edf8..41b1f681 100644 --- a/indexer/backup_full_node_ap_northeast_1.tf +++ b/indexer/backup_full_node_ap_northeast_1.tf @@ -19,11 +19,12 @@ module "backup_full_node_ap_northeast_1" { IsIndexerFullNode = true } - container_chain_home = var.full_node_container_chain_home - container_p2p_persistent_peers = join(",", var.full_node_container_p2p_persistent_peers) - container_kafka_conn_str = aws_msk_cluster.main.bootstrap_brokers - container_non_validating_full_node = true - full_node_send_off_chain_messages = false + container_chain_home = var.full_node_container_chain_home + container_p2p_persistent_peers = join(",", var.full_node_container_p2p_persistent_peers) + container_optimistic_execution_enabled = var.full_node_container_optimistic_execution_enabled + container_kafka_conn_str = aws_msk_cluster.main.bootstrap_brokers + container_non_validating_full_node = true + full_node_send_off_chain_messages = false datadog_api_key = var.datadog_api_key dd_site = var.dd_site diff --git a/indexer/full_node_ap_northeast_1.tf b/indexer/full_node_ap_northeast_1.tf index 84c04301..3018efb3 100644 --- a/indexer/full_node_ap_northeast_1.tf +++ b/indexer/full_node_ap_northeast_1.tf @@ -18,10 +18,11 @@ module "full_node_ap_northeast_1" { IsIndexerFullNode = true } - container_chain_home = var.full_node_container_chain_home - container_p2p_persistent_peers = join(",", var.full_node_container_p2p_persistent_peers) - container_kafka_conn_str = aws_msk_cluster.main.bootstrap_brokers - container_non_validating_full_node = true + container_chain_home = var.full_node_container_chain_home + container_p2p_persistent_peers = join(",", var.full_node_container_p2p_persistent_peers) + container_optimistic_execution_enabled = var.full_node_container_optimistic_execution_enabled + container_kafka_conn_str = aws_msk_cluster.main.bootstrap_brokers + container_non_validating_full_node = true datadog_api_key = var.datadog_api_key dd_site = var.dd_site diff --git a/indexer/snapshot_full_node_ap_northeast_1.tf b/indexer/snapshot_full_node_ap_northeast_1.tf index 92c1af4d..8503226d 100644 --- a/indexer/snapshot_full_node_ap_northeast_1.tf +++ b/indexer/snapshot_full_node_ap_northeast_1.tf @@ -18,9 +18,10 @@ module "full_node_snapshot_ap_northeast_1" { IsIndexerFullNode = true } - container_chain_home = var.snapshot_full_node_container_chain_home - container_p2p_persistent_peers = join(",", var.full_node_container_p2p_persistent_peers) - container_non_validating_full_node = true + container_chain_home = var.snapshot_full_node_container_chain_home + container_p2p_persistent_peers = join(",", var.full_node_container_p2p_persistent_peers) + container_optimistic_execution_enabled = var.full_node_container_optimistic_execution_enabled + container_non_validating_full_node = true datadog_api_key = var.datadog_api_key dd_site = var.dd_site diff --git a/indexer/variables.tf b/indexer/variables.tf index 424cea89..09c70fb9 100644 --- a/indexer/variables.tf +++ b/indexer/variables.tf @@ -190,6 +190,12 @@ variable "full_node_container_p2p_persistent_peers" { description = "Persistent peers of the full-node, comma-separated list of @" } +variable "full_node_container_optimistic_execution_enabled" { + type = bool + description = "Whether --optimistic-execution-enabled set to true" + default = false +} + variable "full_node_ecr_repository_name" { type = string description = "ECR repo for full-node image" diff --git a/modules/validator/ecs.tf b/modules/validator/ecs.tf index f62c9b45..68e5b87d 100644 --- a/modules/validator/ecs.tf +++ b/modules/validator/ecs.tf @@ -129,6 +129,7 @@ resource "aws_ecs_task_definition" "main" { "--indexer-send-offchain-data=${tostring(var.full_node_send_off_chain_messages)}", ] : [], "--p2p.persistent_peers", var.container_p2p_persistent_peers, + "--optimistic-execution-enabled=${tostring(var.container_optimistic_execution_enabled)}", "--p2p.seed_mode=${tostring(var.container_seed_mode)}", # Reference https://github.com/tendermint/tendermint/issues/9480 for why it's a dash and not # an underscore. diff --git a/modules/validator/variables.tf b/modules/validator/variables.tf index e07c25de..07513d81 100644 --- a/modules/validator/variables.tf +++ b/modules/validator/variables.tf @@ -109,6 +109,11 @@ variable "container_p2p_persistent_peers" { description = "List of persistent peers that validator node should connect to; comma-separated." } +variable "container_optimistic_execution_enabled" { + type = bool + description = "Whether --optimistic-execution-enabled set to true for this node." +} + variable "container_kafka_conn_str" { type = string description = "Kafka connection string used by the node to send messages to the Indexer. This value should only be set for nodes connected to an Indexer."