Skip to content

Commit

Permalink
[CCIP-2590] Transfer Data Availability costs to the DAGasEstimator (#…
Browse files Browse the repository at this point in the history
…1161)

## Motivation
We use DAGasPriceEstimator to roughly estimate execution cost of a
message in the Exec plugin.

During this execution cost estimation, we need to account for the data
availability component:


```
type DAGasPriceEstimator struct {
    daOverheadGas       int64
    gasPerDAByte        int64  
    daMultiplier        int64
}
```
however, these fields are not used atm, they remain 0 during cost
estimation. The challenge is they live in OnRamp.sol DynamicConfig,


```
struct DynamicConfig {
    uint32 destDataAvailabilityOverheadGas; //    Extra data availability gas charged on top of the message, e.g. for OCR
    uint16 destGasPerDataAvailabilityByte; //     Amount of gas to charge per byte of message data that needs availability
    uint16 destDataAvailabilityMultiplierBps; //  Multiplier for data availability gas, multiples of bps, or 0.0001
}
 ```

We need to read them via the OnRamp reader and pass that into the DAGasPriceEstimator one way or another.
## Solution

New service implemented to transfer onRamp config to offRamp/commit plugins. It provides weak dependency between plugins and provides actual data on demand.
  • Loading branch information
valerii-kabisov-cll authored Aug 29, 2024
1 parent 87b7119 commit cfbe326
Show file tree
Hide file tree
Showing 35 changed files with 652 additions and 286 deletions.
3 changes: 3 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ packages:
PriceRegistryReader:
config:
filename: price_registry_reader_mock.go
FeeEstimatorConfigReader:
config:
filename: fee_estimator_config_mock.go
TokenPoolReader:
config:
filename: token_pool_reader_mock.go
Expand Down
12 changes: 6 additions & 6 deletions core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"

"github.com/smartcontractkit/libocr/offchainreporting2plus/types"

"github.com/smartcontractkit/chainlink-common/pkg/config"
"github.com/smartcontractkit/chainlink-common/pkg/hashutil"
"github.com/smartcontractkit/chainlink-common/pkg/merklemulti"
cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"

"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/mocks"
mocks2 "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
Expand All @@ -45,7 +43,6 @@ import (
ccipdatamocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0"

ccipdbmocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdb/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/prices"
)
Expand Down Expand Up @@ -410,7 +407,9 @@ func TestCommitReportingPlugin_Report(t *testing.T) {

evmEstimator := mocks.NewEvmFeeEstimator(t)
evmEstimator.On("L1Oracle").Return(nil)
gasPriceEstimator := prices.NewDAGasPriceEstimator(evmEstimator, nil, 2e9, 2e9) // 200% deviation

feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)
gasPriceEstimator := prices.NewDAGasPriceEstimator(evmEstimator, nil, 2e9, 2e9, feeEstimatorConfig) // 200% deviation

var destTokens []cciptypes.Address
for tk := range tc.tokenDecimals {
Expand All @@ -434,7 +433,7 @@ func TestCommitReportingPlugin_Report(t *testing.T) {
})).Return(destDecimals, nil).Maybe()

lp := mocks2.NewLogPoller(t)
commitStoreReader, err := v1_2_0.NewCommitStore(logger.TestLogger(t), utils.RandomAddress(), nil, lp)
commitStoreReader, err := v1_2_0.NewCommitStore(logger.TestLogger(t), utils.RandomAddress(), nil, lp, feeEstimatorConfig)
assert.NoError(t, err)

healthCheck := ccipcachemocks.NewChainHealthcheck(t)
Expand Down Expand Up @@ -1532,6 +1531,7 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) {
nil,
tc.daGasPriceDeviationPPB,
tc.execGasPriceDeviationPPB,
ccipdatamocks.NewFeeEstimatorConfigReader(t),
)

r := &CommitReportingPlugin{
Expand Down
4 changes: 2 additions & 2 deletions core/services/ocr2/plugins/ccip/ccipexec/initializers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ import (

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"

"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/statuschecker"

"github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip"
ccipconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/factory"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/observability"
Expand Down
19 changes: 11 additions & 8 deletions core/services/ocr2/plugins/ccip/ccipexec/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ import (
mapset "github.com/deckarep/golang-set/v2"
"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
"github.com/smartcontractkit/libocr/commontypes"
"github.com/smartcontractkit/libocr/offchainreporting2/types"
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"
"github.com/smartcontractkit/libocr/commontypes"
"github.com/smartcontractkit/libocr/offchainreporting2/types"
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"
lpMocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache"
Expand All @@ -41,8 +42,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/prices"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata"

"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
)

func TestExecutionReportingPlugin_Observation(t *testing.T) {
Expand Down Expand Up @@ -428,8 +427,10 @@ func TestExecutionReportingPlugin_buildReport(t *testing.T) {
p.metricsCollector = ccip.NoopMetricsCollector
p.commitStoreReader = commitStore

feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

lp := lpMocks.NewLogPoller(t)
offRampReader, err := v1_0_0.NewOffRamp(logger.TestLogger(t), utils.RandomAddress(), nil, lp, nil, nil)
offRampReader, err := v1_0_0.NewOffRamp(logger.TestLogger(t), utils.RandomAddress(), nil, lp, nil, nil, feeEstimatorConfig)
assert.NoError(t, err)
p.offRampReader = offRampReader

Expand Down Expand Up @@ -1376,7 +1377,9 @@ func Test_prepareTokenExecData(t *testing.T) {
}

func encodeExecutionReport(t *testing.T, report cciptypes.ExecReport) []byte {
reader, err := v1_2_0.NewOffRamp(logger.TestLogger(t), utils.RandomAddress(), nil, nil, nil, nil)
feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

reader, err := v1_2_0.NewOffRamp(logger.TestLogger(t), utils.RandomAddress(), nil, nil, nil, nil, feeEstimatorConfig)
require.NoError(t, err)
ctx := testutils.Context(t)
encodedReport, err := reader.EncodeExecutionReport(ctx, report)
Expand Down
49 changes: 49 additions & 0 deletions core/services/ocr2/plugins/ccip/estimatorconfig/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package estimatorconfig

import (
"context"
"errors"

"github.com/smartcontractkit/chainlink-common/pkg/types/ccip"
)

// FeeEstimatorConfigProvider implements abstract storage for the DataAvailability settings in onRamp dynamic Config.
// It's implemented to transfer DA config from different entities offRamp, onRamp, commitStore without injecting the
// strong dependency between modules. ConfigProvider fetch ccip.OnRampReader object reads and returns only relevant
// fields for the daGasEstimator from the encapsulated onRampReader.
type FeeEstimatorConfigProvider interface {
SetOnRampReader(reader ccip.OnRampReader)
GetDataAvailabilityConfig(ctx context.Context) (destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps int64, err error)
}

type FeeEstimatorConfigService struct {
onRampReader ccip.OnRampReader
}

func NewFeeEstimatorConfigService() *FeeEstimatorConfigService {
return &FeeEstimatorConfigService{}
}

// SetOnRampReader Sets the onRamp reader instance.
// must be called once for each instance.
func (c *FeeEstimatorConfigService) SetOnRampReader(reader ccip.OnRampReader) {
c.onRampReader = reader
}

// GetDataAvailabilityConfig Returns dynamic config data availability parameters.
// GetDynamicConfig should be cached in the onRamp reader to avoid unnecessary on-chain calls
func (c *FeeEstimatorConfigService) GetDataAvailabilityConfig(ctx context.Context) (destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps int64, err error) {
if c.onRampReader == nil {
return 0, 0, 0, errors.New("no OnRampReader has been configured")
}

cfg, err := c.onRampReader.GetDynamicConfig(ctx)
if err != nil {
return 0, 0, 0, err
}

return int64(cfg.DestDataAvailabilityOverheadGas),
int64(cfg.DestGasPerDataAvailabilityByte),
int64(cfg.DestDataAvailabilityMultiplierBps),
err
}
45 changes: 45 additions & 0 deletions core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package estimatorconfig_test

import (
"context"
"errors"
"testing"

"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/types/ccip"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/estimatorconfig"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks"
)

func TestFeeEstimatorConfigService(t *testing.T) {
svc := estimatorconfig.NewFeeEstimatorConfigService()
ctx := context.Background()

var expectedDestDataAvailabilityOverheadGas int64 = 1
var expectedDestGasPerDataAvailabilityByte int64 = 2
var expectedDestDataAvailabilityMultiplierBps int64 = 3

onRampReader := mocks.NewOnRampReader(t)
_, _, _, err := svc.GetDataAvailabilityConfig(ctx)
require.Error(t, err)
svc.SetOnRampReader(onRampReader)

onRampReader.On("GetDynamicConfig", ctx).
Return(ccip.OnRampDynamicConfig{
DestDataAvailabilityOverheadGas: uint32(expectedDestDataAvailabilityOverheadGas),
DestGasPerDataAvailabilityByte: uint16(expectedDestGasPerDataAvailabilityByte),
DestDataAvailabilityMultiplierBps: uint16(expectedDestDataAvailabilityMultiplierBps),
}, nil).Once()

destDataAvailabilityOverheadGas, destGasPerDataAvailabilityByte, destDataAvailabilityMultiplierBps, err := svc.GetDataAvailabilityConfig(ctx)
require.NoError(t, err)
require.Equal(t, expectedDestDataAvailabilityOverheadGas, destDataAvailabilityOverheadGas)
require.Equal(t, expectedDestGasPerDataAvailabilityByte, destGasPerDataAvailabilityByte)
require.Equal(t, expectedDestDataAvailabilityMultiplierBps, destDataAvailabilityMultiplierBps)

onRampReader.On("GetDynamicConfig", ctx).
Return(ccip.OnRampDynamicConfig{}, errors.New("test")).Once()
_, _, _, err = svc.GetDataAvailabilityConfig(ctx)
require.Error(t, err)
}
16 changes: 8 additions & 8 deletions core/services/ocr2/plugins/ccip/exportinternal.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ func NewEvmPriceRegistry(lp logpoller.LogPoller, ec client.Client, lggr logger.L

type VersionFinder = factory.VersionFinder

func NewCommitStoreReader(lggr logger.Logger, versionFinder VersionFinder, address ccip.Address, ec client.Client, lp logpoller.LogPoller) (ccipdata.CommitStoreReader, error) {
return factory.NewCommitStoreReader(lggr, versionFinder, address, ec, lp)
func NewCommitStoreReader(lggr logger.Logger, versionFinder VersionFinder, address ccip.Address, ec client.Client, lp logpoller.LogPoller, feeEstimatorConfig ccipdata.FeeEstimatorConfigReader) (ccipdata.CommitStoreReader, error) {
return factory.NewCommitStoreReader(lggr, versionFinder, address, ec, lp, feeEstimatorConfig)
}

func CloseCommitStoreReader(lggr logger.Logger, versionFinder VersionFinder, address ccip.Address, ec client.Client, lp logpoller.LogPoller) error {
return factory.CloseCommitStoreReader(lggr, versionFinder, address, ec, lp)
func CloseCommitStoreReader(lggr logger.Logger, versionFinder VersionFinder, address ccip.Address, ec client.Client, lp logpoller.LogPoller, feeEstimatorConfig ccipdata.FeeEstimatorConfigReader) error {
return factory.CloseCommitStoreReader(lggr, versionFinder, address, ec, lp, feeEstimatorConfig)
}

func NewOffRampReader(lggr logger.Logger, versionFinder VersionFinder, addr ccip.Address, destClient client.Client, lp logpoller.LogPoller, estimator gas.EvmFeeEstimator, destMaxGasPrice *big.Int, registerFilters bool) (ccipdata.OffRampReader, error) {
return factory.NewOffRampReader(lggr, versionFinder, addr, destClient, lp, estimator, destMaxGasPrice, registerFilters)
func NewOffRampReader(lggr logger.Logger, versionFinder VersionFinder, addr ccip.Address, destClient client.Client, lp logpoller.LogPoller, estimator gas.EvmFeeEstimator, destMaxGasPrice *big.Int, registerFilters bool, feeEstimatorConfig ccipdata.FeeEstimatorConfigReader) (ccipdata.OffRampReader, error) {
return factory.NewOffRampReader(lggr, versionFinder, addr, destClient, lp, estimator, destMaxGasPrice, registerFilters, feeEstimatorConfig)
}

func CloseOffRampReader(lggr logger.Logger, versionFinder VersionFinder, addr ccip.Address, destClient client.Client, lp logpoller.LogPoller, estimator gas.EvmFeeEstimator, destMaxGasPrice *big.Int) error {
return factory.CloseOffRampReader(lggr, versionFinder, addr, destClient, lp, estimator, destMaxGasPrice)
func CloseOffRampReader(lggr logger.Logger, versionFinder VersionFinder, addr ccip.Address, destClient client.Client, lp logpoller.LogPoller, estimator gas.EvmFeeEstimator, destMaxGasPrice *big.Int, feeEstimatorConfig ccipdata.FeeEstimatorConfigReader) error {
return factory.CloseOffRampReader(lggr, versionFinder, addr, destClient, lp, estimator, destMaxGasPrice, feeEstimatorConfig)
}

func NewEvmVersionFinder() factory.EvmVersionFinder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/stretchr/testify/require"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"

"github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big"
Expand All @@ -18,6 +17,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest"
"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache"
ccipdatamocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0"
)

Expand Down Expand Up @@ -54,7 +54,9 @@ func Test_RootsEligibleForExecution(t *testing.T) {
}
require.NoError(t, orm.InsertLogsWithBlock(ctx, inputLogs, logpoller.NewLogPollerBlock(utils.RandomBytes32(), 2, time.Now(), 1)))

commitStore, err := v1_2_0.NewCommitStore(logger.TestLogger(t), commitStoreAddr, nil, lp)
feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

commitStore, err := v1_2_0.NewCommitStore(logger.TestLogger(t), commitStoreAddr, nil, lp, feeEstimatorConfig)
require.NoError(t, err)

rootsCache := cache.NewCommitRootsCache(logger.TestLogger(t), commitStore, 10*time.Hour, time.Second)
Expand Down Expand Up @@ -162,7 +164,9 @@ func Test_RootsEligibleForExecutionWithReorgs(t *testing.T) {
}
require.NoError(t, orm.InsertLogsWithBlock(ctx, inputLogs, logpoller.NewLogPollerBlock(utils.RandomBytes32(), 3, time.Now(), 1)))

commitStore, err := v1_2_0.NewCommitStore(logger.TestLogger(t), commitStoreAddr, nil, lp)
feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

commitStore, err := v1_2_0.NewCommitStore(logger.TestLogger(t), commitStoreAddr, nil, lp, feeEstimatorConfig)
require.NoError(t, err)

rootsCache := cache.NewCommitRootsCache(logger.TestLogger(t), commitStore, 10*time.Hour, time.Second)
Expand Down Expand Up @@ -221,7 +225,9 @@ func Test_BlocksWithTheSameTimestamps(t *testing.T) {
}
require.NoError(t, orm.InsertLogsWithBlock(ctx, inputLogs, logpoller.NewLogPollerBlock(utils.RandomBytes32(), 2, time.Now(), 2)))

commitStore, err := v1_2_0.NewCommitStore(logger.TestLogger(t), commitStoreAddr, nil, lp)
feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

commitStore, err := v1_2_0.NewCommitStore(logger.TestLogger(t), commitStoreAddr, nil, lp, feeEstimatorConfig)
require.NoError(t, err)

rootsCache := cache.NewCommitRootsCache(logger.TestLogger(t), commitStore, 10*time.Hour, time.Second)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/config"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"

"github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets"
Expand All @@ -38,6 +37,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/factory"
ccipdatamocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_0_0"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0"
)
Expand Down Expand Up @@ -193,15 +193,17 @@ func TestCommitStoreReaders(t *testing.T) {
lm := new(rollupMocks.L1Oracle)
ge.On("L1Oracle").Return(lm)

feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

maxGasPrice := big.NewInt(1e8)
c10r, err := factory.NewCommitStoreReader(lggr, factory.NewEvmVersionFinder(), ccipcalc.EvmAddrToGeneric(addr), ec, lp) // ge, maxGasPrice
c10r, err := factory.NewCommitStoreReader(lggr, factory.NewEvmVersionFinder(), ccipcalc.EvmAddrToGeneric(addr), ec, lp, feeEstimatorConfig) // ge, maxGasPrice
require.NoError(t, err)
err = c10r.SetGasEstimator(ctx, ge)
require.NoError(t, err)
err = c10r.SetSourceMaxGasPrice(ctx, maxGasPrice)
require.NoError(t, err)
assert.Equal(t, reflect.TypeOf(c10r).String(), reflect.TypeOf(&v1_0_0.CommitStore{}).String())
c12r, err := factory.NewCommitStoreReader(lggr, factory.NewEvmVersionFinder(), ccipcalc.EvmAddrToGeneric(addr2), ec, lp)
c12r, err := factory.NewCommitStoreReader(lggr, factory.NewEvmVersionFinder(), ccipcalc.EvmAddrToGeneric(addr2), ec, lp, feeEstimatorConfig)
require.NoError(t, err)
err = c12r.SetGasEstimator(ctx, ge)
require.NoError(t, err)
Expand Down Expand Up @@ -412,7 +414,10 @@ func TestNewCommitStoreReader(t *testing.T) {
if tc.expectedErr == "" {
lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil)
}
_, err = factory.NewCommitStoreReader(logger.TestLogger(t), factory.NewEvmVersionFinder(), addr, c, lp)

feeEstimatorConfig := ccipdatamocks.NewFeeEstimatorConfigReader(t)

_, err = factory.NewCommitStoreReader(logger.TestLogger(t), factory.NewEvmVersionFinder(), addr, c, lp, feeEstimatorConfig)
if tc.expectedErr != "" {
require.EqualError(t, err, tc.expectedErr)
} else {
Expand Down
Loading

0 comments on commit cfbe326

Please sign in to comment.