From 0e619c6bcedd46fba734d0ab660d3e5a5c2a1459 Mon Sep 17 00:00:00 2001 From: Oliver Townsend Date: Thu, 30 Jan 2025 16:13:19 -0800 Subject: [PATCH] Add disable chain fee deviation check option --- commit/chainfee/outcome.go | 6 ++++++ pluginconfig/commit.go | 2 ++ 2 files changed, 8 insertions(+) diff --git a/commit/chainfee/outcome.go b/commit/chainfee/outcome.go index d752670b1..84d9da47c 100644 --- a/commit/chainfee/outcome.go +++ b/commit/chainfee/outcome.go @@ -254,6 +254,12 @@ func (p *processor) getGasPricesToUpdate( if feeInfo == nil { continue } + + if p.cfg.DisableChainFeeDeviationCheck { + lggr.Debugf("chain fee deviation check disabled, skipping deviation check for chain %d", chain) + continue + } + ci, ok := feeInfo[chain] if !ok { lggr.Warnf("could not find fee info for chain %d", chain) diff --git a/pluginconfig/commit.go b/pluginconfig/commit.go index eef1536d6..a6cf668af 100644 --- a/pluginconfig/commit.go +++ b/pluginconfig/commit.go @@ -82,6 +82,8 @@ type CommitOffchainConfig struct { //TODO: Rename to something with ChainFee RemoteGasPriceBatchWriteFrequency commonconfig.Duration `json:"remoteGasPriceBatchWriteFrequency"` + DisableChainFeeDeviationCheck bool `json:"disableChainFeeDeviationCheck"` + FeeInfo map[cciptypes.ChainSelector]FeeInfo `json:"feeInfo"` // TokenPriceBatchWriteFrequency is the frequency at which the commit plugin should