Skip to content

Commit

Permalink
add blockhistory estimator config
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Jun 5, 2024
1 parent daf8cf6 commit 9015c61
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 12 deletions.
2 changes: 2 additions & 0 deletions core/config/docs/chains-solana.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 // 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
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b h1:pJQ3K0kUdOUICIOZBLAN+MaEfloG2t6Nc1+ve057pYc=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240603183542-58ab0f61506b/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI=
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-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo=
Expand Down
2 changes: 2 additions & 0 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,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")},
Expand Down Expand Up @@ -1143,6 +1144,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 10
ComputeUnitPriceDefault = 100
FeeBumpPeriod = '1m0s'
BlockHistoryPollPeriod = '1m0s'
[[Solana.Nodes]]
Name = 'primary'
Expand Down
1 change: 1 addition & 0 deletions core/services/chainlink/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 10
ComputeUnitPriceDefault = 100
FeeBumpPeriod = '1m0s'
BlockHistoryPollPeriod = '1m0s'

[[Solana.Nodes]]
Name = 'primary'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 0
ComputeUnitPriceDefault = 0
FeeBumpPeriod = '3s'
BlockHistoryPollPeriod = '5s'

[[Solana.Nodes]]
Name = 'primary'
Expand All @@ -601,6 +602,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 0
ComputeUnitPriceDefault = 0
FeeBumpPeriod = '3s'
BlockHistoryPollPeriod = '5s'

[[Solana.Nodes]]
Name = 'secondary'
Expand Down
1 change: 1 addition & 0 deletions core/web/resolver/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ ComputeUnitPriceMax = 1000000
ComputeUnitPriceMin = 0
ComputeUnitPriceDefault = 0
FeeBumpPeriod = '3s'
BlockHistoryPollPeriod = '5s'

[[Solana.Nodes]]
Name = 'primary'
Expand Down
2 changes: 2 additions & 0 deletions core/web/resolver/testdata/config-multi-chain-effective.toml
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 0
ComputeUnitPriceDefault = 0
FeeBumpPeriod = '3s'
BlockHistoryPollPeriod = '5s'

[[Solana.Nodes]]
Name = 'primary'
Expand All @@ -601,6 +602,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 0
ComputeUnitPriceDefault = 0
FeeBumpPeriod = '3s'
BlockHistoryPollPeriod = '5s'

[[Solana.Nodes]]
Name = 'secondary'
Expand Down
1 change: 1 addition & 0 deletions core/web/solana_chains_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ ComputeUnitPriceMax = 1000
ComputeUnitPriceMin = 0
ComputeUnitPriceDefault = 0
FeeBumpPeriod = '3s'
BlockHistoryPollPeriod = '5s'
Nodes = []
`,
}
Expand Down
7 changes: 7 additions & 0 deletions docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8157,6 +8157,7 @@ ComputeUnitPriceMax = 1000 # Default
ComputeUnitPriceMin = 0 # Default
ComputeUnitPriceDefault = 0 # Default
FeeBumpPeriod = '3s' # Default
BlockHistoryPollPeriod = '5s' # Default
```


Expand Down Expand Up @@ -8263,6 +8264,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]]
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b h1:pJQ3K0kUdOUICIOZBLAN+MaEfloG2t6Nc1+ve057pYc=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240603183542-58ab0f61506b/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI=
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-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 // 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
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b h1:pJQ3K0kUdOUICIOZBLAN+MaEfloG2t6Nc1+ve057pYc=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240603183542-58ab0f61506b/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI=
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.28.17 h1:zezoeiG3GUGW1T2+genS/HD1BvRJwC3rqFnFTFNB9aY=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/load/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 // 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
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/load/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.20240603183542-58ab0f61506b h1:pJQ3K0kUdOUICIOZBLAN+MaEfloG2t6Nc1+ve057pYc=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240603183542-58ab0f61506b/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI=
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.28.17 h1:zezoeiG3GUGW1T2+genS/HD1BvRJwC3rqFnFTFNB9aY=
Expand Down

0 comments on commit 9015c61

Please sign in to comment.