diff --git a/integration-tests/smoke/forwarder_ocr_test.go b/integration-tests/smoke/forwarder_ocr_test.go index 1ff132f09a..404bff53bb 100644 --- a/integration-tests/smoke/forwarder_ocr_test.go +++ b/integration-tests/smoke/forwarder_ocr_test.go @@ -39,7 +39,7 @@ func TestForwarderOCRBasic(t *testing.T) { WithMockAdapter(). WithForwarders(). 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 d3aa9e85ce..d1d7d15a38 100644 --- a/integration-tests/smoke/forwarders_ocr2_test.go +++ b/integration-tests/smoke/forwarders_ocr2_test.go @@ -46,7 +46,7 @@ func TestForwarderOCR2Basic(t *testing.T) { )). WithForwarders(). 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 fbfe4c73c8..ab196a1b4c 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -1169,7 +1169,7 @@ func setupKeeperTest(l zerolog.Logger, t *testing.T, config *tc.TestConfig) ( WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithCLNodes(5). WithCLNodeConfig(clNodeConfig). - WithFunding(big.NewFloat(.5)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). Build() require.NoError(t, err, "Error deploying test environment") diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index d2df0c858c..1451d7c788 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -146,7 +146,7 @@ func prepareORCv2SmokeTestEnv(t *testing.T, l zerolog.Logger, firstRoundResult i node.WithTracing(), )). WithCLNodes(6). - 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 bef0849396..02d548f476 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 b01c5a019b..7090564c42 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(.1)). + 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 ed8f756396..3844691246 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -194,7 +194,7 @@ func prepareVRFtestEnv(t *testing.T, l zerolog.Logger) (*test_env.CLClusterTestE WithTestConfig(&config). WithPrivateEthereumNetwork(privateNetwork.EthereumNetworkConfig). WithCLNodes(1). - WithFunding(big.NewFloat(.1)). + WithFunding(big.NewFloat(*config.Common.ChainlinkNodeFunding)). WithStandardCleanup(). WithSeth(). Build() diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index ef3f60d428..397fc2ee79 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -1,81 +1,186 @@ [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 = """ +[Feature] +FeedsManager = true +LogPoller = true +UICSAKeys = true + +[Log] +Level = 'debug' +JSONConsole = true + +[Log.File] +MaxSize = '0b' + +[WebServer] +AllowOrigins = '*' +HTTPPort = 6688 +SecureCookies = false +HTTPWriteTimeout = '3m' +SessionTimeout = '999h0m0s' + +[WebServer.RateLimit] +Authenticated = 2000 +Unauthenticated = 1000 + +[WebServer.TLS] +HTTPSPort = 0 + +[Database] +MaxIdleConns = 20 +MaxOpenConns = 40 +MigrateOnStartup = true + +[OCR] +Enabled = true +DefaultTransactionQueueDepth = 0 + +[P2P] +[P2P.V2] +Enabled = true +ListenAddresses = ['0.0.0.0:6690'] +AnnounceAddresses = ['0.0.0.0:6690'] +DeltaDial = '500ms' +DeltaReconcile = '5s' +""" + +# override config toml related to EVMNode configs for chainlink nodes; applicable to all EVM node configs in chainlink toml +CommonChainConfigTOML = """ +AutoCreateKey = true +FinalityDepth = 1 +MinContractPayment = 0 + +[GasEstimator] +PriceMax = '200 gwei' +LimitDefault = 6000000 +FeeCapDefault = '200 gwei' +""" [Seth] -# enables automatic tracing of all transactions that are decoded via Decode() method -tracing_enabled = false -# saves each tracing result to json file in ./traces/.json -trace_to_json = false +# controls which transactions are decoded/traced. Possbile values are: none, all, reverted (default). +# if transaction level doesn't match, then calling Decode() does nothing. It's advised to keep it set +# to 'reverted' to limit noise. If you combine it with 'trace_to_json' it will save all possible data +# in JSON files for reverted transactions. +tracing_level = "reverted" +# saves each decoding/tracing results to JSON files; what exactly is saved depends on what we +# were able te decode, we try to save maximum information possible. It can either be: +# just tx hash, decoded transaction or call trace. Which transactions traces are saved depends +# on 'tracing_level'. + # number of addresses to be generated and runtime, if set to 0, no addresses will be generated # each generated address will receive a proportion of native tokens from root private key's balance # with the value equal to (root_balance / ephemeral_addresses_number) - transfer_fee * ephemeral_addresses_number -ephemeral_addresses_number = 0 +ephemeral_addresses_number = 10 # If enabled we will panic when getting transaction options if current key/address has a pending transaction # That's because the one we are about to send would get queued, possibly for a very long time -pending_nonce_protection_enabled = false +pending_nonce_protection_enabled = true + +# Amount to be left on root key/address, when we are using ephemeral addresses. It's the amount that will not +# be divided into ephemeral keys. Default value is good for simulated networks, but you should change it for +# something much more reasonable for live networks. +root_key_funds_buffer = 1000 # 1000 ethers # when enabled when creating a new Seth client we will send 10k wei from root address to root address # to make sure transaction can be submited and mined check_rpc_health_on_start = false +# feature-flagged expriments: "slow_funds_return" sets funds return priority to 'slow' (core only!); +# "eip_1559_fee_equalizer" sets the tip/base fee to the higher value in case there's 3+ orders of magnitude difference between them +experiments_enabled = [] + [Seth.nonce_manager] +# rate-limiting of key syncs, to prevent spamming the node with nonce calls key_sync_rate_limit_per_sec = 10 -key_sync_timeout = "2s" +# how long to wait for a key sync to complete before giving up +key_sync_timeout = "100s" +# how long to wait before retrying a key sync key_sync_retry_delay = "1s" +# how many times to retry a key sync before giving up key_sync_retries = 10 +# this is a default config that will be used if you haven't specified any network specific settings +# you can always override that by providing network specific settings like in the examples below +[[Seth.networks]] +name = "Default" +transaction_timeout = "60s" +# enable EIP-1559 transactions, because Seth will disable them if they are not supported +eip_1559_dynamic_fees = true +# enable automated gas estimation, because Seth will auto-disable it if any of the required JSON RPC methods are missing +gas_price_estimation_enabled = true +gas_price_estimation_blocks = 100 +gas_price_estimation_tx_priority = "standard" + +# fallback values +transfer_gas_fee = 21_000 +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 + +[[Seth.networks]] +name = "Anvil" +transaction_timeout = "30s" +transfer_gas_fee = 21_000 +gas_limit = 8_000_000 +gas_price = 1_000_000_000 +eip_1559_dynamic_fees = true +gas_fee_cap = 15_000_000_000 +gas_tip_cap = 5_000_000_000 + [[Seth.networks]] name = "Geth" -chain_id = "1337" transaction_timeout = "30s" -eip_1559_dynamic_fees = false # gas limits transfer_gas_fee = 21_000 # gas limit should be explicitly set only if you are connecting to a node that's incapable of estimating gas limit itself (should only happen for very old versions) -# gas_limit = 8_000_000 +gas_limit = 8_000_000 # manual settings, used when gas_price_estimation_enabled is false or when it fails # legacy transactions gas_price = 1_000_000_000 # EIP-1559 transactions -#eip_1559_dynamic_fees = true -gas_fee_cap = 10_000_000_000 -gas_tip_cap = 3_000_000_000 +eip_1559_dynamic_fees = true +gas_fee_cap = 15_000_000_000 +gas_tip_cap = 5_000_000_000 [[Seth.networks]] -name = "Fuji" -chain_id = "43113" +name = "Avalanche Fuji" transaction_timeout = "3m" eip_1559_dynamic_fees = true @@ -95,7 +200,7 @@ eip_1559_dynamic_fees = true # gas limit should be explicitly set only if you are connecting to a node that's incapable of estimating gas limit itself (should only happen for very old versions) # gas_limit = 8_000_000 # transfer_gas_fee is gas limit that will be used, when funding CL nodes and returning funds from there and when funding and returning funds from ephemeral keys -# we use hardcoded value in order to be estimate how much funds are available for sending or returning after tx costs have been paid +# we use hardcoded value in order to estimate how much funds are available for sending or returning after tx costs have been paid transfer_gas_fee = 21_000 # manual settings, used when gas_price_estimation_enabled is false or when it fails @@ -107,8 +212,7 @@ gas_fee_cap = 30_000_000_000 gas_tip_cap = 1_800_000_000 [[Seth.networks]] -name = "Sepolia" -chain_id = "11155111" +name = "Sepolia Testnet" transaction_timeout = "3m" eip_1559_dynamic_fees = false @@ -140,8 +244,7 @@ gas_fee_cap = 45_000_000_000 gas_tip_cap = 10_000_000_000 [[Seth.networks]] -name = "Mumbai" -chain_id = "80001" +name = "Polygon Mumbai" transaction_timeout = "3m" eip_1559_dynamic_fees = true @@ -173,8 +276,39 @@ gas_fee_cap = 3_800_000_000 gas_tip_cap = 1_800_000_000 [[Seth.networks]] -name = "zkEVM" -chain_id = "1442" +name = "Polygon Amoy" +transaction_timeout = "3m" +eip_1559_dynamic_fees = true + +# automated gas estimation for live networks +# if set to true we will dynamically estimate gas for every transaction (based on suggested values, priority and congestion rate for last X blocks) +# gas_price_estimation_enabled = true +# number of blocks to use for congestion rate estimation (it will determine buffer added on top of suggested values) +# gas_price_estimation_blocks = 100 +# transaction priority, which determines adjustment factor multiplier applied to suggested values (fast - 1.2x, standard - 1x, slow - 0.8x) +# gas_price_estimation_tx_priority = "standard" + +# URLs +# if set they will overwrite URLs from EVMNetwork that Seth uses, can be either WS(S) or HTTP(S) +# urls_secret = ["ws://your-ws-url:8546"] + +# gas_limits +# gas limit should be explicitly set only if you are connecting to a node that's incapable of estimating gas limit itself (should only happen for very old versions) +# gas_limit = 6_000_000 +# transfer_gas_fee is gas limit that will be used, when funding CL nodes and returning funds from there and when funding and returning funds from ephemeral keys +# we use hardcoded value in order to be estimate how much funds are available for sending or returning after tx costs have been paid +transfer_gas_fee = 21_000 + +# manual settings, used when gas_price_estimation_enabled is false or when it fails +# legacy transactions +gas_price = 200_000_000_000 + +# EIP-1559 transactions +gas_fee_cap = 200_000_000_000 +gas_tip_cap = 2_000_000_000 + +[[Seth.networks]] +name = "Polygon zkEVM Goerli" transaction_timeout = "3m" eip_1559_dynamic_fees = false @@ -203,4 +337,75 @@ gas_price = 50_000_000 # EIP-1559 transactions gas_fee_cap = 3_800_000_000 -gas_tip_cap = 1_800_000_000 \ No newline at end of file +gas_tip_cap = 1_800_000_000 + +[[Seth.networks]] +name = "Optimism Sepolia" +transaction_timeout = "3m" + +# if set to true we will estimate gas for every transaction +gas_price_estimation_enabled = true + +# transfer_gas_fee is gas limit that will be used, when funding CL nodes and returning funds from there and when funding and returning funds from ephemeral keys +# we use hardcoded value in order to be estimate how much funds are available for sending or returning after tx costs have been paid +transfer_gas_fee = 21_000 +# gas limit should be explicitly set only if you are connecting to a node that's incapable of estimating gas limit itself (should only happen for very old versions) +# gas_limit = 100_000_000 + +# manual settings, used when gas_price_estimation_enabled is false or when it fails +# legacy transactions +gas_price = 30_000_000_000 +# EIP-1559 transactions +eip_1559_dynamic_fees = true +gas_fee_cap = 30_000_000_000 +gas_tip_cap = 1_000_000_000 + +# how many last blocks to use, when estimating gas for a transaction +gas_price_estimation_blocks = 30 +# 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" + + +[[Seth.networks]] +name = "Base Sepolia" +transaction_timeout = "3m" + +# if set to true we will estimate gas for every transaction +gas_price_estimation_enabled = true + +# transfer_gas_fee is gas limit that will be used, when funding CL nodes and returning funds from there and when funding and returning funds from ephemeral keys +# we use hardcoded value in order to be estimate how much funds are available for sending or returning after tx costs have been paid +transfer_gas_fee = 21_000 +# gas limit should be explicitly set only if you are connecting to a node that's incapable of estimating gas limit itself (should only happen for very old versions) +# gas_limit = 100_000_000 + +# manual settings, used when gas_price_estimation_enabled is false or when it fails +# legacy transactions +gas_price = 30_000_000_000 +# EIP-1559 transactions +eip_1559_dynamic_fees = true +gas_fee_cap = 30_000_000_000 +gas_tip_cap = 1_000_000_000 + +# how many last blocks to use, when estimating gas for a transaction +gas_price_estimation_blocks = 50 +# 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" + +[[Seth.networks]] +name = "Arbitrum Sepolia" +transaction_timeout = "10m" +transfer_gas_fee = 50_000 +# gas_limit = 15_000_000 +# legacy transactions +gas_price = 200_000_000_000 +# EIP-1559 transactions +eip_1559_dynamic_fees = true +gas_fee_cap = 200_000_000_000 +gas_tip_cap = 10_000_000_000 +# if set to true we will estimate gas for every transaction +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"