From 9e9e908dd71872fe6cc78a32e8e1528df187923f Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Fri, 21 Jun 2024 16:01:52 +0200 Subject: [PATCH 1/6] support multiple configuration names --- integration-tests/benchmark/keeper_test.go | 6 +-- .../chaos/automation_chaos_test.go | 2 +- integration-tests/chaos/ocr2vrf_chaos_test.go | 2 +- integration-tests/chaos/ocr_chaos_test.go | 2 +- .../docker/cmd/internal/commands.go | 2 +- integration-tests/experiments/gas_test.go | 2 +- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 +- .../automationv2_1/automationv2_1_test.go | 2 +- .../load/functions/functions_test.go | 14 +++--- .../load/functions/gateway_test.go | 4 +- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 +- integration-tests/load/ocr/ocr_test.go | 4 +- integration-tests/load/vrfv2/vrfv2_test.go | 4 +- .../load/vrfv2plus/vrfv2plus_test.go | 4 +- .../load/zcluster/cluster_entrypoint_test.go | 2 +- .../migration/upgrade_version_test.go | 2 +- .../reorg/automation_reorg_test.go | 2 +- integration-tests/smoke/automation_test.go | 22 ++++----- integration-tests/smoke/cron_test.go | 4 +- integration-tests/smoke/flux_test.go | 2 +- integration-tests/smoke/forwarder_ocr_test.go | 2 +- .../smoke/forwarders_ocr2_test.go | 2 +- integration-tests/smoke/keeper_test.go | 26 +++++------ integration-tests/smoke/log_poller_test.go | 4 +- integration-tests/smoke/ocr2_test.go | 2 +- integration-tests/smoke/ocr2vrf_test.go | 6 +-- integration-tests/smoke/ocr_test.go | 2 +- .../smoke/reorg_above_finality_test.go | 2 +- integration-tests/smoke/runlog_test.go | 2 +- integration-tests/smoke/vrf_test.go | 2 +- integration-tests/smoke/vrfv2_test.go | 12 ++--- integration-tests/smoke/vrfv2plus_test.go | 22 +++++---- integration-tests/soak/forwarder_ocr_test.go | 2 +- integration-tests/soak/ocr_test.go | 14 +++--- integration-tests/testconfig/testconfig.go | 45 +++++++++++-------- .../testconfig/testconfig_test.go | 2 +- .../testconfig/vrfv2plus/vrfv2plus.toml | 15 +++---- integration-tests/testsetups/ocr.go | 2 +- integration-tests/types/testconfigs.go | 2 +- 41 files changed, 136 insertions(+), 124 deletions(-) diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index a0dcad721f3..2cdd6f5eba0 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -130,7 +130,7 @@ func TestAutomationBenchmark(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err, "Error getting test type") - config, err := tc.GetConfig(testType, tc.Keeper) + config, err := tc.GetConfig([]string{testType}, tc.Keeper) require.NoError(t, err, "Error getting test config") testEnvironment, benchmarkNetwork := SetupAutomationBenchmarkEnv(t, &config) @@ -338,7 +338,7 @@ func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenc TTL: time.Hour * 720, // 30 days, NamespacePrefix: fmt.Sprintf( "automation-%s-%s-%s", - strings.ToLower(keeperTestConfig.GetConfigurationName()), + strings.ToLower(strings.Join(keeperTestConfig.GetConfigurationNames(), "_")), strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-"), strings.ReplaceAll(strings.ToLower(*keeperTestConfig.GetKeeperConfig().Common.RegistryToTest), "_", "-"), ), @@ -348,7 +348,7 @@ func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenc dbResources := performanceDbResources chainlinkResources := performanceChainlinkResources - if strings.ToLower(keeperTestConfig.GetConfigurationName()) == "soak" { + if strings.Contains(strings.ToLower(strings.Join(keeperTestConfig.GetConfigurationNames(), ",")), "soak") { chainlinkResources = soakChainlinkResources dbResources = soakDbResources } diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index a6267138d21..d091522c2cf 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -134,7 +134,7 @@ func TestAutomationChaos(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Chaos", tc.Automation) + config, err := tc.GetConfig([]string{"Chaos"}, tc.Automation) if err != nil { t.Fatal(err) } diff --git a/integration-tests/chaos/ocr2vrf_chaos_test.go b/integration-tests/chaos/ocr2vrf_chaos_test.go index 2800e763f1c..9597a57e550 100644 --- a/integration-tests/chaos/ocr2vrf_chaos_test.go +++ b/integration-tests/chaos/ocr2vrf_chaos_test.go @@ -33,7 +33,7 @@ import ( func TestOCR2VRFChaos(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - testconfig, err := tc.GetConfig("Chaos", tc.OCR2VRF) + testconfig, err := tc.GetConfig([]string{"Chaos"}, tc.OCR2VRF) if err != nil { t.Fatal(err) } diff --git a/integration-tests/chaos/ocr_chaos_test.go b/integration-tests/chaos/ocr_chaos_test.go index 99cc9869849..3aec3489c5c 100644 --- a/integration-tests/chaos/ocr_chaos_test.go +++ b/integration-tests/chaos/ocr_chaos_test.go @@ -59,7 +59,7 @@ func getDefaultOcrSettings(config *tc.TestConfig) map[string]interface{} { func TestOCRChaos(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Chaos", tc.OCR) + config, err := tc.GetConfig([]string{"Chaos"}, tc.OCR) require.NoError(t, err, "Error getting config") var overrideFn = func(_ interface{}, target interface{}) { diff --git a/integration-tests/docker/cmd/internal/commands.go b/integration-tests/docker/cmd/internal/commands.go index e05e5d89fac..9939765f7f8 100644 --- a/integration-tests/docker/cmd/internal/commands.go +++ b/integration-tests/docker/cmd/internal/commands.go @@ -28,7 +28,7 @@ var StartNodesCmd = &cobra.Command{ log.Logger = logging.GetLogger(nil, "CORE_DOCKER_ENV_LOG_LEVEL") log.Info().Msg("Starting docker test env with Chainlink nodes..") - config, err := testconfig.GetConfig("Smoke", testconfig.OCR2) + config, err := testconfig.GetConfig([]string{"Smoke"}, testconfig.OCR2) if err != nil { return err } diff --git a/integration-tests/experiments/gas_test.go b/integration-tests/experiments/gas_test.go index 88bfbcf1926..4d1f4597111 100644 --- a/integration-tests/experiments/gas_test.go +++ b/integration-tests/experiments/gas_test.go @@ -18,7 +18,7 @@ import ( func TestGasExperiment(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Soak", tc.OCR) + config, err := tc.GetConfig([]string{"Soak"}, tc.OCR) require.NoError(t, err, "Error getting config") network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 8daca81efae..e61185bb152 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 - github.com/smartcontractkit/chainlink-testing-framework v1.31.1 + github.com/smartcontractkit/chainlink-testing-framework v1.31.5-0.20240621135712-b4ed02dd4a66 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 97813f85ea1..afe3f397e7e 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1526,8 +1526,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1 h1:Qqo5VngCqbHQPfQKZneAN0L1dWXOWWd074Oo9Bex/Q0= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-testing-framework v1.31.5-0.20240621135712-b4ed02dd4a66 h1:2ElR+ZA8lP11v7Rv86exMlx8/WxhC2TrDTLwjp6BaEE= +github.com/smartcontractkit/chainlink-testing-framework v1.31.5-0.20240621135712-b4ed02dd4a66/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/load/automationv2_1/automationv2_1_test.go b/integration-tests/load/automationv2_1/automationv2_1_test.go index 1761e58f861..f381a743964 100644 --- a/integration-tests/load/automationv2_1/automationv2_1_test.go +++ b/integration-tests/load/automationv2_1/automationv2_1_test.go @@ -164,7 +164,7 @@ func TestLogTrigger(t *testing.T) { ctx := tests.Context(t) l := logging.GetTestLogger(t) - loadedTestConfig, err := tc.GetConfig("Load", tc.Automation) + loadedTestConfig, err := tc.GetConfig([]string{"Load"}, tc.Automation) if err != nil { t.Fatal(err) } diff --git a/integration-tests/load/functions/functions_test.go b/integration-tests/load/functions/functions_test.go index 49102bcaa66..374b3df705c 100644 --- a/integration-tests/load/functions/functions_test.go +++ b/integration-tests/load/functions/functions_test.go @@ -11,7 +11,7 @@ import ( ) func TestFunctionsLoad(t *testing.T) { - generalConfig, err := tc.GetConfig(tc.NoKey, tc.Functions) + generalConfig, err := tc.GetConfig([]string{""}, tc.Functions) require.NoError(t, err, "failed to get config") ft, err := SetupLocalLoadTestEnv(&generalConfig, &generalConfig) @@ -25,7 +25,7 @@ func TestFunctionsLoad(t *testing.T) { MonitorLoadStats(t, ft, labels, &generalConfig) t.Run("mumbai functions soak test http", func(t *testing.T) { - config, err := tc.GetConfig("Soak", tc.Functions) + config, err := tc.GetConfig([]string{"Soak"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -59,7 +59,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions stress test http", func(t *testing.T) { - config, err := tc.GetConfig("Stress", tc.Functions) + config, err := tc.GetConfig([]string{"Stress"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -93,7 +93,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions soak test only secrets", func(t *testing.T) { - config, err := tc.GetConfig("SecretsSoak", tc.Functions) + config, err := tc.GetConfig([]string{"SecretsSoak"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -127,7 +127,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions stress test only secrets", func(t *testing.T) { - config, err := tc.GetConfig("SecretsStress", tc.Functions) + config, err := tc.GetConfig([]string{"SecretsStress"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -161,7 +161,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions soak test real", func(t *testing.T) { - config, err := tc.GetConfig("RealSoak", tc.Functions) + config, err := tc.GetConfig([]string{"RealSoak"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -195,7 +195,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions stress test real", func(t *testing.T) { - config, err := tc.GetConfig("RealStress", tc.Functions) + config, err := tc.GetConfig([]string{"RealStress"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki diff --git a/integration-tests/load/functions/gateway_test.go b/integration-tests/load/functions/gateway_test.go index c2d5bd7c2cd..dd1092a595c 100644 --- a/integration-tests/load/functions/gateway_test.go +++ b/integration-tests/load/functions/gateway_test.go @@ -11,7 +11,7 @@ import ( ) func TestGatewayLoad(t *testing.T) { - listConfig, err := tc.GetConfig("GatewayList", tc.Functions) + listConfig, err := tc.GetConfig([]string{"GatewayList"}, tc.Functions) require.NoError(t, err) cfgl := listConfig.Logging.Loki @@ -42,7 +42,7 @@ func TestGatewayLoad(t *testing.T) { LokiConfig: wasp.NewLokiConfig(cfgl.Endpoint, cfgl.TenantId, cfgl.BasicAuth, cfgl.BearerToken), } - setConfig, err := tc.GetConfig("GatewaySet", tc.Functions) + setConfig, err := tc.GetConfig([]string{"GatewaySet"}, tc.Functions) require.NoError(t, err) secretsSetCfg := &wasp.Config{ diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index f00ba4a35d7..9552866f530 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -17,7 +17,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 - github.com/smartcontractkit/chainlink-testing-framework v1.31.1 + github.com/smartcontractkit/chainlink-testing-framework v1.31.5-0.20240621135712-b4ed02dd4a66 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index e3e9254d67c..28d304f5dd9 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1516,8 +1516,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1 h1:Qqo5VngCqbHQPfQKZneAN0L1dWXOWWd074Oo9Bex/Q0= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-testing-framework v1.31.5-0.20240621135712-b4ed02dd4a66 h1:2ElR+ZA8lP11v7Rv86exMlx8/WxhC2TrDTLwjp6BaEE= +github.com/smartcontractkit/chainlink-testing-framework v1.31.5-0.20240621135712-b4ed02dd4a66/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/load/ocr/ocr_test.go b/integration-tests/load/ocr/ocr_test.go index 15f52acbffa..db90f67b3c6 100644 --- a/integration-tests/load/ocr/ocr_test.go +++ b/integration-tests/load/ocr/ocr_test.go @@ -25,7 +25,7 @@ var ( func TestOCRLoad(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Load", tc.OCR) + config, err := tc.GetConfig([]string{"Load"}, tc.OCR) require.NoError(t, err) evmNetwork, msClient, bootstrapNode, workerNodes, err := k8s.ConnectRemote() @@ -61,7 +61,7 @@ func TestOCRLoad(t *testing.T) { func TestOCRVolume(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Volume", tc.OCR) + config, err := tc.GetConfig([]string{"Volume"}, tc.OCR) require.NoError(t, err) evmNetwork, msClient, bootstrapNode, workerNodes, err := k8s.ConnectRemote() diff --git a/integration-tests/load/vrfv2/vrfv2_test.go b/integration-tests/load/vrfv2/vrfv2_test.go index 5f7e184a488..da2b3ee8f49 100644 --- a/integration-tests/load/vrfv2/vrfv2_test.go +++ b/integration-tests/load/vrfv2/vrfv2_test.go @@ -46,7 +46,7 @@ func TestVRFV2Performance(t *testing.T) { l := logging.GetTestLogger(t) testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2) + testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2) require.NoError(t, err) cfgl := testConfig.Logging.Loki @@ -188,7 +188,7 @@ func TestVRFV2BHSPerformance(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2) + testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2) require.NoError(t, err) vrfv2Config := testConfig.VRFv2 testReporter := &testreporters.VRFV2TestReporter{} diff --git a/integration-tests/load/vrfv2plus/vrfv2plus_test.go b/integration-tests/load/vrfv2plus/vrfv2plus_test.go index 3ff9a12996e..c6928e73155 100644 --- a/integration-tests/load/vrfv2plus/vrfv2plus_test.go +++ b/integration-tests/load/vrfv2plus/vrfv2plus_test.go @@ -45,7 +45,7 @@ func TestVRFV2PlusPerformance(t *testing.T) { l := logging.GetTestLogger(t) testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2Plus) + testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2Plus) require.NoError(t, err) cfgl := testConfig.Logging.Loki @@ -188,7 +188,7 @@ func TestVRFV2PlusBHSPerformance(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2Plus) + testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2Plus) require.NoError(t, err) vrfv2PlusConfig := testConfig.VRFv2Plus testReporter := &testreporters.VRFV2PlusTestReporter{} diff --git a/integration-tests/load/zcluster/cluster_entrypoint_test.go b/integration-tests/load/zcluster/cluster_entrypoint_test.go index 35b3ee422ca..aace97b0825 100644 --- a/integration-tests/load/zcluster/cluster_entrypoint_test.go +++ b/integration-tests/load/zcluster/cluster_entrypoint_test.go @@ -10,7 +10,7 @@ import ( ) func TestClusterEntrypoint(t *testing.T) { - config, err := tc.GetConfig("Load", tc.OCR) + config, err := tc.GetConfig([]string{"Load"}, tc.OCR) require.NoError(t, err) cfgBase64, err := config.AsBase64() require.NoError(t, err) diff --git a/integration-tests/migration/upgrade_version_test.go b/integration-tests/migration/upgrade_version_test.go index 4c7b275e299..a17f00e179f 100644 --- a/integration-tests/migration/upgrade_version_test.go +++ b/integration-tests/migration/upgrade_version_test.go @@ -17,7 +17,7 @@ func TestVersionUpgrade(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Migration", tc.Node) + config, err := tc.GetConfig([]string{"Migration"}, tc.Node) require.NoError(t, err, "Error getting config") err = config.ChainlinkUpgradeImage.Validate() diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index e41244e55e1..53d7255d82f 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -122,7 +122,7 @@ func TestAutomationReorg(t *testing.T) { registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Reorg", tc.Automation) + config, err := tc.GetConfig([]string{"Reorg"}, tc.Automation) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index 50b5fb96230..365978244cf 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -119,7 +119,7 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) { t.Parallel() l := logging.GetTestLogger(t) - cfg, err := tc.GetConfig("Smoke", tc.Automation) + cfg, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") if nodeUpgrade { @@ -270,7 +270,7 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -452,7 +452,7 @@ func TestAutomationAddFunds(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( t, registryVersion, automationDefaultRegistryConfig(config), false, false, &config, @@ -529,7 +529,7 @@ func TestAutomationPauseUnPause(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -628,7 +628,7 @@ func TestAutomationRegisterUpkeep(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -722,7 +722,7 @@ func TestAutomationPauseRegistry(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -800,7 +800,7 @@ func TestAutomationKeeperNodesDown(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -906,7 +906,7 @@ func TestAutomationPerformSimulation(t *testing.T) { registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -978,7 +978,7 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( t, registryVersion, automationDefaultRegistryConfig(config), false, false, &config, @@ -1132,7 +1132,7 @@ func TestUpdateCheckData(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -1212,7 +1212,7 @@ func TestSetOffchainConfigWithMaxGasPrice(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/cron_test.go b/integration-tests/smoke/cron_test.go index 6f864b2e49f..98c1fe0caf7 100644 --- a/integration-tests/smoke/cron_test.go +++ b/integration-tests/smoke/cron_test.go @@ -21,7 +21,7 @@ func TestCronBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Cron) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Cron) if err != nil { t.Fatal(err) } @@ -76,7 +76,7 @@ func TestCronJobReplacement(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Cron) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Cron) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/flux_test.go b/integration-tests/smoke/flux_test.go index 05b75da2237..d8773690b23 100644 --- a/integration-tests/smoke/flux_test.go +++ b/integration-tests/smoke/flux_test.go @@ -27,7 +27,7 @@ func TestFluxBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Flux) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Flux) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/forwarder_ocr_test.go b/integration-tests/smoke/forwarder_ocr_test.go index 0377553191b..a249775dc6a 100644 --- a/integration-tests/smoke/forwarder_ocr_test.go +++ b/integration-tests/smoke/forwarder_ocr_test.go @@ -24,7 +24,7 @@ func TestForwarderOCRBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.ForwarderOcr) + config, err := tc.GetConfig([]string{"Smoke"}, tc.ForwarderOcr) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/forwarders_ocr2_test.go b/integration-tests/smoke/forwarders_ocr2_test.go index 3970a0b43b1..863b36e4ede 100644 --- a/integration-tests/smoke/forwarders_ocr2_test.go +++ b/integration-tests/smoke/forwarders_ocr2_test.go @@ -25,7 +25,7 @@ func TestForwarderOCR2Basic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.ForwarderOcr2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.ForwarderOcr2) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 21e1aa6e08f..4ff1c90bd1e 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -89,7 +89,7 @@ func TestKeeperBasicSmoke(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -170,7 +170,7 @@ func TestKeeperBlockCountPerTurn(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -314,7 +314,7 @@ func TestKeeperSimulation(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -393,7 +393,7 @@ func TestKeeperCheckPerformGasLimit(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -530,7 +530,7 @@ func TestKeeperRegisterUpkeep(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -626,7 +626,7 @@ func TestKeeperAddFunds(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -701,7 +701,7 @@ func TestKeeperRemove(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -786,7 +786,7 @@ func TestKeeperPauseRegistry(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -853,7 +853,7 @@ func TestKeeperPauseRegistry(t *testing.T) { func TestKeeperMigrateRegistry(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Error getting config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -956,7 +956,7 @@ func TestKeeperNodeDown(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -1066,7 +1066,7 @@ type nodeAndJob struct { func TestKeeperPauseUnPauseUpkeep(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -1158,7 +1158,7 @@ func TestKeeperPauseUnPauseUpkeep(t *testing.T) { func TestKeeperUpdateCheckData(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -1264,7 +1264,7 @@ func TestKeeperJobReplacement(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) registryVersion := ethereum.RegistryVersion_1_3 - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) diff --git a/integration-tests/smoke/log_poller_test.go b/integration-tests/smoke/log_poller_test.go index 05be29a90bc..d02daec2114 100644 --- a/integration-tests/smoke/log_poller_test.go +++ b/integration-tests/smoke/log_poller_test.go @@ -91,7 +91,7 @@ func TestLogPollerReplayFinalityTag(t *testing.T) { // HELPER FUNCTIONS func executeBasicLogPollerTest(t *testing.T, logScannerSettings test_env.ChainlinkNodeLogScannerSettings) { - testConfig, err := tc.GetConfig(t.Name(), tc.LogPoller) + testConfig, err := tc.GetConfig([]string{t.Name()}, tc.LogPoller) require.NoError(t, err, "Error getting config") overrideEphemeralAddressesCount(&testConfig) @@ -174,7 +174,7 @@ func executeBasicLogPollerTest(t *testing.T, logScannerSettings test_env.Chainli } func executeLogPollerReplay(t *testing.T, consistencyTimeout string) { - testConfig, err := tc.GetConfig(t.Name(), tc.LogPoller) + testConfig, err := tc.GetConfig([]string{t.Name()}, tc.LogPoller) require.NoError(t, err, "Error getting config") overrideEphemeralAddressesCount(&testConfig) diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 09a9a222494..56a95c50bda 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -139,7 +139,7 @@ func TestOCRv2JobReplacement(t *testing.T) { } func prepareORCv2SmokeTestEnv(t *testing.T, testData ocr2test, l zerolog.Logger, firstRoundResult int) (*test_env.CLClusterTestEnv, []contracts.OffchainAggregatorV2, *seth.Client) { - config, err := tc.GetConfig("Smoke", tc.OCR2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.OCR2) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/ocr2vrf_test.go b/integration-tests/smoke/ocr2vrf_test.go index b99e313a026..5d2433fc4c8 100644 --- a/integration-tests/smoke/ocr2vrf_test.go +++ b/integration-tests/smoke/ocr2vrf_test.go @@ -35,7 +35,7 @@ func TestOCR2VRFRedeemModel(t *testing.T) { // remember to add TOML testConfig for Chainlink node before trying to run this test in future t.Skip("VRFv3 is on pause, skipping") l := logging.GetTestLogger(t) - testConfig, err := testconfig.GetConfig("Smoke", testconfig.OCR2) + testConfig, err := testconfig.GetConfig([]string{"Smoke"}, testconfig.OCR2) if err != nil { t.Fatal(err) } @@ -98,7 +98,7 @@ func TestOCR2VRFFulfillmentModel(t *testing.T) { t.Parallel() t.Skip("VRFv3 is on pause, skipping") l := logging.GetTestLogger(t) - testConfig, err := testconfig.GetConfig("Smoke", testconfig.OCR2) + testConfig, err := testconfig.GetConfig([]string{"Smoke"}, testconfig.OCR2) if err != nil { t.Fatal(err) } @@ -158,7 +158,7 @@ func TestOCR2VRFFulfillmentModel(t *testing.T) { func setupOCR2VRFEnvironment(t *testing.T) (testEnvironment *environment.Environment, testNetwork blockchain.EVMNetwork) { if ocr2vrfSmokeConfig == nil { - c, err := testconfig.GetConfig("Smoke", testconfig.OCR2VRF) + c, err := testconfig.GetConfig([]string{"Smoke"}, testconfig.OCR2VRF) require.NoError(t, err, "Error getting config") ocr2vrfSmokeConfig = &c } diff --git a/integration-tests/smoke/ocr_test.go b/integration-tests/smoke/ocr_test.go index d989517278e..67f8c44f8a1 100644 --- a/integration-tests/smoke/ocr_test.go +++ b/integration-tests/smoke/ocr_test.go @@ -80,7 +80,7 @@ func TestOCRJobReplacement(t *testing.T) { } func prepareORCv1SmokeTestEnv(t *testing.T, l zerolog.Logger, firstRoundResult int64) (*test_env.CLClusterTestEnv, []contracts.OffchainAggregator, *seth.Client) { - config, err := tc.GetConfig("Smoke", tc.OCR) + config, err := tc.GetConfig([]string{"Smoke"}, tc.OCR) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/reorg_above_finality_test.go b/integration-tests/smoke/reorg_above_finality_test.go index 829aa66fdce..e7b9e4a2183 100644 --- a/integration-tests/smoke/reorg_above_finality_test.go +++ b/integration-tests/smoke/reorg_above_finality_test.go @@ -19,7 +19,7 @@ func TestReorgAboveFinality_FinalityTagDisabled(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig(t.Name(), tc.LogPoller) + config, err := tc.GetConfig([]string{t.Name()}, tc.LogPoller) require.NoError(t, err, "Error getting config") privateNetworkConf, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/runlog_test.go b/integration-tests/smoke/runlog_test.go index 862ac911b36..515d9dea33c 100644 --- a/integration-tests/smoke/runlog_test.go +++ b/integration-tests/smoke/runlog_test.go @@ -28,7 +28,7 @@ func TestRunLogBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.RunLog) + config, err := tc.GetConfig([]string{"Smoke"}, tc.RunLog) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/vrf_test.go b/integration-tests/smoke/vrf_test.go index 0f706f1576b..a341533551c 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -186,7 +186,7 @@ func TestVRFJobReplacement(t *testing.T) { } func prepareVRFtestEnv(t *testing.T, l zerolog.Logger) (*test_env.CLClusterTestEnv, *vrfv1.Contracts, *seth.Client) { - config, err := tc.GetConfig("Smoke", tc.VRF) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRF) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/vrfv2_test.go b/integration-tests/smoke/vrfv2_test.go index 70fcb4bcf7d..877b8353914 100644 --- a/integration-tests/smoke/vrfv2_test.go +++ b/integration-tests/smoke/vrfv2_test.go @@ -52,7 +52,7 @@ func TestVRFv2Basic(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -569,7 +569,7 @@ func TestVRFv2MultipleSendingKeys(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) if err != nil { t.Fatal(err) } @@ -677,7 +677,7 @@ func TestVRFOwner(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) require.NoError(t, err, "Error getting config") chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID vrfv2Config := config.VRFv2 @@ -813,7 +813,7 @@ func TestVRFV2WithBHS(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1031,7 +1031,7 @@ func TestVRFV2NodeReorg(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] @@ -1210,7 +1210,7 @@ func TestVRFv2BatchFulfillmentEnabledDisabled(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index b713cdf9409..634d183418c 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -49,8 +49,12 @@ func TestVRFv2Plus(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") + + config, err = tc.GetConfig([]string{"Smoke", config.GetNetworkConfig().SelectedNetworks[0], config.GetNetworkConfig().SelectedNetworks[0] + "-Smoke"}, tc.VRFv2Plus) + require.NoError(t, err, "Error getting config") + vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -746,7 +750,7 @@ func TestVRFv2PlusMultipleSendingKeys(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -851,7 +855,7 @@ func TestVRFv2PlusMigration(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1245,7 +1249,7 @@ func TestVRFV2PlusWithBHS(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1474,7 +1478,7 @@ func TestVRFV2PlusWithBHF(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1631,7 +1635,7 @@ func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1800,7 +1804,7 @@ func TestVRFv2PlusPendingBlockSimulationAndZeroConfirmationDelays(t *testing.T) ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1894,7 +1898,7 @@ func TestVRFv2PlusNodeReorg(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] @@ -2071,7 +2075,7 @@ func TestVRFv2PlusBatchFulfillmentEnabledDisabled(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/soak/forwarder_ocr_test.go b/integration-tests/soak/forwarder_ocr_test.go index 37837c666aa..4c8a0be5eec 100644 --- a/integration-tests/soak/forwarder_ocr_test.go +++ b/integration-tests/soak/forwarder_ocr_test.go @@ -22,7 +22,7 @@ ForwardersEnabled = true` // fmt.Println(networks.AddNetworkDetailedConfig(config.BaseOCRP2PV1Config, customNetworkTOML, network)) // fmt.Println("---------------------") - config, err := tc.GetConfig("Soak", tc.OCR) + config, err := tc.GetConfig([]string{"Soak"}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config, testsetups.WithForwarderFlow(true)) diff --git a/integration-tests/soak/ocr_test.go b/integration-tests/soak/ocr_test.go index 290cc00255c..79e59886894 100644 --- a/integration-tests/soak/ocr_test.go +++ b/integration-tests/soak/ocr_test.go @@ -29,7 +29,7 @@ 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) + config, err := tc.GetConfig([]string{"Soak"}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") @@ -37,7 +37,7 @@ func TestOCRSoak(t *testing.T) { } func TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") @@ -45,7 +45,7 @@ func TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled(t *testing.T) { } func TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") @@ -53,7 +53,7 @@ func TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled(t *testing.T) { } func TestOCRSoak_GasSpike(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") @@ -62,7 +62,7 @@ func TestOCRSoak_GasSpike(t *testing.T) { // TestOCRSoak_ChangeBlockGasLimit changes next block gas limit and sets it to percentage of last gasUsed in previous block creating congestion func TestOCRSoak_ChangeBlockGasLimit(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") @@ -71,7 +71,7 @@ func TestOCRSoak_ChangeBlockGasLimit(t *testing.T) { // TestOCRSoak_RPCDownForAllCLNodes simulates a network chaos by bringing down network to RPC node for all Chainlink Nodes func TestOCRSoak_RPCDownForAllCLNodes(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") require.True(t, config.Network.IsSimulatedGethSelected(), "This test requires simulated geth") @@ -103,7 +103,7 @@ func TestOCRSoak_RPCDownForAllCLNodes(t *testing.T) { // TestOCRSoak_RPCDownForAllCLNodes simulates a network chaos by bringing down network to RPC node for 50% of Chainlink Nodes func TestOCRSoak_RPCDownForHalfCLNodes(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") require.True(t, config.Network.IsSimulatedGethSelected(), "This test requires simulated geth") diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 624c374491b..631eea4e281 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -84,7 +84,7 @@ type TestConfig struct { VRFv2 *vrfv2_config.Config `toml:"VRFv2"` VRFv2Plus *vrfv2plus_config.Config `toml:"VRFv2Plus"` - ConfigurationName string `toml:"-"` + ConfigurationNames []string `toml:"-"` } var embeddedConfigs embed.FS @@ -196,8 +196,8 @@ func (c TestConfig) GetOCRConfig() *ocr_config.Config { return c.OCR } -func (c TestConfig) GetConfigurationName() string { - return c.ConfigurationName +func (c TestConfig) GetConfigurationNames() []string { + return c.ConfigurationNames } func (c TestConfig) GetSethConfig() *seth.Config { @@ -262,12 +262,14 @@ const ( NoKey = "NO_KEY" ) -func GetConfig(configurationName string, product Product) (TestConfig, error) { +func GetConfig(configurationNames []string, product Product) (TestConfig, error) { logger := logging.GetTestLogger(nil) - configurationName = strings.ReplaceAll(configurationName, "/", "_") - configurationName = strings.ReplaceAll(configurationName, " ", "_") - configurationName = cases.Title(language.English, cases.NoLower).String(configurationName) + for idx, configurationName := range configurationNames { + configurationNames[idx] = strings.ReplaceAll(configurationName, "/", "_") + configurationNames[idx] = strings.ReplaceAll(configurationName, " ", "_") + configurationNames[idx] = cases.Title(language.English, cases.NoLower).String(configurationName) + } fileNames := []string{ "default.toml", fmt.Sprintf("%s.toml", product), @@ -275,8 +277,9 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { } testConfig := TestConfig{} - testConfig.ConfigurationName = configurationName - logger.Debug().Msgf("Will apply configuration named '%s' if it is found in any of the configs", configurationName) + testConfig.ConfigurationNames = configurationNames + + logger.Debug().Msgf("Will apply configurations named '%s' if they are found in any of the configs", strings.Join(configurationNames, ",")) // read embedded configs is build tag "embed" is set // this makes our life much easier when using a binary @@ -292,9 +295,11 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { return TestConfig{}, errors.Wrapf(err, "error reading embedded config") } - err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, file) - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error unmarshalling embedded config") + for _, configurationName := range configurationNames { + err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, file) + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error unmarshalling embedded config %s", embeddedFiles) + } } } } else { @@ -316,9 +321,11 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath) } - err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, content) - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath) + for _, configurationName := range configurationNames { + err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, content) + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath) + } } } } @@ -332,9 +339,11 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { return TestConfig{}, err } - err = ctf_config.BytesToAnyTomlStruct(logger, Base64OverrideEnvVarName, configurationName, &testConfig, decoded) - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error unmarshaling base64 config") + for _, configurationName := range configurationNames { + err = ctf_config.BytesToAnyTomlStruct(logger, Base64OverrideEnvVarName, configurationName, &testConfig, decoded) + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error unmarshaling base64 config") + } } } else { logger.Debug().Msg("Base64 config override from environment variable not found") diff --git a/integration-tests/testconfig/testconfig_test.go b/integration-tests/testconfig/testconfig_test.go index fd5230dac2d..91d2524fcf0 100644 --- a/integration-tests/testconfig/testconfig_test.go +++ b/integration-tests/testconfig/testconfig_test.go @@ -76,7 +76,7 @@ func TestBase64ConfigRead(t *testing.T) { testConfigEncoded := base64.StdEncoding.EncodeToString(configMarshalled) os.Setenv(Base64OverrideEnvVarName, testConfigEncoded) - readConfig, err := GetConfig("test", Automation) + readConfig, err := GetConfig([]string{"test"}, Automation) require.NoError(t, err, "Error reading config") require.NotNil(t, readConfig.Automation, "Automation config read from base64 is nil") diff --git a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml index 717a62e997f..0185a45cce8 100644 --- a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml +++ b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml @@ -143,14 +143,6 @@ bhs_test_duration = "10s" bhs_test_rate_limit_unit_duration = "3s" bhs_test_rps = 1 -[Smoke.VRFv2.Performance] -test_duration = "10s" -rate_limit_unit_duration = "3s" -rps = 1 -bhs_test_duration = "10s" -bhs_test_rate_limit_unit_duration = "3s" -bhs_test_rps = 1 - #SOAK TEST CONFIG [Soak.Common] chainlink_node_funding = 0.1 @@ -211,3 +203,10 @@ bhs_test_duration = "1m" bhs_test_rate_limit_unit_duration = "3s" bhs_test_rps = 1 +[POLYGON_AMOY-Smoke.VRFv2Plus.General] +cl_node_max_gas_price_gwei = 21231231 +subscription_funding_amount_native = 66 + +[POLYGON_AMOY-Load.VRFv2Plus.General] +cl_node_max_gas_price_gwei = 21231231 +subscription_funding_amount_native = 1 diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index be11de6313b..2ebf603d79a 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -374,7 +374,7 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { // Run starts the OCR soak test func (o *OCRSoakTest) Run() { - config, err := tc.GetConfig("soak", tc.OCR) + config, err := tc.GetConfig([]string{"soak"}, tc.OCR) require.NoError(o.t, err, "Error getting config") ctx, cancel := context.WithTimeout(testcontext.Get(o.t), time.Second*5) diff --git a/integration-tests/types/testconfigs.go b/integration-tests/types/testconfigs.go index 58eb1a7c8cf..ee8a614baef 100644 --- a/integration-tests/types/testconfigs.go +++ b/integration-tests/types/testconfigs.go @@ -35,7 +35,7 @@ type KeeperBenchmarkTestConfig interface { ctf_config.GlobalTestConfig tc.CommonTestConfig tc.KeeperTestConfig - ctf_config.NamedConfiguration + ctf_config.NamedConfigurations testreporters.GrafanaURLProvider } From dcf1bf21f9ed3101dae7df204377099a6f3311eb Mon Sep 17 00:00:00 2001 From: Ilja Pavlovs Date: Tue, 25 Jun 2024 19:27:58 +0300 Subject: [PATCH 2/6] TT-1090: adding code to investigate issue with incorrect config being used --- integration-tests/smoke/vrfv2plus_test.go | 21 +++ .../testconfig/testconfig_utils.go | 19 +++ .../testconfig/vrfv2plus/vrfv2plus.toml | 146 +++++++++++++++++- 3 files changed, 182 insertions(+), 4 deletions(-) diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index 634d183418c..fb6198a5aee 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -37,6 +37,27 @@ import ( it_utils "github.com/smartcontractkit/chainlink/integration-tests/utils" ) +func TestVRFv2PlusConfig(t *testing.T) { + t.Parallel() + + config, err := tc.GetChainAndTestTypeSpecificConfig(tc.VRFv2Plus, "Smoke") + require.NoError(t, err, "Error getting config") + + //config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + //require.NoError(t, err, "Error getting config") + + fmt.Println("config.GetNetworkConfig().SelectedNetworks[0]", config.GetNetworkConfig().SelectedNetworks[0]) + fmt.Println(config.GetNetworkConfig().SelectedNetworks[0] + "-Smoke") + + //config, err = tc.GetConfig([]string{"Smoke", config.GetNetworkConfig().SelectedNetworks[0], config.GetNetworkConfig().SelectedNetworks[0] + "-Smoke"}, tc.VRFv2Plus) + //require.NoError(t, err, "Error getting config") + + //todo - use_existing_env in [POLYGON_AMOY.VRFv2Plus.General] is set to true, but real value is false + fmt.Println("UseExistingEnv", *config.VRFv2Plus.General.UseExistingEnv) + fmt.Println("TestDuration", config.VRFv2Plus.Performance.TestDuration.Duration.String()) + fmt.Println("RateLimitUnitDuration", config.VRFv2Plus.Performance.RateLimitUnitDuration.Duration.String()) + +} func TestVRFv2Plus(t *testing.T) { t.Parallel() var ( diff --git a/integration-tests/testconfig/testconfig_utils.go b/integration-tests/testconfig/testconfig_utils.go index d4290689bc0..f113f7d4806 100644 --- a/integration-tests/testconfig/testconfig_utils.go +++ b/integration-tests/testconfig/testconfig_utils.go @@ -68,3 +68,22 @@ selected_networks=` return fmt.Errorf(finalErrStr) } + +func GetChainAndTestTypeSpecificConfig(product Product, testType string) (TestConfig, error) { + config, err := GetConfig([]string{testType}, product) + if err != nil { + return TestConfig{}, fmt.Errorf("error getting config: %w", err) + } + config, err = GetConfig( + []string{ + testType, + config.GetNetworkConfig().SelectedNetworks[0], + fmt.Sprintf("%s-%s", config.GetNetworkConfig().SelectedNetworks[0], testType), + }, + product, + ) + if err != nil { + return TestConfig{}, fmt.Errorf("error getting config: %w", err) + } + return config, err +} diff --git a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml index 0185a45cce8..07ce1203a05 100644 --- a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml +++ b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml @@ -203,10 +203,148 @@ bhs_test_duration = "1m" bhs_test_rate_limit_unit_duration = "3s" bhs_test_rps = 1 +### POLYGON AMOY Config + +[POLYGON_AMOY.VRFv2Plus.General] +use_existing_env = true +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +# NOTE - with test might fail with minimum_confirmations = 0 +minimum_confirmations = 3 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# as per https://smartcontract-it.atlassian.net/wiki/spaces/VRF/pages/666173463/VRF+v2.5+Current+Deployments#Testnet-Configs.3 +# CL Node config +cl_node_max_gas_price_gwei = 200 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "19823132181656390000" +staleness_seconds = 172_800 +gas_after_payment_calculation = 48_500 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 84 +link_premium_percentage = 70 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 99_500 +coordinator_gas_overhead_link = 121_500 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 84 +coordinator_link_premium_percentage = 70 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 3.0 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "2s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "latest" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "2s" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[POLYGON_AMOY.VRFv2Plus.ExistingEnv] +coordinator_address = "0x7541EbaE23f32B4A1A2e7a8Cbf9da9582767A9B4" +consumer_address = "" +sub_id = "" +key_hash = "0xd360445bacd26df47086ccf255c4f932d297ed8d5c7334b51eed32f61c541601" +#key_hash = "0x2328cbee29e32d0b6662d6df82ff0fea7be300bd310561c92f515c9ee19464f1" +#key_hash = "0x25f4e2d0509f42ec77db5380f3433a89fe623fa75f65d5b398d5f498327be4dd" +create_fund_subs_and_add_consumers = true +link_address = "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904" +node_sending_key_funding_min = 10 +node_sending_keys = [ + "0xD96013C241f1741C35a135321969f92Aae02A12F", + "0x0580E61a5523F5CAAC4968E4f8FE63b59596BdD7", + "0xd15FcEa6a6AA17085930Fbd5647A9F7fD2Ff58b8", + "0xB7277cBb6E7028AE65235b8ee9201AcBb14B11d4", + "0x6D36a1dC1eEd25C75961E989c4d01Cd4453bE465", + "0xd299Cd7C0073b71e620bf8A3bfD50F75c0b49af8", + "0x48BE7BAED0b65776D85DF971fA901c637cFC5e87", + # BHS + "0x638372de870eF0F8E675A3f67F18D5bd4A2fd804", + "0xF9eF03816411D037202d5ed4457dC1613e3bd729", + "0xCD66973f8fbaE787211EC20228c6bd90D83562A8", + "0x242ea1F4Bb72EF643B2D8EF22e18a89f00742F40", + "0xaA09B4F9B5710b239fdbf1D0f535dd7f86F91219", + "0xe6b72B647B8B45C5562F7a5259E187889C747d3b", + "0x2c1185C4d3B0B4a577d4079Ee193A4e293164D9d" +] + +#SMOKE TEST CONFIG [POLYGON_AMOY-Smoke.VRFv2Plus.General] -cl_node_max_gas_price_gwei = 21231231 -subscription_funding_amount_native = 66 +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5 +subscription_funding_amount_native = 1 +subscription_refunding_amount_link = 5 +subscription_refunding_amount_native = 1 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "15m" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[POLYGON_AMOY-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "15s" +rps = 1 + + +#SOAK TEST CONFIG +[POLYGON_AMOY-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 500 +subscription_funding_amount_native = 200 + +[POLYGON_AMOY-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG [POLYGON_AMOY-Load.VRFv2Plus.General] -cl_node_max_gas_price_gwei = 21231231 -subscription_funding_amount_native = 1 +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[POLYGON_AMOY-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[POLYGON_AMOY-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[POLYGON_AMOY-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + From b4d943f5d1d49694de765a4faa81a5a63c80955a Mon Sep 17 00:00:00 2001 From: Ilja Pavlovs Date: Tue, 25 Jun 2024 19:46:06 +0300 Subject: [PATCH 3/6] TT-1090: adding code to investigate issue with incorrect config being used --- integration-tests/smoke/vrfv2plus_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index fb6198a5aee..31b5e821708 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -57,6 +57,12 @@ func TestVRFv2PlusConfig(t *testing.T) { fmt.Println("TestDuration", config.VRFv2Plus.Performance.TestDuration.Duration.String()) fmt.Println("RateLimitUnitDuration", config.VRFv2Plus.Performance.RateLimitUnitDuration.Duration.String()) + //todo - resolve issue - config from default config is used, instead of the one from the network + fmt.Println("FallbackWeiPerUnitLink", *config.VRFv2Plus.General.FallbackWeiPerUnitLink) + //todo - resolve issue - config from default config is used, instead of the one from the network + fmt.Println("VRFv2Plus.ExistingEnv.CoordinatorAddress", *config.VRFv2Plus.ExistingEnvConfig.CoordinatorAddress) + + // } func TestVRFv2Plus(t *testing.T) { t.Parallel() From 5b0cbb2e834e382488775e2b9f8d614e6f8176b9 Mon Sep 17 00:00:00 2001 From: Ilja Pavlovs Date: Wed, 26 Jun 2024 16:49:38 +0300 Subject: [PATCH 4/6] TT-1090: adding toml test config for remaining chains for VRF v2 Plus --- .../testconfig/vrfv2plus/vrfv2plus.toml | 508 +++++++++++++++++- 1 file changed, 505 insertions(+), 3 deletions(-) diff --git a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml index 07ce1203a05..1d2af760840 100644 --- a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml +++ b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml @@ -206,9 +206,7 @@ bhs_test_rps = 1 ### POLYGON AMOY Config [POLYGON_AMOY.VRFv2Plus.General] -use_existing_env = true #todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request -# NOTE - with test might fail with minimum_confirmations = 0 minimum_confirmations = 3 # Consumer Request config @@ -216,7 +214,6 @@ subscription_billing_type = "LINK_AND_NATIVE" callback_gas_limit = 1000000 # NEW ENV CONFIG -# as per https://smartcontract-it.atlassian.net/wiki/spaces/VRF/pages/666173463/VRF+v2.5+Current+Deployments#Testnet-Configs.3 # CL Node config cl_node_max_gas_price_gwei = 200 number_of_sending_keys_to_create = 0 @@ -347,4 +344,509 @@ test_duration = "2m" rate_limit_unit_duration = "3s" rps = 1 +### ARBITRUM SEPOLIA Config + +[ARBITRUM_SEPOLIA.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 +subscription_billing_type = "LINK_AND_NATIVE" + +cl_node_max_gas_price_gwei = 50 +number_of_sending_keys_to_create = 0 + +# Coordinator config +callback_gas_limit = 1000000 +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "5352799651145251" +staleness_seconds = 172_800 +gas_after_payment_calculation = 56000 +fulfillment_flat_fee_native_ppm=0 +fulfillment_flat_fee_link_discount_ppm=0 +native_premium_percentage=60 +link_premium_percentage=50 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 104_500 +coordinator_gas_overhead_link = 126_500 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage=60 +coordinator_link_premium_percentage=50 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 3.0 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "300ms" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block="pending" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "300ms" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[ARBITRUM_SEPOLIA.VRFv2Plus.ExistingEnv] +coordinator_address = "0xF7ba1Cf141F9729abC43c146dc2bf86EbcfD8603" +consumer_address = "" +sub_id = "" +key_hash = "0xe13aa26fe94bfcd2ae055911f4d3bf1aed54ca6cf77af34e17f918802fd69ba1" +create_fund_subs_and_add_consumers = true +link_address = "0xb1D4538B4571d411F07960EF2838Ce337FE1E80E" +node_sending_key_funding_min = 20 +node_sending_keys = [ + "0xbE21ae371FcA1aC2d8A152e707D21e68d7d99252", + "0xb13e9BA0aE94FD3b89B13b092e6d41614c805134", + "0x27aa703e585Ee165B7c977EAA652eCFa13b08294", + "0x9324643ACD2ec5b0813488E5EdAb64C3758ae4Ee", + "0x7CBA8c8e86f23f23363051650Fe5AE4DE78c3652", + "0x9A0143a4BAB55A826331A8ef82462557633aA016", + "0xD4259633F8e87949F683433a17e1fFcCE27865AC", + "0x5e47B71d6F95f68cd5538907ec6A9635b1Fe30Fa", + "0xa850a1a257FDF439c8f854ce3b89dd5b6F411827", + "0x7c82D56087c10aF2c3970f9a9Be7786B2850ce91", + "0x9545CB59956347d3debf27f5029754bBE1d398FA", + "0xEb8C69ac19709f27A97FB4A561f51AD2F9b34c5B", + # BHS + "0xf0e8cF7Fbd28Fc4D412B76B744CDA269df671F8e", + "0x317A02A658d12E5Bb4A6270171E7385928dD2d53", + "0x480f1dbcEc118Bd91e4dbb7e45bFa4A73180d21f", + "0x500a2662FaF981EC4669f791349D37Cbf1bE7d85", + "0x2ad350374B904c10B47c64ECdBD9e70BB0833Be2", + "0x0b946F0bF4e63C12b5157137f1c130f0788bC1b1", + # BHF + "0x571BBF4a5b07fc3F47Bd3B65CE2FE73739f86623" +] + +#SMOKE TEST CONFIG +[ARBITRUM_SEPOLIA-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5 +subscription_funding_amount_native = 1 +subscription_refunding_amount_link = 20 +subscription_refunding_amount_native = 10 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "100s" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[ARBITRUM_SEPOLIA-Smoke.VRFv2Plus.Performance] +test_duration = "1s" +rate_limit_unit_duration = "10s" +rps = 1 + + +#SOAK TEST CONFIG +[ARBITRUM_SEPOLIA-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 4 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 100 + +[ARBITRUM_SEPOLIA-Soak.VRFv2Plus.Performance] +test_duration = "1h" +rate_limit_unit_duration = "10s" +rps = 1 + +# LOAD TEST CONFIG +[ARBITRUM_SEPOLIA-Load.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 100 +subscription_funding_amount_native = 60 + +[ARBITRUM_SEPOLIA-Load.VRFv2Plus.Performance] +test_duration = "30m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[ARBITRUM_SEPOLIA-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[ARBITRUM_SEPOLIA-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +### AVALANCHE FUJI Config +[AVALANCHE_FUJI.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 300 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "378709808510249900" +staleness_seconds = 172_800 +gas_after_payment_calculation = 56_000 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 60 +link_premium_percentage = 50 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 107_000 +coordinator_gas_overhead_link = 129_000 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 60 +coordinator_link_premium_percentage = 50 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 3.0 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "2s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "pending" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "2s" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[AVALANCHE_FUJI.VRFv2Plus.ExistingEnv] +coordinator_address = "0xE122bf3Badd6545bDec5D4627a6DAd16352A1b36" +consumer_address = "" +sub_id = "" +key_hash = "0x5b03254a80ea3eb72139ff0423cb88be42612780c3dd25f1d95a5ba7708a4be1" +create_fund_subs_and_add_consumers = true +link_address = "0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846" +node_sending_key_funding_min = 50 +node_sending_keys = [ + "0x3D7Da5D6A23CA2240CE576C8638C1798a023920a", + # BHS + "0x72c8565279430F5179b0090d51ab8BB53Da323B5" +] + +#SMOKE TEST CONFIG +[AVALANCHE_FUJI-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 20 +subscription_funding_amount_native = 20 +subscription_refunding_amount_link = 20 +subscription_refunding_amount_native = 20 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "10m" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[AVALANCHE_FUJI-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "10s" +rps = 1 + + +#SOAK TEST CONFIG +[AVALANCHE_FUJI-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[AVALANCHE_FUJI-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[AVALANCHE_FUJI-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[AVALANCHE_FUJI-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[AVALANCHE_FUJI-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[AVALANCHE_FUJI-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +### ETH SEPOLIA Config +[SEPOLIA.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 3 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 100 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "5354747932930759" +staleness_seconds = 172_800 +gas_after_payment_calculation = 38_900 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 24 +link_premium_percentage = 20 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 90_000 +coordinator_gas_overhead_link = 112_000 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 24 +coordinator_link_premium_percentage = 20 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 1.15 +vrf_job_batch_fulfillment_enabled = false +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "5s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "latest" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "30s" +bhs_job_run_timeout = "1m0s" +# NEW ENV CONFIG END + +[SEPOLIA.VRFv2Plus.ExistingEnv] +coordinator_address = "0x2F3b892710523Ee9A85c3155a42089fFe99Ca31e" +consumer_address = "" +sub_id = "" +key_hash = "0xf5b4a359df0598eef89872ea2170f2afa844dbf74b417e6d44d4bda9420aceb2" +create_fund_subs_and_add_consumers = true +link_address = "0x779877A7B0D9E8603169DdbD7836e478b4624789" +node_sending_key_funding_min = 50 +node_sending_keys = [ + "0x0c0DC7f33A1256f0247c5ea75861d385fa5FED31", + # BHS + "0xEd8A4b792d16484f6c9B4df1e721e8280925Db80", +] + +#SMOKE TEST CONFIG +[SEPOLIA-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5 +subscription_funding_amount_native = 1 +subscription_refunding_amount_link = 5 +subscription_refunding_amount_native = 1 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "70m" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[SEPOLIA-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "3s" +rps = 1 + +#SOAK TEST CONFIG +[SEPOLIA-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 500 +subscription_funding_amount_native = 200 + +[SEPOLIA-Soak.VRFv2Plus.Performance] +test_duration = "2h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[SEPOLIA-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 30 + +[SEPOLIA-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +# STRESS TEST CONFIG +[SEPOLIA-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[SEPOLIA-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 +### BSC SEPOLIA Config +[BSC_TESTNET.VRFv2Plus.General] +use_existing_env = true +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 3 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 50 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "30531029880396850" +staleness_seconds = 172_800 +gas_after_payment_calculation = 48_500 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 60 +link_premium_percentage = 50 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 99_500 +coordinator_gas_overhead_link = 121_500 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 60 +coordinator_link_premium_percentage = 50 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 1.1 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "3s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "latest" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "2s" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[BSC_TESTNET.VRFv2Plus.ExistingEnv] +coordinator_address = "0x84A477F6ebF33501eE3ACA86fEcB980b1fC99AC2" +consumer_address = "" +sub_id = "" +key_hash = "0x4d43763d3eff849a89cf578a42787baa32132d7a80032125710e95b3972cd214" +create_fund_subs_and_add_consumers = true +link_address = "0x84b9B910527Ad5C03A9Ca831909E21e236EA7b06" +node_sending_key_funding_min = 150 +node_sending_keys = [ + "0x4EE2Cc6D50E8acb6BaEf673B03559525a6c92fB8", + # BHS + "0xAFB44568f7DAc218EA6e1C71c366692ED4758A07" +] + +#SMOKE TEST CONFIG +[BSC_TESTNET-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 10 +subscription_funding_amount_native = 10 + +[BSC_TESTNET-Smoke.VRFv2Plus.Performance] +test_duration = "15s" +rate_limit_unit_duration = "3s" +rps = 1 + + +#SOAK TEST CONFIG +[BSC_TESTNET-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[BSC_TESTNET-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[BSC_TESTNET-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[BSC_TESTNET-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[BSC_TESTNET-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[BSC_TESTNET-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 From ecc1ae083b7f8e629dec5eeb36810209b72c16a6 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Wed, 26 Jun 2024 14:38:13 +0200 Subject: [PATCH 5/6] support unnamed configuration --- integration-tests/testconfig/testconfig.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 33a1b5d027a..dfa85cc0d2f 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -271,7 +271,6 @@ func GetConfigurationNameFromEnv() (string, error) { const ( Base64OverrideEnvVarName = k8s_config.EnvBase64ConfigOverride - NoKey = "NO_KEY" ) func GetConfig(configurationNames []string, product Product) (TestConfig, error) { @@ -282,6 +281,14 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error) configurationNames[idx] = strings.ReplaceAll(configurationName, " ", "_") configurationNames[idx] = cases.Title(language.English, cases.NoLower).String(configurationName) } + + // append unnamed (default) configuration + configurationNamesCopy := make([]string, len(configurationNames)) + copy(configurationNamesCopy, configurationNames) + + configurationNames = []string{} + configurationNames = append([]string{""}, configurationNamesCopy...) + fileNames := []string{ "default.toml", fmt.Sprintf("%s.toml", product), From f858a419007b6202b39424f4fb60a1b904a1124c Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Thu, 27 Jun 2024 17:30:30 +0200 Subject: [PATCH 6/6] use chain-specific config in VRF tests --- integration-tests/load/vrfv2/vrfv2_test.go | 4 ++-- .../load/vrfv2plus/vrfv2plus_test.go | 4 ++-- integration-tests/smoke/vrf_test.go | 2 +- integration-tests/smoke/vrfv2_test.go | 12 +++++------ integration-tests/smoke/vrfv2plus_test.go | 21 ++++++++----------- .../testconfig/testconfig_utils.go | 2 +- 6 files changed, 21 insertions(+), 24 deletions(-) diff --git a/integration-tests/load/vrfv2/vrfv2_test.go b/integration-tests/load/vrfv2/vrfv2_test.go index da2b3ee8f49..0a014ccc44a 100644 --- a/integration-tests/load/vrfv2/vrfv2_test.go +++ b/integration-tests/load/vrfv2/vrfv2_test.go @@ -46,7 +46,7 @@ func TestVRFV2Performance(t *testing.T) { l := logging.GetTestLogger(t) testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2) require.NoError(t, err) cfgl := testConfig.Logging.Loki @@ -188,7 +188,7 @@ func TestVRFV2BHSPerformance(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2) require.NoError(t, err) vrfv2Config := testConfig.VRFv2 testReporter := &testreporters.VRFV2TestReporter{} diff --git a/integration-tests/load/vrfv2plus/vrfv2plus_test.go b/integration-tests/load/vrfv2plus/vrfv2plus_test.go index c6928e73155..3835dbfb616 100644 --- a/integration-tests/load/vrfv2plus/vrfv2plus_test.go +++ b/integration-tests/load/vrfv2plus/vrfv2plus_test.go @@ -45,7 +45,7 @@ func TestVRFV2PlusPerformance(t *testing.T) { l := logging.GetTestLogger(t) testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2Plus) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2Plus) require.NoError(t, err) cfgl := testConfig.Logging.Loki @@ -188,7 +188,7 @@ func TestVRFV2PlusBHSPerformance(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig([]string{testType}, tc.VRFv2Plus) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2Plus) require.NoError(t, err) vrfv2PlusConfig := testConfig.VRFv2Plus testReporter := &testreporters.VRFV2PlusTestReporter{} diff --git a/integration-tests/smoke/vrf_test.go b/integration-tests/smoke/vrf_test.go index a341533551c..04e760796db 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -186,7 +186,7 @@ func TestVRFJobReplacement(t *testing.T) { } func prepareVRFtestEnv(t *testing.T, l zerolog.Logger) (*test_env.CLClusterTestEnv, *vrfv1.Contracts, *seth.Client) { - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRF) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRF) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/vrfv2_test.go b/integration-tests/smoke/vrfv2_test.go index 877b8353914..0cf04051e7c 100644 --- a/integration-tests/smoke/vrfv2_test.go +++ b/integration-tests/smoke/vrfv2_test.go @@ -52,7 +52,7 @@ func TestVRFv2Basic(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -569,7 +569,7 @@ func TestVRFv2MultipleSendingKeys(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) if err != nil { t.Fatal(err) } @@ -677,7 +677,7 @@ func TestVRFOwner(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID vrfv2Config := config.VRFv2 @@ -813,7 +813,7 @@ func TestVRFV2WithBHS(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1031,7 +1031,7 @@ func TestVRFV2NodeReorg(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] @@ -1210,7 +1210,7 @@ func TestVRFv2BatchFulfillmentEnabledDisabled(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index 634d183418c..106b4f3c1c9 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -49,10 +49,7 @@ func TestVRFv2Plus(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) - require.NoError(t, err, "Error getting config") - - config, err = tc.GetConfig([]string{"Smoke", config.GetNetworkConfig().SelectedNetworks[0], config.GetNetworkConfig().SelectedNetworks[0] + "-Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus @@ -750,7 +747,7 @@ func TestVRFv2PlusMultipleSendingKeys(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -855,7 +852,7 @@ func TestVRFv2PlusMigration(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1249,7 +1246,7 @@ func TestVRFV2PlusWithBHS(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1478,7 +1475,7 @@ func TestVRFV2PlusWithBHF(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1635,7 +1632,7 @@ func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1804,7 +1801,7 @@ func TestVRFv2PlusPendingBlockSimulationAndZeroConfirmationDelays(t *testing.T) ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1898,7 +1895,7 @@ func TestVRFv2PlusNodeReorg(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] @@ -2075,7 +2072,7 @@ func TestVRFv2PlusBatchFulfillmentEnabledDisabled(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/testconfig/testconfig_utils.go b/integration-tests/testconfig/testconfig_utils.go index f113f7d4806..6529771f491 100644 --- a/integration-tests/testconfig/testconfig_utils.go +++ b/integration-tests/testconfig/testconfig_utils.go @@ -69,7 +69,7 @@ selected_networks=` return fmt.Errorf(finalErrStr) } -func GetChainAndTestTypeSpecificConfig(product Product, testType string) (TestConfig, error) { +func GetChainAndTestTypeSpecificConfig(testType string, product Product) (TestConfig, error) { config, err := GetConfig([]string{testType}, product) if err != nil { return TestConfig{}, fmt.Errorf("error getting config: %w", err)