From a4466c652b65277dc9e18234a86f9e337fc241bb Mon Sep 17 00:00:00 2001 From: Adam Hamrick Date: Fri, 7 Jun 2024 11:18:28 -0400 Subject: [PATCH] Uses Common Config to Fund Tests (#13465) * Uses config to fund * More cash --- integration-tests/smoke/forwarder_ocr_test.go | 2 +- .../smoke/forwarders_ocr2_test.go | 2 +- integration-tests/smoke/keeper_test.go | 2 +- integration-tests/smoke/ocr2_test.go | 2 +- integration-tests/smoke/ocr_test.go | 2 +- integration-tests/smoke/runlog_test.go | 2 +- integration-tests/smoke/vrf_test.go | 2 +- integration-tests/testconfig/default.toml | 43 ++++++++++--------- 8 files changed, 30 insertions(+), 27 deletions(-) diff --git a/integration-tests/smoke/forwarder_ocr_test.go b/integration-tests/smoke/forwarder_ocr_test.go index 2cae2ec3f45..1783549637b 100644 --- a/integration-tests/smoke/forwarder_ocr_test.go +++ b/integration-tests/smoke/forwarder_ocr_test.go @@ -38,7 +38,7 @@ func TestForwarderOCRBasic(t *testing.T) { WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithMockAdapter(). WithCLNodes(6). - WithFunding(big.NewFloat(.1)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/smoke/forwarders_ocr2_test.go b/integration-tests/smoke/forwarders_ocr2_test.go index a8d0e1987fe..2651a02fb4d 100644 --- a/integration-tests/smoke/forwarders_ocr2_test.go +++ b/integration-tests/smoke/forwarders_ocr2_test.go @@ -39,7 +39,7 @@ func TestForwarderOCR2Basic(t *testing.T) { WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithMockAdapter(). WithCLNodes(6). - WithFunding(big.NewFloat(.1)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 99817562c62..62a79f0347b 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -1236,7 +1236,7 @@ func setupKeeperTest(l zerolog.Logger, t *testing.T, config *tc.TestConfig) ( WithTestConfig(config). WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithCLNodes(5). - WithFunding(big.NewFloat(.5)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 7ca7b01fb36..d0d1e36c8ed 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -156,7 +156,7 @@ func prepareORCv2SmokeTestEnv(t *testing.T, testData ocr2test, l zerolog.Logger, WithMockAdapter(). WithCLNodes(clNodeCount). WithCLNodeOptions(test_env.WithNodeEnvVars(testData.env)). - WithFunding(big.NewFloat(.1)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/smoke/ocr_test.go b/integration-tests/smoke/ocr_test.go index bef08493962..02d548f4763 100644 --- a/integration-tests/smoke/ocr_test.go +++ b/integration-tests/smoke/ocr_test.go @@ -94,7 +94,7 @@ func prepareORCv1SmokeTestEnv(t *testing.T, l zerolog.Logger, firstRoundResult i WithPrivateEthereumNetwork(network.EthereumNetworkConfig). WithMockAdapter(). WithCLNodes(6). - WithFunding(big.NewFloat(.5)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/smoke/runlog_test.go b/integration-tests/smoke/runlog_test.go index 3e806fc690b..7090564c42e 100644 --- a/integration-tests/smoke/runlog_test.go +++ b/integration-tests/smoke/runlog_test.go @@ -39,7 +39,7 @@ func TestRunLogBasic(t *testing.T) { WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithMockAdapter(). WithCLNodes(1). - WithFunding(big.NewFloat(.5)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/smoke/vrf_test.go b/integration-tests/smoke/vrf_test.go index 1cc7bf73d69..abb619e7b0b 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -196,7 +196,7 @@ func prepareVRFtestEnv(t *testing.T, l zerolog.Logger) (*test_env.CLClusterTestE WithTestConfig(&config). WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithCLNodes(1). - WithFunding(big.NewFloat(.5)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index f99c434bc4d..397fc2ee792 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -1,33 +1,36 @@ [Logging] -test_log_collect=false +test_log_collect = false [Logging.LogStream] -log_targets=["file"] -log_producer_timeout="10s" -log_producer_retry_limit=10 +log_targets = ["file"] +log_producer_timeout = "10s" +log_producer_retry_limit = 10 [ChainlinkImage] -postgres_version="15.6" -image="public.ecr.aws/chainlink/chainlink" -version="2.9.1" +postgres_version = "15.6" +image = "public.ecr.aws/chainlink/chainlink" +version = "2.12.0" + +[Common] +chainlink_node_funding = 0.5 [Network] -selected_networks=["simulated"] +selected_networks = ["simulated"] [PrivateEthereumNetwork] -ethereum_version="eth1" -execution_layer="geth" +ethereum_version = "eth1" +execution_layer = "geth" [PrivateEthereumNetwork.EthereumChainConfig] -seconds_per_slot=3 -slots_per_epoch=2 -genesis_delay=15 -validator_count=4 -chain_id=1337 -addresses_to_fund=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"] +seconds_per_slot = 3 +slots_per_epoch = 2 +genesis_delay = 15 +validator_count = 4 +chain_id = 1337 +addresses_to_fund = ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"] [PrivateEthereumNetwork.EthereumChainConfig.HardForkEpochs] -Deneb=500 +Deneb = 500 [NodeConfig] BaseConfigTOML = """ @@ -144,9 +147,9 @@ gas_price_estimation_tx_priority = "standard" # fallback values transfer_gas_fee = 21_000 -gas_price = 150_000_000_000 #150 gwei +gas_price = 150_000_000_000 #150 gwei gas_fee_cap = 150_000_000_000 #150 gwei -gas_tip_cap = 50_000_000_000 #50 gwei +gas_tip_cap = 50_000_000_000 #50 gwei [[Seth.networks]] name = "Anvil" @@ -405,4 +408,4 @@ gas_price_estimation_enabled = true # how many last blocks to use, when estimating gas for a transaction gas_price_estimation_blocks = 100 # priority of the transaction, can be "fast", "standard" or "slow" (the higher the priority, the higher adjustment factor will be used for gas estimation) [default: "standard"] -gas_price_estimation_tx_priority = "standard" \ No newline at end of file +gas_price_estimation_tx_priority = "standard"