From 046f470736099c431e351f8023e35a321cb28a3b Mon Sep 17 00:00:00 2001 From: aalu1418 <50029043+aalu1418@users.noreply.github.com> Date: Tue, 28 May 2024 15:22:36 -0600 Subject: [PATCH] add blockhistory estimator config --- core/config/docs/chains-solana.toml | 2 ++ core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- core/services/chainlink/config_test.go | 2 ++ core/services/chainlink/testdata/config-full.toml | 1 + .../chainlink/testdata/config-multi-chain-effective.toml | 2 ++ core/web/resolver/testdata/config-full.toml | 1 + .../resolver/testdata/config-multi-chain-effective.toml | 2 ++ core/web/solana_chains_controller_test.go | 1 + docs/CONFIG.md | 7 +++++++ go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- 16 files changed, 30 insertions(+), 12 deletions(-) diff --git a/core/config/docs/chains-solana.toml b/core/config/docs/chains-solana.toml index d0aae876b43..9376445061a 100644 --- a/core/config/docs/chains-solana.toml +++ b/core/config/docs/chains-solana.toml @@ -34,6 +34,8 @@ ComputeUnitPriceMin = 0 # Default ComputeUnitPriceDefault = 0 # Default # FeeBumpPeriod is the amount of time before a tx is retried with a fee bump FeeBumpPeriod = '3s' # Default +# BlockHistoryPollPeriod is the rate to poll for blocks in the block history fee estimator +BlockHistoryPollPeriod = '5s' # Default [[Solana.Nodes]] # Name is a unique (per-chain) identifier for this node. diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 02f51f6ef3c..7a1d1977230 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -259,7 +259,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index a2c386ee704..72ad15aa02e 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1193,8 +1193,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 h1:ybdconEoRBHLwtDKlZKYaeanQ8UoVqdDiaTlPV+qEiI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 h1:z9jrn5RMlKY508ku+MnKdg5uC8kWBAiCbtDWDQ8d5vk= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 h1:5QNKQTQpIp+0ogXUu9B85tEie473RZttOhYxM2vHyOc= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 2aa1d26c326..13c47b8c2df 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -654,6 +654,7 @@ func TestConfig_Marshal(t *testing.T) { ComputeUnitPriceMin: ptr[uint64](10), ComputeUnitPriceDefault: ptr[uint64](100), FeeBumpPeriod: commoncfg.MustNewDuration(time.Minute), + BlockHistoryPollPeriod: commoncfg.MustNewDuration(time.Minute), }, Nodes: []*solcfg.Node{ {Name: ptr("primary"), URL: commoncfg.MustParseURL("http://solana.web")}, @@ -1138,6 +1139,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 10 ComputeUnitPriceDefault = 100 FeeBumpPeriod = '1m0s' +BlockHistoryPollPeriod = '1m0s' [[Solana.Nodes]] Name = 'primary' diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index 356a6d69930..533d110c10e 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -439,6 +439,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 10 ComputeUnitPriceDefault = 100 FeeBumpPeriod = '1m0s' +BlockHistoryPollPeriod = '1m0s' [[Solana.Nodes]] Name = 'primary' diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 25d62801455..942f55c9fa8 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -573,6 +573,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 0 ComputeUnitPriceDefault = 0 FeeBumpPeriod = '3s' +BlockHistoryPollPeriod = '5s' [[Solana.Nodes]] Name = 'primary' @@ -595,6 +596,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 0 ComputeUnitPriceDefault = 0 FeeBumpPeriod = '3s' +BlockHistoryPollPeriod = '5s' [[Solana.Nodes]] Name = 'secondary' diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index 2b6d728df95..5aeb4c2370e 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -438,6 +438,7 @@ ComputeUnitPriceMax = 1000000 ComputeUnitPriceMin = 0 ComputeUnitPriceDefault = 0 FeeBumpPeriod = '3s' +BlockHistoryPollPeriod = '5s' [[Solana.Nodes]] Name = 'primary' diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index 25d62801455..942f55c9fa8 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -573,6 +573,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 0 ComputeUnitPriceDefault = 0 FeeBumpPeriod = '3s' +BlockHistoryPollPeriod = '5s' [[Solana.Nodes]] Name = 'primary' @@ -595,6 +596,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 0 ComputeUnitPriceDefault = 0 FeeBumpPeriod = '3s' +BlockHistoryPollPeriod = '5s' [[Solana.Nodes]] Name = 'secondary' diff --git a/core/web/solana_chains_controller_test.go b/core/web/solana_chains_controller_test.go index a2ac904b783..048a3790b1a 100644 --- a/core/web/solana_chains_controller_test.go +++ b/core/web/solana_chains_controller_test.go @@ -57,6 +57,7 @@ ComputeUnitPriceMax = 1000 ComputeUnitPriceMin = 0 ComputeUnitPriceDefault = 0 FeeBumpPeriod = '3s' +BlockHistoryPollPeriod = '5s' Nodes = [] `, } diff --git a/docs/CONFIG.md b/docs/CONFIG.md index c7b34dea7f2..1e0a7030143 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -8023,6 +8023,7 @@ ComputeUnitPriceMax = 1000 # Default ComputeUnitPriceMin = 0 # Default ComputeUnitPriceDefault = 0 # Default FeeBumpPeriod = '3s' # Default +BlockHistoryPollPeriod = '5s' # Default ``` @@ -8129,6 +8130,12 @@ FeeBumpPeriod = '3s' # Default ``` FeeBumpPeriod is the amount of time before a tx is retried with a fee bump +### BlockHistoryPollPeriod +```toml +BlockHistoryPollPeriod = '5s' # Default +``` +BlockHistoryPollPeriod is the rate to poll for blocks in the block history fee estimator + ## Solana.Nodes ```toml [[Solana.Nodes]] diff --git a/go.mod b/go.mod index affee1f60f0..41fcf7b5ad9 100644 --- a/go.mod +++ b/go.mod @@ -76,7 +76,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/go.sum b/go.sum index 5bef3d55d6a..258cf0de906 100644 --- a/go.sum +++ b/go.sum @@ -1179,8 +1179,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 h1:ybdconEoRBHLwtDKlZKYaeanQ8UoVqdDiaTlPV+qEiI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 h1:z9jrn5RMlKY508ku+MnKdg5uC8kWBAiCbtDWDQ8d5vk= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 h1:5QNKQTQpIp+0ogXUu9B85tEie473RZttOhYxM2vHyOc= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 5a1b8592507..e08690c1531 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -378,7 +378,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index fd668c30838..d77fb946b89 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1520,8 +1520,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 h1:ybdconEoRBHLwtDKlZKYaeanQ8UoVqdDiaTlPV+qEiI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 h1:z9jrn5RMlKY508ku+MnKdg5uC8kWBAiCbtDWDQ8d5vk= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 h1:5QNKQTQpIp+0ogXUu9B85tEie473RZttOhYxM2vHyOc= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= github.com/smartcontractkit/chainlink-testing-framework v1.28.17 h1:zezoeiG3GUGW1T2+genS/HD1BvRJwC3rqFnFTFNB9aY= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 9ae07767184..3a7bf7eb172 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -367,7 +367,7 @@ require ( github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240328204215-ac91f55f1449 // indirect github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index e36f0f2410d..c3e6bc2ddcc 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1510,8 +1510,8 @@ github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20 h1:ybdconEoRBHLwtDKlZKYaeanQ8UoVqdDiaTlPV+qEiI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240524201401-88d0b3763b20/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94 h1:z9jrn5RMlKY508ku+MnKdg5uC8kWBAiCbtDWDQ8d5vk= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240528212006-743a9c8cda94/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0 h1:5QNKQTQpIp+0ogXUu9B85tEie473RZttOhYxM2vHyOc= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240527073251-56197f1413e0/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= github.com/smartcontractkit/chainlink-testing-framework v1.28.17 h1:zezoeiG3GUGW1T2+genS/HD1BvRJwC3rqFnFTFNB9aY=