From cb731e3834e85e53aace761a317a4ac3b1689650 Mon Sep 17 00:00:00 2001 From: Balamurali Gopalswami Date: Thu, 11 Jul 2024 14:18:18 -0400 Subject: [PATCH] Cleanup and retain only reorg stuffs --- .../ccip-tests/chaos/gas_suite.go | 158 ------------------ .../ccip-tests/load/ccip_loadgen.go | 6 +- .../ccip-tests/load/ccip_test.go | 58 ------- .../ccip-tests/testconfig/ccip.go | 6 +- .../tomls/ccip-gas-block-halving-dst.toml | 73 -------- .../tomls/ccip-gas-block-halving-src.toml | 73 -------- .../tomls/ccip-gas-spikes-fast-dst.toml | 76 --------- .../tomls/ccip-gas-spikes-fast-src.toml | 75 --------- .../tomls/ccip-gas-spikes-slow-dst.toml | 75 --------- .../tomls/ccip-gas-spikes-slow-src.toml | 75 --------- .../ccip-tests/testsetups/ccip.go | 6 + integration-tests/go.mod | 4 + integration-tests/go.sum | 10 ++ integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 1 + 15 files changed, 28 insertions(+), 670 deletions(-) delete mode 100644 integration-tests/ccip-tests/chaos/gas_suite.go delete mode 100644 integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-dst.toml delete mode 100644 integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-src.toml delete mode 100644 integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-dst.toml delete mode 100644 integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-src.toml delete mode 100644 integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-dst.toml delete mode 100644 integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-src.toml diff --git a/integration-tests/ccip-tests/chaos/gas_suite.go b/integration-tests/ccip-tests/chaos/gas_suite.go deleted file mode 100644 index 1aae91007e..0000000000 --- a/integration-tests/ccip-tests/chaos/gas_suite.go +++ /dev/null @@ -1,158 +0,0 @@ -package chaos - -import ( - "context" - "fmt" - "github.com/ethereum/go-ethereum/ethclient" - "math" - "testing" - "time" - - "github.com/rs/zerolog" - "github.com/stretchr/testify/assert" - - "github.com/smartcontractkit/chainlink-testing-framework/client" - "github.com/smartcontractkit/chainlink-testing-framework/grafana" - "github.com/smartcontractkit/chainlink-testing-framework/logging" -) - -// GasSuite is a test suite that generates gas chaos -type GasSuite struct { - t *testing.T - Cfg *GasSuiteConfig - Logger zerolog.Logger - SrcRPCClient *client.RPCClient - DstRPCClient *client.RPCClient - SrcEVMClient *ethclient.Client - DstEVMClient *ethclient.Client - GrafanaClient *grafana.Client -} - -// GasSuiteConfig is a configuration for gas chaos tests -type GasSuiteConfig struct { - // SrcGethHTTPURL source chain Geth HTTP URL - SrcGethHTTPURL string - // DstGethHTTPURL dest chain Geth HTTP URL - DstGethHTTPURL string - // GrafanaConfig is a common Grafana config used for annotating experiments - *GrafanaConfig -} - -// Validate validates ReorgConfig params -func (rc *GasSuiteConfig) Validate() error { - return rc.GrafanaConfig.Validate() -} - -// NewGasSuite creates new gas suite with source/dest RPC clients, works only with Anvil -func NewGasSuite(t *testing.T, cfg *GasSuiteConfig) (*GasSuite, error) { - l := logging.GetTestLogger(t).With().Str("Component", "reorg").Logger() - if err := cfg.Validate(); err != nil { - return nil, err - } - srcEVMClient, err := ethclient.Dial(cfg.SrcGethHTTPURL) - if err != nil { - return nil, err - } - dstEVMClient, err := ethclient.Dial(cfg.DstGethHTTPURL) - if err != nil { - return nil, err - } - return &GasSuite{ - t: t, - Cfg: cfg, - Logger: l, - SrcRPCClient: client.NewRPCClient(cfg.SrcGethHTTPURL), - DstRPCClient: client.NewRPCClient(cfg.DstGethHTTPURL), - SrcEVMClient: srcEVMClient, - DstEVMClient: dstEVMClient, - GrafanaClient: grafana.NewGrafanaClient(cfg.GrafanaURL, cfg.GrafanaToken), - }, nil -} - -// ChangeBlockGasBaseFee simulates slow or fast gas spike -func (r *GasSuite) ChangeBlockGasBaseFee(chain string, from int64, percentage float64, duration time.Duration, spike bool) { - go func() { - err := PostGrafanaAnnotation( - r.Logger, - r.GrafanaClient, - r.Cfg.dashboardUID, - fmt.Sprintf("gas spike started (src chain), initial price: %d, raise: %.2f", from, percentage), - []string{"gas-spike"}, - ) - assert.NoError(r.t, err) - switch chain { - case "src": - err := r.SrcRPCClient.ModulateBaseFeeOverDuration(r.Logger, from, percentage, duration, spike) - assert.NoError(r.t, err) - case "dst": - err := r.DstRPCClient.ModulateBaseFeeOverDuration(r.Logger, from, percentage, duration, spike) - assert.NoError(r.t, err) - default: - r.t.Errorf("chain can be 'src' or 'dst'") - } - err = PostGrafanaAnnotation( - r.Logger, - r.GrafanaClient, - r.Cfg.dashboardUID, - fmt.Sprintf("gas spike ended (src chain), price: %.2f, raise: %.2f", float64(from)*percentage, percentage), - []string{"gas-spike"}, - ) - assert.NoError(r.t, err) - }() -} - -// ChangeNextBlockGasLimit changes next block gas limit, -// sets it to percentage of last gasUsed in previous block creating congestion -func (r *GasSuite) ChangeNextBlockGasLimit(startIn time.Duration, wait time.Duration, chain string, percentage float64) { - go func() { - time.Sleep(startIn) - latestBlock, err := r.SrcEVMClient.BlockByNumber(context.Background(), nil) - assert.NoError(r.t, err) - newGasLimit := int64(math.Ceil(float64(latestBlock.GasUsed()) * percentage)) - r.Logger.Info(). - Str("Network", chain). - Int64("GasLimit", newGasLimit). - Uint64("GasUsed", latestBlock.GasUsed()). - Msg("Setting next block gas limit") - err = PostGrafanaAnnotation( - r.Logger, - r.GrafanaClient, - r.Cfg.dashboardUID, - fmt.Sprintf("changed block gas limit, now: %d, was used in last block: %d, network: %s", newGasLimit, latestBlock.GasUsed(), chain), - []string{"gas-limit"}, - ) - assert.NoError(r.t, err) - switch chain { - case "src": - err := r.SrcRPCClient.AnvilSetBlockGasLimit([]interface{}{newGasLimit}) - assert.NoError(r.t, err) - case "dst": - err := r.DstRPCClient.AnvilSetBlockGasLimit([]interface{}{newGasLimit}) - assert.NoError(r.t, err) - default: - r.t.Errorf("chain can be 'src' or 'dst'") - } - time.Sleep(wait) - r.Logger.Info(). - Str("Network", chain). - Uint64("GasLimit", latestBlock.GasLimit()). - Msg("Returning old gas limit") - switch chain { - case "src": - err := r.SrcRPCClient.AnvilSetBlockGasLimit([]interface{}{latestBlock.GasLimit()}) - assert.NoError(r.t, err) - case "dst": - err := r.DstRPCClient.AnvilSetBlockGasLimit([]interface{}{latestBlock.GasLimit()}) - assert.NoError(r.t, err) - default: - r.t.Errorf("chain can be 'src' or 'dst'") - } - err = PostGrafanaAnnotation( - r.Logger, - r.GrafanaClient, - r.Cfg.dashboardUID, - fmt.Sprintf("changed block gas limit, now: %d, network: %s", newGasLimit, chain), - []string{"gas-limit"}, - ) - }() -} diff --git a/integration-tests/ccip-tests/load/ccip_loadgen.go b/integration-tests/ccip-tests/load/ccip_loadgen.go index e02f118095..ab74dd4509 100644 --- a/integration-tests/ccip-tests/load/ccip_loadgen.go +++ b/integration-tests/ccip-tests/load/ccip_loadgen.go @@ -248,7 +248,10 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { // if the token address is 0x0 it will use Native as fee token and the fee amount should be mentioned in bind.TransactOpts's value fee, err := sourceCCIP.Common.Router.GetFee(destChainSelector, msg) if err != nil { - res.Error = fmt.Sprintf("reqNo %d err %s - while getting fee from router", msgSerialNo, err.Error()) + res.Error = fmt.Sprintf("reqNo %d err %s - while getting fee from router - msg Data %x FeeToken %s TokenAmounts %+v ExtraArgs %x Receiver %x", + msgSerialNo, err.Error(), + msg.Data, msg.FeeToken, msg.TokenAmounts, msg.ExtraArgs, msg.Receiver) + res.Failed = true return res } @@ -268,6 +271,7 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response { } txConfirmationTime := time.Now().UTC() + // wait for the tx to be mined, timeout is set to 10 minutes lggr.Info().Str("tx", sendTx.Hash().Hex()).Msg("waiting for tx to be mined") lggr = lggr.With().Str("Msg Tx", sendTx.Hash().String()).Logger() diff --git a/integration-tests/ccip-tests/load/ccip_test.go b/integration-tests/ccip-tests/load/ccip_test.go index 2da4ef70f2..b34e733294 100644 --- a/integration-tests/ccip-tests/load/ccip_test.go +++ b/integration-tests/ccip-tests/load/ccip_test.go @@ -49,20 +49,6 @@ func setupReorgSuite(t *testing.T, loadArgs *LoadArgs) *ch.ReorgSuite { return rs } -func setupGasSuite(t *testing.T, loadArgs *LoadArgs) *ch.GasSuite { - rs, err := ch.NewGasSuite(t, &ch.GasSuiteConfig{ - SrcGethHTTPURL: loadArgs.TestSetupArgs.Env.K8Env.URLs["source-chain_http"][0], - DstGethHTTPURL: loadArgs.TestSetupArgs.Env.K8Env.URLs["dest-chain_http"][0], - GrafanaConfig: &ch.GrafanaConfig{ - GrafanaURL: *loadArgs.TestCfg.EnvInput.Logging.Grafana.BaseUrl, - GrafanaToken: *loadArgs.TestCfg.EnvInput.Logging.Grafana.BearerToken, - DashboardURL: *loadArgs.TestCfg.EnvInput.Logging.Grafana.DashboardUrl, - }, - }) - require.NoError(t, err) - return rs -} - // TestLoadCCIPStableRPS clean and stable load test func TestLoadCCIPStableRPS(t *testing.T) { t.Parallel() @@ -143,50 +129,6 @@ func TestLoadCCIPStableRPSReorgsAboveFinality(t *testing.T) { }, 3*time.Minute, 20*time.Second, "not all the nodes report finality violation") } -func TestLoadCCIPStableRPSGasSpike(t *testing.T) { - t.Parallel() - lggr := logging.GetTestLogger(t) - testArgs := NewLoadArgs(t, lggr) - testArgs.Setup() - // if the test runs on remote runner - if len(testArgs.TestSetupArgs.Lanes) == 0 { - return - } - t.Cleanup(func() { - log.Info().Msg("Tearing down the environment") - require.NoError(t, testArgs.TestSetupArgs.TearDown()) - }) - - chcfg := testArgs.TestCfg.TestGroupInput.ChaosGasProfile - gs := setupGasSuite(t, testArgs) - gs.ChangeBlockGasBaseFee(chcfg.TargetChain, chcfg.StartGasPrice, chcfg.GasRaisePercentage, chcfg.Duration.Duration(), chcfg.Spike) - - testArgs.TriggerLoadByLane() - testArgs.Wait() -} - -func TestLoadCCIPStableRPSChangeBlockGasLimit(t *testing.T) { - t.Parallel() - lggr := logging.GetTestLogger(t) - testArgs := NewLoadArgs(t, lggr) - testArgs.Setup() - // if the test runs on remote runner - if len(testArgs.TestSetupArgs.Lanes) == 0 { - return - } - t.Cleanup(func() { - log.Info().Msg("Tearing down the environment") - require.NoError(t, testArgs.TestSetupArgs.TearDown()) - }) - - chcfg := testArgs.TestCfg.TestGroupInput.ChaosGasLimitProfile - gs := setupGasSuite(t, testArgs) - gs.ChangeNextBlockGasLimit(1*time.Minute, 1*time.Minute, chcfg.TargetChain, chcfg.BlockGasLimitPercentage) - - testArgs.TriggerLoadByLane() - testArgs.Wait() -} - // TestLoadCCIPWithUpgradeNodeVersion starts all nodes with a specific version, triggers load and then upgrades the node version as the load is running func TestLoadCCIPWithUpgradeNodeVersion(t *testing.T) { t.Parallel() diff --git a/integration-tests/ccip-tests/testconfig/ccip.go b/integration-tests/ccip-tests/testconfig/ccip.go index f057235f95..de3444897d 100644 --- a/integration-tests/ccip-tests/testconfig/ccip.go +++ b/integration-tests/ccip-tests/testconfig/ccip.go @@ -9,10 +9,6 @@ import ( "github.com/pelletier/go-toml/v2" "github.com/rs/zerolog" - ctfK8config "github.com/smartcontractkit/chainlink-testing-framework/k8s/config" - - testutils "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/utils" - "github.com/smartcontractkit/chainlink-common/pkg/config" ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/config" ctfK8config "github.com/smartcontractkit/chainlink-testing-framework/k8s/config" @@ -294,7 +290,7 @@ type CCIPTestGroupConfig struct { CommitInflightExpiry *config.Duration `toml:",omitempty"` StoreLaneConfig *bool `toml:",omitempty"` LoadProfile *LoadProfile `toml:",omitempty"` - ChaosReorgProfile *ChaosReorgProfile `toml:",omitempty"` + ChaosReorgProfile *ChaosReorgProfile `toml:",omitempty"` } func (c *CCIPTestGroupConfig) Validate() error { diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-dst.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-dst.toml deleted file mode 100644 index 18271e3078..0000000000 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-dst.toml +++ /dev/null @@ -1,73 +0,0 @@ -[CCIP] -[CCIP.Env] -Mockserver = 'http://mockserver:1080' -[CCIP.Env.Network] -selected_networks= ['source-chain', 'dest-chain'] - -[CCIP.Env.Network.AnvilConfigs.source-chain] -block_time = 1 - -[CCIP.Env.Network.AnvilConfigs.dest-chain] -block_time = 1 - -[CCIP.Env.Network.EVMNetworks.source-chain] -evm_name = 'source-chain' -evm_chain_id = 1337 -evm_urls = ['ws://127.0.0.1:9546'] -evm_http_urls = ['http://127.0.0.1:9544'] -evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.Network.EVMNetworks.dest-chain] -evm_name = 'dest-chain' -evm_chain_id = 2337 -evm_urls = ['ws://127.0.0.1:7546'] -evm_http_urls = ['http://127.0.0.1:7544'] -evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.NewCLCluster] -NoOfNodes = 6 -NodeMemory = '4Gi' -NodeCPU = '2' -DBMemory = '4Gi' -DBCPU = '2' -DBCapacity = '10Gi' -IsStateful = true -DBArgs = ['shared_buffers=1536MB', 'effective_cache_size=4096MB', 'work_mem=64MB'] - -[CCIP.Env.NewCLCluster.Common] -CommonChainConfigTOML = """ -[HeadTracker] -HistoryDepth = 50 - -[GasEstimator] -PriceMax = '200 gwei' -LimitDefault = 6000000 -FeeCapDefault = '200 gwei' -""" - - -[CCIP.Groups.load.LoadProfile] -TestDuration = '5m' -FailOnFirstErrorInLoad = true - -[CCIP.Groups.load.ChaosGasLimitProfile] -TargetChain = "dst" -BlockGasLimitPercentage = 0.5 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-src.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-src.toml deleted file mode 100644 index 0387f90b50..0000000000 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-block-halving-src.toml +++ /dev/null @@ -1,73 +0,0 @@ -[CCIP] -[CCIP.Env] -Mockserver = 'http://mockserver:1080' -[CCIP.Env.Network] -selected_networks= ['source-chain', 'dest-chain'] - -[CCIP.Env.Network.AnvilConfigs.source-chain] -block_time = 1 - -[CCIP.Env.Network.AnvilConfigs.dest-chain] -block_time = 1 - -[CCIP.Env.Network.EVMNetworks.source-chain] -evm_name = 'source-chain' -evm_chain_id = 1337 -evm_urls = ['ws://127.0.0.1:9546'] -evm_http_urls = ['http://127.0.0.1:9544'] -evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.Network.EVMNetworks.dest-chain] -evm_name = 'dest-chain' -evm_chain_id = 2337 -evm_urls = ['ws://127.0.0.1:7546'] -evm_http_urls = ['http://127.0.0.1:7544'] -evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.NewCLCluster] -NoOfNodes = 6 -NodeMemory = '4Gi' -NodeCPU = '2' -DBMemory = '4Gi' -DBCPU = '2' -DBCapacity = '10Gi' -IsStateful = true -DBArgs = ['shared_buffers=1536MB', 'effective_cache_size=4096MB', 'work_mem=64MB'] - -[CCIP.Env.NewCLCluster.Common] -CommonChainConfigTOML = """ -[HeadTracker] -HistoryDepth = 50 - -[GasEstimator] -PriceMax = '200 gwei' -LimitDefault = 6000000 -FeeCapDefault = '200 gwei' -""" - - -[CCIP.Groups.load.LoadProfile] -TestDuration = '5m' -FailOnFirstErrorInLoad = true - -[CCIP.Groups.load.ChaosGasLimitProfile] -TargetChain = "src" -BlockGasLimitPercentage = 0.5 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-dst.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-dst.toml deleted file mode 100644 index 62e404a5f6..0000000000 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-dst.toml +++ /dev/null @@ -1,76 +0,0 @@ -[CCIP] -[CCIP.Env] -Mockserver = 'http://mockserver:1080' -[CCIP.Env.Network] -selected_networks= ['source-chain', 'dest-chain'] - -[CCIP.Env.Network.AnvilConfigs.source-chain] -block_time = 1 - -[CCIP.Env.Network.AnvilConfigs.dest-chain] -block_time = 1 - -[CCIP.Env.Network.EVMNetworks.source-chain] -evm_name = 'source-chain' -evm_chain_id = 1337 -evm_urls = ['ws://127.0.0.1:9546'] -evm_http_urls = ['http://127.0.0.1:9544'] -evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.Network.EVMNetworks.dest-chain] -evm_name = 'dest-chain' -evm_chain_id = 2337 -evm_urls = ['ws://127.0.0.1:7546'] -evm_http_urls = ['http://127.0.0.1:7544'] -evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.NewCLCluster] -NoOfNodes = 6 -NodeMemory = '4Gi' -NodeCPU = '2' -DBMemory = '4Gi' -DBCPU = '2' -DBCapacity = '10Gi' -IsStateful = true -DBArgs = ['shared_buffers=1536MB', 'effective_cache_size=4096MB', 'work_mem=64MB'] - -[CCIP.Env.NewCLCluster.Common] -CommonChainConfigTOML = """ -[HeadTracker] -HistoryDepth = 50 - -[GasEstimator] -PriceMax = '200 gwei' -LimitDefault = 6000000 -FeeCapDefault = '200 gwei' -""" - - -[CCIP.Groups.load.LoadProfile] -TestDuration = '5m' -FailOnFirstErrorInLoad = true - -[CCIP.Groups.load.ChaosGasProfile] -TargetChain = "dst" -StartGasPrice = 2000000000 -GasRaisePercentage = 0.7 -Spike = true -Duration = '3m' diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-src.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-src.toml deleted file mode 100644 index f14ff685d5..0000000000 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-fast-src.toml +++ /dev/null @@ -1,75 +0,0 @@ -[CCIP] -[CCIP.Env] -Mockserver = 'http://mockserver:1080' -[CCIP.Env.Network] -selected_networks= ['source-chain', 'dest-chain'] - -[CCIP.Env.Network.AnvilConfigs.source-chain] -block_time = 1 - -[CCIP.Env.Network.AnvilConfigs.dest-chain] -block_time = 1 - -[CCIP.Env.Network.EVMNetworks.source-chain] -evm_name = 'source-chain' -evm_chain_id = 1337 -evm_urls = ['ws://127.0.0.1:9546'] -evm_http_urls = ['http://127.0.0.1:9544'] -evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.Network.EVMNetworks.dest-chain] -evm_name = 'dest-chain' -evm_chain_id = 2337 -evm_urls = ['ws://127.0.0.1:7546'] -evm_http_urls = ['http://127.0.0.1:7544'] -evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.NewCLCluster] -NoOfNodes = 6 -NodeMemory = '4Gi' -NodeCPU = '2' -DBMemory = '4Gi' -DBCPU = '2' -DBCapacity = '10Gi' -IsStateful = true -DBArgs = ['shared_buffers=1536MB', 'effective_cache_size=4096MB', 'work_mem=64MB'] - -[CCIP.Env.NewCLCluster.Common] -CommonChainConfigTOML = """ -[HeadTracker] -HistoryDepth = 50 - -[GasEstimator] -PriceMax = '200 gwei' -LimitDefault = 6000000 -FeeCapDefault = '200 gwei' -""" - -[CCIP.Groups.load.LoadProfile] -TestDuration = '5m' -FailOnFirstErrorInLoad = true - -[CCIP.Groups.load.ChaosGasProfile] -TargetChain = "src" -StartGasPrice = 2000000000 -GasRaisePercentage = 0.7 -Spike = true -Duration = '3m' diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-dst.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-dst.toml deleted file mode 100644 index d845f3b310..0000000000 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-dst.toml +++ /dev/null @@ -1,75 +0,0 @@ -[CCIP] -[CCIP.Env] -Mockserver = 'http://mockserver:1080' -[CCIP.Env.Network] -selected_networks= ['source-chain', 'dest-chain'] - -[CCIP.Env.Network.AnvilConfigs.source-chain] -block_time = 1 - -[CCIP.Env.Network.AnvilConfigs.dest-chain] -block_time = 1 - -[CCIP.Env.Network.EVMNetworks.source-chain] -evm_name = 'source-chain' -evm_chain_id = 1337 -evm_urls = ['ws://127.0.0.1:9546'] -evm_http_urls = ['http://127.0.0.1:9544'] -evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.Network.EVMNetworks.dest-chain] -evm_name = 'dest-chain' -evm_chain_id = 2337 -evm_urls = ['ws://127.0.0.1:7546'] -evm_http_urls = ['http://127.0.0.1:7544'] -evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.NewCLCluster] -NoOfNodes = 6 -NodeMemory = '4Gi' -NodeCPU = '2' -DBMemory = '4Gi' -DBCPU = '2' -DBCapacity = '10Gi' -IsStateful = true -DBArgs = ['shared_buffers=1536MB', 'effective_cache_size=4096MB', 'work_mem=64MB'] - -[CCIP.Env.NewCLCluster.Common] -CommonChainConfigTOML = """ -[HeadTracker] -HistoryDepth = 50 - -[GasEstimator] -PriceMax = '200 gwei' -LimitDefault = 6000000 -FeeCapDefault = '200 gwei' -""" - -[CCIP.Groups.load.LoadProfile] -TestDuration = '5m' -FailOnFirstErrorInLoad = true - -[CCIP.Groups.load.ChaosGasProfile] -TargetChain = "dst" -StartGasPrice = 2000000000 -GasRaisePercentage = 0.5 -Spike = true -Duration = '3m' diff --git a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-src.toml b/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-src.toml deleted file mode 100644 index 6d82d0f68f..0000000000 --- a/integration-tests/ccip-tests/testconfig/tomls/ccip-gas-spikes-slow-src.toml +++ /dev/null @@ -1,75 +0,0 @@ -[CCIP] -[CCIP.Env] -Mockserver = 'http://mockserver:1080' -[CCIP.Env.Network] -selected_networks= ['source-chain', 'dest-chain'] - -[CCIP.Env.Network.AnvilConfigs.source-chain] -block_time = 1 - -[CCIP.Env.Network.AnvilConfigs.dest-chain] -block_time = 1 - -[CCIP.Env.Network.EVMNetworks.source-chain] -evm_name = 'source-chain' -evm_chain_id = 1337 -evm_urls = ['ws://127.0.0.1:9546'] -evm_http_urls = ['http://127.0.0.1:9544'] -evm_keys = ['59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.Network.EVMNetworks.dest-chain] -evm_name = 'dest-chain' -evm_chain_id = 2337 -evm_urls = ['ws://127.0.0.1:7546'] -evm_http_urls = ['http://127.0.0.1:7544'] -evm_keys = ['ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'] -evm_simulated = true -client_implementation = 'Ethereum' -evm_chainlink_transaction_limit = 5000 -evm_transaction_timeout = '3m' -evm_minimum_confirmations = 1 -evm_gas_estimation_buffer = 1000 -evm_supports_eip1559 = true -evm_default_gas_limit = 6000000 -evm_finality_depth = 10 - -[CCIP.Env.NewCLCluster] -NoOfNodes = 6 -NodeMemory = '4Gi' -NodeCPU = '2' -DBMemory = '4Gi' -DBCPU = '2' -DBCapacity = '10Gi' -IsStateful = true -DBArgs = ['shared_buffers=1536MB', 'effective_cache_size=4096MB', 'work_mem=64MB'] - -[CCIP.Env.NewCLCluster.Common] -CommonChainConfigTOML = """ -[HeadTracker] -HistoryDepth = 50 - -[GasEstimator] -PriceMax = '200 gwei' -LimitDefault = 6000000 -FeeCapDefault = '200 gwei' -""" - -[CCIP.Groups.load.LoadProfile] -TestDuration = '5m' -FailOnFirstErrorInLoad = true - -[CCIP.Groups.load.ChaosGasProfile] -TargetChain = "src" -StartGasPrice = 2000000000 -GasRaisePercentage = 0.5 -Spike = true -Duration = '3m' diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index 27980517d8..8a114fe70d 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -1261,6 +1261,12 @@ func (o *CCIPTestSetUpOutputs) CreateEnvironment( } lggr.Info().Msg("Tearing down the environment") err = integrationactions.TeardownSuite(t, nil, ccipEnv.K8Env, ccipEnv.CLNodes, o.Reporter, zapcore.DPanicLevel, o.Cfg.EnvInput) + if err != nil && + strings.Contains(err.Error(), "Got very old block with number") && + strings.Contains(err.Error(), "This node may not function correctly without manual intervention") { + // the only negative reorg case, it's okay, and we test for this error + return + } require.NoError(t, err, "Environment teardown shouldn't fail") } else { //just send the report diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 62020037b2..a7600c3c9d 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -89,6 +89,8 @@ require ( github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect + github.com/K-Phoen/grabana v0.22.1 // indirect + github.com/K-Phoen/sdk v0.12.4 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect @@ -242,6 +244,8 @@ require ( github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.2.2 // indirect github.com/gorilla/websocket v1.5.1 // indirect + github.com/gosimple/slug v1.13.1 // indirect + github.com/gosimple/unidecode v1.0.1 // indirect github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240326122733-6f96a993222b // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 49fb3fb2fc..5860b99d5e 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -120,6 +120,10 @@ github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/K-Phoen/grabana v0.22.1 h1:b/O+C3H2H6VNYSeMCYUO4X4wYuwFXgBcRkvYa+fjpQA= +github.com/K-Phoen/grabana v0.22.1/go.mod h1:3LTXrTzQzTKTgvKSXdRjlsJbizSOW/V23Q3iX00R5bU= +github.com/K-Phoen/sdk v0.12.4 h1:j2EYuBJm3zDTD0fGKACVFWxAXtkR0q5QzfVqxmHSeGQ= +github.com/K-Phoen/sdk v0.12.4/go.mod h1:qmM0wO23CtoDux528MXPpYvS4XkRWkWX6rvX9Za8EVU= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -793,6 +797,10 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gosimple/slug v1.13.1 h1:bQ+kpX9Qa6tHRaK+fZR0A0M2Kd7Pa5eHPPsb1JpHD+Q= +github.com/gosimple/slug v1.13.1/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= +github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= +github.com/gosimple/unidecode v1.0.1/go.mod h1:CP0Cr1Y1kogOtx0bJblKzsVWrqYaqfNOnHzpgWw4Awc= github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNakWv5/tKwBHuLy3icnIeCo9gQr4= github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= @@ -1439,6 +1447,8 @@ github.com/smartcontractkit/chainlink-testing-framework v1.31.10 h1:zFsXW04ceKMg github.com/smartcontractkit/chainlink-testing-framework v1.31.10/go.mod h1:wSRZGoukZliwfTkghdF4cI1RLHz5k3aDnL+rXhJ6f7k= 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-testing-framework/grafana v0.0.1 h1:1/r1wQZ4TOFpZ13w94r7amdF096Z96RuEnkOmrz1BGE= +github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.1/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 9ff38e7784..a7c6df9331 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -373,7 +373,7 @@ require ( github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240701154249-032706dcb7c8 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba // indirect - github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect + github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.1 // indirect github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/wsrpc v0.7.3 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index fabfd7c7ee..29903469c4 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1429,6 +1429,7 @@ github.com/smartcontractkit/chainlink-testing-framework v1.31.10 h1:zFsXW04ceKMg github.com/smartcontractkit/chainlink-testing-framework v1.31.10/go.mod h1:wSRZGoukZliwfTkghdF4cI1RLHz5k3aDnL+rXhJ6f7k= 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-testing-framework/grafana v0.0.1/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo=