diff --git a/integration-tests/Makefile b/integration-tests/Makefile index 4e977f40618..af3307dd395 100644 --- a/integration-tests/Makefile +++ b/integration-tests/Makefile @@ -146,7 +146,17 @@ test_node_migrations_simulated_verbose: .PHONY: test_soak_ocr test_soak_ocr: . ./scripts/check_base64_env_var.sh - go test -v -count=1 -run TestOCRSoak ./soak + go test -v -count=1 -run ^TestOCRSoak$$ ./soak + +.PHONY: test_soak_ocr_reorg_1 +test_soak_ocr_reorg_1: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled$$ ./soak + +.PHONY: test_soak_ocr_reorg_2 +test_soak_ocr_reorg_2: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$$ ./soak .PHONY: test_soak_forwarder_ocr test_soak_forwarder_ocr: diff --git a/integration-tests/soak/ocr_test.go b/integration-tests/soak/ocr_test.go index e99ecdf072d..f8120d2ae0f 100644 --- a/integration-tests/soak/ocr_test.go +++ b/integration-tests/soak/ocr_test.go @@ -13,7 +13,6 @@ import ( ) func TestOCRSoak(t *testing.T) { - l := logging.GetTestLogger(t) // Use this variable to pass in any custom EVM specific TOML values to your Chainlink nodes customNetworkTOML := `` // Uncomment below for debugging TOML issues on the node @@ -21,9 +20,27 @@ func TestOCRSoak(t *testing.T) { // fmt.Println("Using Chainlink TOML\n---------------------") // fmt.Println(networks.AddNetworkDetailedConfig(config.BaseOCR1Config, customNetworkTOML, network)) // fmt.Println("---------------------") - config, err := tc.GetConfig("Soak", tc.OCR) require.NoError(t, err, "Error getting config") + runOCRSoakTest(t, config, customNetworkTOML) +} + +func TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled(t *testing.T) { + config, err := tc.GetConfig(t.Name(), tc.OCR) + require.NoError(t, err, "Error getting config") + runOCRSoakTest(t, config, "") +} + +func TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled(t *testing.T) { + config, err := tc.GetConfig(t.Name(), tc.OCR) + require.NoError(t, err, "Error getting config") + runOCRSoakTest(t, config, "") +} + +func runOCRSoakTest(t *testing.T, config tc.TestConfig, customNetworkTOML string) { + l := logging.GetTestLogger(t) + + l.Info().Str("test", t.Name()).Msg("Starting OCR soak test") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config, false) require.NoError(t, err, "Error creating soak test") diff --git a/integration-tests/testconfig/ocr/ocr.toml b/integration-tests/testconfig/ocr/ocr.toml index 31224599d8d..30fc9655bf9 100644 --- a/integration-tests/testconfig/ocr/ocr.toml +++ b/integration-tests/testconfig/ocr/ocr.toml @@ -82,3 +82,57 @@ test_duration="15m" ocr_version="1" number_of_contracts=2 time_between_rounds="1m" + +# Soak test configuration with Geth reorg below finality with FinalityTagEnabled=false +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.NodeConfig] +CommonChainConfigTOML = """ +AutoCreateKey = true +MinContractPayment = 0 +LogPollInterval="500ms" +BackupLogPollerBlockDelay = 0 +FinalityDepth = 30 +FinalityTagEnabled = false +""" +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.Network] +selected_networks=["simulated"] +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.Network.GethReorgConfig] +enabled = true +depth = 15 +delay_create = "3s" +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.Common] +chainlink_node_funding = 100 +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.OCR] +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.OCR.Common] +test_duration="15m" +[TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.OCR.Soak] +ocr_version="1" +number_of_contracts=2 +time_between_rounds="1m" + +# Soak test configuration with Geth reorg below finality with FinalityTagEnabled=true +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.NodeConfig] +CommonChainConfigTOML = """ +AutoCreateKey = true +MinContractPayment = 0 +LogPollInterval="500ms" +BackupLogPollerBlockDelay = 0 +FinalityTagEnabled = true + +[HeadTracker] +HistoryDepth = 10 +""" +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.Network] +selected_networks=["simulated"] +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.Network.GethReorgConfig] +enabled = true +depth = 15 +delay_create = "3s" +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.Common] +chainlink_node_funding = 100 +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.OCR] +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.OCR.Common] +test_duration="15m" +[TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.OCR.Soak] +ocr_version="1" +number_of_contracts=2 +time_between_rounds="1m" \ No newline at end of file