From 7d09fa8022960a6c5fc8e32b80633ab58a4c29c4 Mon Sep 17 00:00:00 2001 From: Kashif Siddiqui Date: Wed, 12 Jun 2024 10:31:44 +0900 Subject: [PATCH] Remove HistoryDepth-FinalityDepth validation check --- .changeset/healthy-plants-guess.md | 5 +++++ core/chains/evm/config/toml/config.go | 4 ---- core/services/chainlink/config_test.go | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .changeset/healthy-plants-guess.md diff --git a/.changeset/healthy-plants-guess.md b/.changeset/healthy-plants-guess.md new file mode 100644 index 00000000000..6ec74b5a040 --- /dev/null +++ b/.changeset/healthy-plants-guess.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal removed HistoryDepth to FinalityDepth validation diff --git a/core/chains/evm/config/toml/config.go b/core/chains/evm/config/toml/config.go index dd724a6689c..d35f9bd0a3b 100644 --- a/core/chains/evm/config/toml/config.go +++ b/core/chains/evm/config/toml/config.go @@ -380,10 +380,6 @@ func (c *Chain) ValidateConfig() (err error) { err = multierr.Append(err, commonconfig.ErrInvalid{Name: "GasEstimator.BumpTxDepth", Value: *c.GasEstimator.BumpTxDepth, Msg: "must be less than or equal to Transactions.MaxInFlight"}) } - if *c.HeadTracker.HistoryDepth < *c.FinalityDepth { - err = multierr.Append(err, commonconfig.ErrInvalid{Name: "HeadTracker.HistoryDepth", Value: *c.HeadTracker.HistoryDepth, - Msg: "must be equal to or greater than FinalityDepth"}) - } if *c.FinalityDepth < 1 { err = multierr.Append(err, commonconfig.ErrInvalid{Name: "FinalityDepth", Value: *c.FinalityDepth, Msg: "must be greater than or equal to 1"}) diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 11fbfbea3b3..a77ac06ec1e 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1282,11 +1282,10 @@ func TestConfig_Validate(t *testing.T) { - WSURL: missing: required for primary nodes - HTTPURL: missing: required for all nodes - 1.HTTPURL: missing: required for all nodes - - 1: 10 errors: + - 1: 9 errors: - ChainType: invalid value (Foo): must not be set with this chain id - Nodes: missing: must have at least one node - ChainType: invalid value (Foo): must be one of arbitrum, celo, gnosis, kroma, metis, optimismBedrock, scroll, wemix, xlayer, zkevm, zksync or omitted - - HeadTracker.HistoryDepth: invalid value (30): must be equal to or greater than FinalityDepth - GasEstimator.BumpThreshold: invalid value (0): cannot be 0 if auto-purge feature is enabled for Foo - Transactions.AutoPurge.Threshold: missing: needs to be set if auto-purge feature is enabled for Foo - Transactions.AutoPurge.MinAttempts: missing: needs to be set if auto-purge feature is enabled for Foo