From 444eff3adefe9c2e080382e2b8f38de599f21501 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 1 Oct 2025 13:28:08 +0200 Subject: [PATCH 1/6] Minor. --- core/bridges/orm_test.go | 4 +- .../ccip/configs/evm/contract_reader.go | 32 +++++------ core/cmd/jobs_commands_test.go | 4 +- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 +- core/services/job/helpers_test.go | 10 ++-- .../job/job_pipeline_orm_integration_test.go | 4 +- core/services/job/models.go | 32 +++++------ core/services/job/orm.go | 14 ++--- core/services/job/orm_test.go | 16 +++--- core/services/job/runner_integration_test.go | 13 ++--- .../ccip/testhelpers/integration/jobspec.go | 7 ++- .../generic/pipeline_runner_adapter.go | 4 +- .../ocr2/plugins/median/config/config.go | 8 +-- .../ocr2/plugins/median/config/config_test.go | 18 +++---- core/services/ocrcommon/data_source_test.go | 8 +-- core/services/pipeline/mocks/orm.go | 22 ++++---- core/services/pipeline/models.go | 13 +++-- core/services/pipeline/orm.go | 6 +-- core/services/pipeline/orm_test.go | 14 ++--- core/services/pipeline/runner.go | 4 +- core/services/relay/evm/types/types.go | 3 +- core/services/relay/evm/types/types_test.go | 6 +-- core/store/migrate/migrate_test.go | 29 +++++----- core/store/models/common.go | 50 ----------------- core/store/models/common_test.go | 54 ------------------- core/web/presenters/job.go | 49 ++++++++--------- core/web/presenters/job_test.go | 29 +++++----- core/web/resolver/job_test.go | 10 ++-- core/web/resolver/spec_test.go | 22 ++++---- deployment/go.mod | 2 +- deployment/go.sum | 4 +- go.mod | 2 +- go.sum | 4 +- .../actions/automation_ocr_helpers_local.go | 10 ++-- .../actions/automationv2/actions.go | 6 +-- integration-tests/actions/ocr2_helpers.go | 11 ++-- .../actions/ocr2_helpers_local.go | 11 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 +- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 +- integration-tests/utils/cl_node_jobs.go | 6 +-- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 +- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 +- 47 files changed, 232 insertions(+), 339 deletions(-) diff --git a/core/bridges/orm_test.go b/core/bridges/orm_test.go index 2c9afbcd593..9d40fd1ca48 100644 --- a/core/bridges/orm_test.go +++ b/core/bridges/orm_test.go @@ -10,6 +10,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -18,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func setupORM(t *testing.T) (*sqlx.DB, bridges.ORM) { @@ -144,7 +144,7 @@ func TestORM_TestCachedResponse(t *testing.T) { orm := bridges.NewORM(db) trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) _, err = orm.GetCachedResponse(ctx, "dot", specID, 1*time.Second) diff --git a/core/capabilities/ccip/configs/evm/contract_reader.go b/core/capabilities/ccip/configs/evm/contract_reader.go index 46b19aeab2a..c74d801d0c3 100644 --- a/core/capabilities/ccip/configs/evm/contract_reader.go +++ b/core/capabilities/ccip/configs/evm/contract_reader.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/pkg/consts" "github.com/smartcontractkit/chainlink-common/pkg/codec" + "github.com/smartcontractkit/chainlink-common/pkg/types" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -24,7 +25,6 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/aggregator_v3_interface" evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) const ( @@ -74,7 +74,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ mustGetEventName(consts.EventNameCommitReportAccepted, offrampABI), }, PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -135,7 +135,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: nonce_manager.NonceManagerABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -153,7 +153,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: fee_quoter.FeeQuoterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -203,7 +203,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_remote.RMNRemoteABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -225,7 +225,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_proxy_contract.RMNProxyABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -239,7 +239,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: router.RouterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -262,7 +262,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ consts.EventNameCCIPMessageSent, }, PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -308,7 +308,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: router.RouterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -322,7 +322,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: fee_quoter.FeeQuoterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -352,7 +352,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_remote.RMNRemoteABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -381,7 +381,7 @@ var FeedReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: aggregator_v3_interface.AggregatorV3InterfaceABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -403,7 +403,7 @@ var USDCReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ GenericEventNames: []string{consts.EventNameCCTPMessageSent}, PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -433,7 +433,7 @@ var HomeChainReaderConfigRaw = evmrelaytypes.ChainReaderConfig{ ContractABI: kcr.CapabilitiesRegistryABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -446,7 +446,7 @@ var HomeChainReaderConfigRaw = evmrelaytypes.ChainReaderConfig{ ContractABI: ccip_home.CCIPHomeABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -462,7 +462,7 @@ var HomeChainReaderConfigRaw = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_home.RMNHomeABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: models.Interval(DefaultCCIPLogsRetention), + Retention: types.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ diff --git a/core/cmd/jobs_commands_test.go b/core/cmd/jobs_commands_test.go index 2ba5f1ae550..5d25b7285b7 100644 --- a/core/cmd/jobs_commands_test.go +++ b/core/cmd/jobs_commands_test.go @@ -16,12 +16,12 @@ import ( "github.com/smartcontractkit/freeport" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -33,7 +33,7 @@ func TestJobPresenter_RenderTable(t *testing.T) { name = "Job 1" jobSpecType = "fluxmonitor" schemaVersion = uint32(1) - maxTaskDuration = models.Interval(1 * time.Second) + maxTaskDuration = types.Interval(1 * time.Second) createdAt = time.Now() updatedAt = time.Now().Add(time.Second) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 11b7b368154..1fc1b2fd7be 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -47,7 +47,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 7e8561a42d3..78f79a5935c 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1597,8 +1597,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/core/services/job/helpers_test.go b/core/services/job/helpers_test.go index 80391bbbc9d..58d93ce0d2a 100644 --- a/core/services/job/helpers_test.go +++ b/core/services/job/helpers_test.go @@ -17,6 +17,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" chainlinkevmbig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -27,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) const ( @@ -199,10 +199,10 @@ func compareOCRJobSpecs(t *testing.T, expected, actual job.Job) { func makeMinimalHTTPOracleSpec(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralConfig, contractAddress, transmitterAddress, keyBundle, fetchUrl, timeout string) *job.Job { var ocrSpec = job.OCROracleSpec{ P2PV2Bootstrappers: pq.StringArray{}, - ObservationTimeout: models.Interval(10 * time.Second), - BlockchainTimeout: models.Interval(20 * time.Second), - ContractConfigTrackerSubscribeInterval: models.Interval(2 * time.Minute), - ContractConfigTrackerPollInterval: models.Interval(1 * time.Minute), + ObservationTimeout: types.Interval(10 * time.Second), + BlockchainTimeout: types.Interval(20 * time.Second), + ContractConfigTrackerSubscribeInterval: types.Interval(2 * time.Minute), + ContractConfigTrackerPollInterval: types.Interval(1 * time.Minute), ContractConfigConfirmations: uint16(3), EVMChainID: chainlinkevmbig.New(testutils.FixtureChainID), } diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go index afa22838f7a..74b877a673f 100644 --- a/core/services/job/job_pipeline_orm_integration_test.go +++ b/core/services/job/job_pipeline_orm_integration_test.go @@ -10,6 +10,7 @@ import ( "github.com/jmoiron/sqlx" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink/v2/core/bridges" @@ -21,7 +22,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func clearJobsDb(t *testing.T, db *sqlx.DB) { @@ -135,7 +135,7 @@ func TestPipelineORM_Integration(t *testing.T) { p, err := pipeline.Parse(DotStr) require.NoError(t, err) - specID, err = orm.CreateSpec(ctx, *p, models.Interval(0)) + specID, err = orm.CreateSpec(ctx, *p, types.Interval(0)) require.NoError(t, err) var pipelineSpecs []pipeline.Spec diff --git a/core/services/job/models.go b/core/services/job/models.go index 8aa1006e12f..bd8f021a642 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -190,7 +190,7 @@ type Job struct { GasLimit clnull.Uint32 `toml:"gasLimit"` ForwardingAllowed bool `toml:"forwardingAllowed"` Name null.String `toml:"name"` - MaxTaskDuration models.Interval + MaxTaskDuration types.Interval Pipeline pipeline.Pipeline `toml:"observationSource"` CreatedAt time.Time } @@ -279,15 +279,15 @@ type OCROracleSpec struct { IsBootstrapPeer bool `toml:"isBootstrapPeer"` EncryptedOCRKeyBundleID *models.Sha256Hash `toml:"keyBundleID"` TransmitterAddress *evmtypes.EIP55Address `toml:"transmitterAddress"` - ObservationTimeout models.Interval `toml:"observationTimeout"` - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval models.Interval `toml:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` + ObservationTimeout types.Interval `toml:"observationTimeout"` + BlockchainTimeout types.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval types.Interval `toml:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` EVMChainID *big.Big `toml:"evmChainID" db:"evm_chain_id"` - DatabaseTimeout *models.Interval `toml:"databaseTimeout"` - ObservationGracePeriod *models.Interval `toml:"observationGracePeriod"` - ContractTransmitterTransmitTimeout *models.Interval `toml:"contractTransmitterTransmitTimeout"` + DatabaseTimeout *types.Interval `toml:"databaseTimeout"` + ObservationGracePeriod *types.Interval `toml:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *types.Interval `toml:"contractTransmitterTransmitTimeout"` CaptureEATelemetry bool `toml:"captureEATelemetry"` CreatedAt time.Time `toml:"-"` UpdatedAt time.Time `toml:"-"` @@ -377,8 +377,8 @@ type OCR2OracleSpec struct { OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` MonitoringEndpoint null.String `toml:"monitoringEndpoint"` TransmitterID null.String `toml:"transmitterID"` - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` + BlockchainTimeout types.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` OnchainSigningStrategy JSONConfig `toml:"onchainSigningStrategy"` PluginConfig JSONConfig `toml:"pluginConfig"` @@ -781,12 +781,12 @@ type BootstrapSpec struct { FeedID *common.Hash `toml:"feedID"` Relay string `toml:"relay"` // RelayID.Network RelayConfig JSONConfig - MonitoringEndpoint null.String `toml:"monitoringEndpoint"` - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + MonitoringEndpoint null.String `toml:"monitoringEndpoint"` + BlockchainTimeout types.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } // AsOCR2Spec transforms the bootstrap spec into a generic OCR2 format to enable code sharing between specs. diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 6f7b3f5280f..6e0ca0f7dcf 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -948,28 +948,28 @@ type OCRConfig interface { // LoadConfigVarsLocalOCR loads local OCR vars into the OCROracleSpec. func LoadConfigVarsLocalOCR(evmOcrCfg evmconfig.OCR, os OCROracleSpec, ocrCfg OCRConfig) *OCROracleSpec { if os.ObservationTimeout == 0 { - os.ObservationTimeout = models.Interval(ocrCfg.ObservationTimeout()) + os.ObservationTimeout = types.Interval(ocrCfg.ObservationTimeout()) } if os.BlockchainTimeout == 0 { - os.BlockchainTimeout = models.Interval(ocrCfg.BlockchainTimeout()) + os.BlockchainTimeout = types.Interval(ocrCfg.BlockchainTimeout()) } if os.ContractConfigTrackerSubscribeInterval == 0 { - os.ContractConfigTrackerSubscribeInterval = models.Interval(ocrCfg.ContractSubscribeInterval()) + os.ContractConfigTrackerSubscribeInterval = types.Interval(ocrCfg.ContractSubscribeInterval()) } if os.ContractConfigTrackerPollInterval == 0 { - os.ContractConfigTrackerPollInterval = models.Interval(ocrCfg.ContractPollInterval()) + os.ContractConfigTrackerPollInterval = types.Interval(ocrCfg.ContractPollInterval()) } if os.ContractConfigConfirmations == 0 { os.ContractConfigConfirmations = evmOcrCfg.ContractConfirmations() } if os.DatabaseTimeout == nil { - os.DatabaseTimeout = models.NewInterval(evmOcrCfg.DatabaseTimeout()) + os.DatabaseTimeout = types.NewInterval(evmOcrCfg.DatabaseTimeout()) } if os.ObservationGracePeriod == nil { - os.ObservationGracePeriod = models.NewInterval(evmOcrCfg.ObservationGracePeriod()) + os.ObservationGracePeriod = types.NewInterval(evmOcrCfg.ObservationGracePeriod()) } if os.ContractTransmitterTransmitTimeout == nil { - os.ContractTransmitterTransmitTimeout = models.NewInterval(evmOcrCfg.ContractTransmitterTransmitTimeout()) + os.ContractTransmitterTransmitTimeout = types.NewInterval(evmOcrCfg.ContractTransmitterTransmitTimeout()) } os.CaptureEATelemetry = ocrCfg.CaptureEATelemetry() diff --git a/core/services/job/orm_test.go b/core/services/job/orm_test.go index 6bfe141ad59..9b981776a6c 100644 --- a/core/services/job/orm_test.go +++ b/core/services/job/orm_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -17,7 +18,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func NewTestORM(t *testing.T, ds sqlutil.DataSource, pipelineORM pipeline.ORM, bridgeORM bridges.ORM, keyStore keystore.Master) job.ORM { @@ -35,16 +35,16 @@ func TestLoadConfigVarsLocalOCR(t *testing.T) { jobSpec = job.LoadConfigVarsLocalOCR(chainConfig.EVM().OCR(), *jobSpec, config.OCR()) - require.Equal(t, models.Interval(config.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) - require.Equal(t, models.Interval(config.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) - require.Equal(t, models.Interval(config.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) - require.Equal(t, models.Interval(config.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) + require.Equal(t, types.Interval(config.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) + require.Equal(t, types.Interval(config.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) + require.Equal(t, types.Interval(config.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) + require.Equal(t, types.Interval(config.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) require.Equal(t, config.OCR().CaptureEATelemetry(), jobSpec.CaptureEATelemetry) require.Equal(t, chainConfig.EVM().OCR().ContractConfirmations(), jobSpec.ContractConfigConfirmations) - require.Equal(t, models.Interval(chainConfig.EVM().OCR().DatabaseTimeout()), *jobSpec.DatabaseTimeout) - require.Equal(t, models.Interval(chainConfig.EVM().OCR().ObservationGracePeriod()), *jobSpec.ObservationGracePeriod) - require.Equal(t, models.Interval(chainConfig.EVM().OCR().ContractTransmitterTransmitTimeout()), *jobSpec.ContractTransmitterTransmitTimeout) + require.Equal(t, types.Interval(chainConfig.EVM().OCR().DatabaseTimeout()), *jobSpec.DatabaseTimeout) + require.Equal(t, types.Interval(chainConfig.EVM().OCR().ObservationGracePeriod()), *jobSpec.ObservationGracePeriod) + require.Equal(t, types.Interval(chainConfig.EVM().OCR().ContractTransmitterTransmitTimeout()), *jobSpec.ContractTransmitterTransmitTimeout) } func TestSetDRMinIncomingConfirmations(t *testing.T) { diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index f3ffbd29cdb..de6a50d4f96 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -26,6 +26,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -462,7 +463,7 @@ answer1 [type=median index=0]; require.NoError(t, err) err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) - jb.MaxTaskDuration = models.Interval(cltest.MustParseDuration(t, "1s")) + jb.MaxTaskDuration = commontypes.Interval(cltest.MustParseDuration(t, "1s")) err = jobORM.CreateJob(testutils.Context(t), &jb) require.NoError(t, err) @@ -499,10 +500,10 @@ answer1 [type=median index=0]; err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) - jb.MaxTaskDuration = models.Interval(cltest.MustParseDuration(t, "1s")) + jb.MaxTaskDuration = commontypes.Interval(cltest.MustParseDuration(t, "1s")) err = jobORM.CreateJob(testutils.Context(t), &jb) require.NoError(t, err) - assert.Equal(t, jb.MaxTaskDuration, models.Interval(cltest.MustParseDuration(t, "1s"))) + assert.Equal(t, jb.MaxTaskDuration, commontypes.Interval(cltest.MustParseDuration(t, "1s"))) lggr := logger.TestLogger(t) pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), db, lggr) @@ -591,10 +592,10 @@ answer1 [type=median index=0]; err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) - jb.MaxTaskDuration = models.Interval(cltest.MustParseDuration(t, "1s")) + jb.MaxTaskDuration = commontypes.Interval(cltest.MustParseDuration(t, "1s")) err = jobORM.CreateJob(testutils.Context(t), &jb) require.NoError(t, err) - assert.Equal(t, jb.MaxTaskDuration, models.Interval(cltest.MustParseDuration(t, "1s"))) + assert.Equal(t, jb.MaxTaskDuration, commontypes.Interval(cltest.MustParseDuration(t, "1s"))) lggr := logger.TestLogger(t) pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), db, lggr) @@ -735,7 +736,7 @@ answer1 [type=median index=0]; // Job specified task timeout should fail. jb = makeMinimalHTTPOracleSpec(t, db, config, cltest.NewEIP55Address().String(), transmitterAddress.Hex(), cltest.DefaultOCRKeyBundleID, serv.URL, "") - jb.MaxTaskDuration = models.Interval(time.Duration(1)) + jb.MaxTaskDuration = commontypes.Interval(time.Duration(1)) jb.Name = null.NewString("a job 3", true) err = jobORM.CreateJob(ctx, jb) require.NoError(t, err) diff --git a/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go b/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go index 226d2133df8..3cffb871ca8 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go @@ -19,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/pricegetter" "github.com/smartcontractkit/chainlink/v2/core/services/relay" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) // OCR2TaskJobSpec represents an OCR2 job that is given to other nodes, meant to communicate with the bootstrap node, @@ -249,7 +248,7 @@ func (params CCIPJobSpecParams) CommitJobSpec() (*OCR2TaskJobSpec, error) { PluginType: types.CCIPCommit, ContractID: params.CommitStore.Hex(), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: models.Interval(20 * time.Second), + ContractConfigTrackerPollInterval: types.Interval(20 * time.Second), P2PV2Bootstrappers: params.P2PV2Bootstrappers, PluginConfig: pluginConfig, RelayConfig: map[string]interface{}{ @@ -281,7 +280,7 @@ func (params CCIPJobSpecParams) ExecutionJobSpec() (*OCR2TaskJobSpec, error) { PluginType: types.CCIPExecution, ContractID: params.OffRamp.Hex(), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: models.Interval(20 * time.Second), + ContractConfigTrackerPollInterval: types.Interval(20 * time.Second), P2PV2Bootstrappers: params.P2PV2Bootstrappers, PluginConfig: map[string]interface{}{}, @@ -324,7 +323,7 @@ func (params CCIPJobSpecParams) BootstrapJob(contractID string) *OCR2TaskJobSpec ContractID: contractID, Relay: relay.NetworkEVM, ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: models.Interval(20 * time.Second), + ContractConfigTrackerPollInterval: types.Interval(20 * time.Second), RelayConfig: map[string]interface{}{ "chainID": params.DestEvmChainId, }, diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go index 994f043ebca..723c6e45462 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go @@ -4,12 +4,12 @@ import ( "context" "time" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) var _ core.PipelineRunnerService = (*PipelineRunnerAdapter)(nil) @@ -28,7 +28,7 @@ func (p *PipelineRunnerAdapter) ExecuteRun(ctx context.Context, spec string, var s := pipeline.Spec{ DotDagSource: spec, CreatedAt: time.Now(), - MaxTaskDuration: models.Interval(options.MaxTaskDuration), + MaxTaskDuration: types.Interval(options.MaxTaskDuration), JobID: p.job.ID, JobName: p.job.Name.ValueOrZero(), JobType: string(p.job.Type), diff --git a/core/services/ocr2/plugins/median/config/config.go b/core/services/ocr2/plugins/median/config/config.go index b7dd5afd55c..61f10cdef8d 100644 --- a/core/services/ocr2/plugins/median/config/config.go +++ b/core/services/ocr2/plugins/median/config/config.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) type DeviationFunctionDefinition map[string]any @@ -27,9 +27,9 @@ type PluginConfig struct { } type JuelsPerFeeCoinCache struct { - Disable bool `json:"disable"` - UpdateInterval models.Interval `json:"updateInterval"` - StalenessAlertThreshold models.Interval `json:"stalenessAlertThreshold"` + Disable bool `json:"disable"` + UpdateInterval types.Interval `json:"updateInterval"` + StalenessAlertThreshold types.Interval `json:"stalenessAlertThreshold"` } // ValidatePluginConfig validates the arguments for the Median plugin. diff --git a/core/services/ocr2/plugins/median/config/config_test.go b/core/services/ocr2/plugins/median/config/config_test.go index 9bb850448be..2b800791d6f 100644 --- a/core/services/ocr2/plugins/median/config/config_test.go +++ b/core/services/ocr2/plugins/median/config/config_test.go @@ -7,22 +7,22 @@ import ( "github.com/stretchr/testify/assert" - "github.com/smartcontractkit/chainlink/v2/core/store/models" + "github.com/smartcontractkit/chainlink-common/pkg/types" ) func TestValidatePluginConfig(t *testing.T) { type testCase struct { name string pipeline string - cacheDuration models.Interval + cacheDuration types.Interval expectedError error } t.Run("pipeline validation", func(t *testing.T) { for _, tc := range []testCase{ - {"empty pipeline", "", models.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, - {"blank pipeline", " ", models.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, - {"foo pipeline", "foo", models.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: UnmarshalTaskFromMap: unknown task type: \"\"")}, + {"empty pipeline", "", types.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, + {"blank pipeline", " ", types.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, + {"foo pipeline", "foo", types.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: UnmarshalTaskFromMap: unknown task type: \"\"")}, } { t.Run(tc.name, func(t *testing.T) { pc := PluginConfig{JuelsPerFeeCoinPipeline: tc.pipeline} @@ -33,8 +33,8 @@ func TestValidatePluginConfig(t *testing.T) { t.Run("cache duration validation", func(t *testing.T) { for _, tc := range []testCase{ - {"cache duration below minimum", `ds1 [type=bridge name=voter_turnout];`, models.Interval(time.Second * 29), errors.New("juelsPerFeeCoinSourceCache update interval: 29s is below 30 second minimum")}, - {"cache duration above maximum", `ds1 [type=bridge name=voter_turnout];`, models.Interval(time.Minute*20 + time.Second), errors.New("juelsPerFeeCoinSourceCache update interval: 20m1s is above 20 minute maximum")}, + {"cache duration below minimum", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Second * 29), errors.New("juelsPerFeeCoinSourceCache update interval: 29s is below 30 second minimum")}, + {"cache duration above maximum", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Minute*20 + time.Second), errors.New("juelsPerFeeCoinSourceCache update interval: 20m1s is above 20 minute maximum")}, } { t.Run(tc.name, func(t *testing.T) { pc := PluginConfig{JuelsPerFeeCoinPipeline: tc.pipeline, JuelsPerFeeCoinCache: &JuelsPerFeeCoinCache{UpdateInterval: tc.cacheDuration}} @@ -46,8 +46,8 @@ func TestValidatePluginConfig(t *testing.T) { t.Run("valid values", func(t *testing.T) { for _, s := range []testCase{ {"valid 0 cache duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, 0, nil}, - {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, models.Interval(time.Second * 30), nil}, - {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, models.Interval(time.Minute * 20), nil}, + {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Second * 30), nil}, + {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Minute * 20), nil}, } { t.Run(s.name, func(t *testing.T) { pc := PluginConfig{JuelsPerFeeCoinPipeline: s.pipeline} diff --git a/core/services/ocrcommon/data_source_test.go b/core/services/ocrcommon/data_source_test.go index 29b33a409d0..a96471d8405 100644 --- a/core/services/ocrcommon/data_source_test.go +++ b/core/services/ocrcommon/data_source_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" serializablebig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -25,7 +26,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" pipelinemocks "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) var ( @@ -80,7 +80,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { mockKVStore := mocks.KVStore{} mockKVStore.On("Store", mock.Anything, mock.Anything, mock.Anything).Return(nil) mockKVStore.On("Get", mock.Anything, mock.Anything).Return(nil, nil) - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: models.Interval(time.Second * 2)}) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: commontypes.Interval(time.Second * 2)}) require.NoError(t, err) servicetest.Run(t, dsCache) @@ -114,7 +114,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { mockKVStore.On("Get", mock.Anything, mock.Anything).Return(result, nil) // set updater to a long time so that it doesn't log errors after the test is done - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: models.Interval(time.Hour * 100)}) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: commontypes.Interval(time.Hour * 100)}) require.NoError(t, err) changeResultValue(runner, "-1", true, false) servicetest.Run(t, dsCache) @@ -133,7 +133,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { mockKVStore.On("Get", mock.Anything, mock.Anything).Return(nil, assert.AnError) // set updater to a long time so that it doesn't log errors after the test is done - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: models.Interval(time.Hour * 100)}) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: commontypes.Interval(time.Hour * 100)}) require.NoError(t, err) changeResultValue(runner, "-1", true, false) servicetest.Run(t, dsCache) diff --git a/core/services/pipeline/mocks/orm.go b/core/services/pipeline/mocks/orm.go index ea939f36daa..ca330b09b4c 100644 --- a/core/services/pipeline/mocks/orm.go +++ b/core/services/pipeline/mocks/orm.go @@ -5,15 +5,15 @@ package mocks import ( context "context" - models "github.com/smartcontractkit/chainlink/v2/core/store/models" - mock "github.com/stretchr/testify/mock" - pipeline "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + mock "github.com/stretchr/testify/mock" sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" time "time" + types "github.com/smartcontractkit/chainlink-common/pkg/types" + uuid "github.com/google/uuid" ) @@ -123,7 +123,7 @@ func (_c *ORM_CreateRun_Call) RunAndReturn(run func(context.Context, *pipeline.R } // CreateSpec provides a mock function with given fields: ctx, _a1, maxTaskTimeout -func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout models.Interval) (int32, error) { +func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout types.Interval) (int32, error) { ret := _m.Called(ctx, _a1, maxTaskTimeout) if len(ret) == 0 { @@ -132,16 +132,16 @@ func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTim var r0 int32 var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, models.Interval) (int32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, types.Interval) (int32, error)); ok { return rf(ctx, _a1, maxTaskTimeout) } - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, models.Interval) int32); ok { + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, types.Interval) int32); ok { r0 = rf(ctx, _a1, maxTaskTimeout) } else { r0 = ret.Get(0).(int32) } - if rf, ok := ret.Get(1).(func(context.Context, pipeline.Pipeline, models.Interval) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, pipeline.Pipeline, types.Interval) error); ok { r1 = rf(ctx, _a1, maxTaskTimeout) } else { r1 = ret.Error(1) @@ -158,14 +158,14 @@ type ORM_CreateSpec_Call struct { // CreateSpec is a helper method to define mock.On call // - ctx context.Context // - _a1 pipeline.Pipeline -// - maxTaskTimeout models.Interval +// - maxTaskTimeout types.Interval func (_e *ORM_Expecter) CreateSpec(ctx interface{}, _a1 interface{}, maxTaskTimeout interface{}) *ORM_CreateSpec_Call { return &ORM_CreateSpec_Call{Call: _e.mock.On("CreateSpec", ctx, _a1, maxTaskTimeout)} } -func (_c *ORM_CreateSpec_Call) Run(run func(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout models.Interval)) *ORM_CreateSpec_Call { +func (_c *ORM_CreateSpec_Call) Run(run func(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout types.Interval)) *ORM_CreateSpec_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipeline.Pipeline), args[2].(models.Interval)) + run(args[0].(context.Context), args[1].(pipeline.Pipeline), args[2].(types.Interval)) }) return _c } @@ -175,7 +175,7 @@ func (_c *ORM_CreateSpec_Call) Return(_a0 int32, _a1 error) *ORM_CreateSpec_Call return _c } -func (_c *ORM_CreateSpec_Call) RunAndReturn(run func(context.Context, pipeline.Pipeline, models.Interval) (int32, error)) *ORM_CreateSpec_Call { +func (_c *ORM_CreateSpec_Call) RunAndReturn(run func(context.Context, pipeline.Pipeline, types.Interval) (int32, error)) *ORM_CreateSpec_Call { _c.Call.Return(run) return _c } diff --git a/core/services/pipeline/models.go b/core/services/pipeline/models.go index 7fba221f033..ed34d3efb99 100644 --- a/core/services/pipeline/models.go +++ b/core/services/pipeline/models.go @@ -14,18 +14,17 @@ import ( "github.com/shopspring/decimal" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" - - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) type Spec struct { ID int32 - DotDagSource string `json:"dotDagSource"` - CreatedAt time.Time `json:"-"` - MaxTaskDuration models.Interval `json:"-"` - GasLimit *uint32 `json:"-"` - ForwardingAllowed bool `json:"-"` + DotDagSource string `json:"dotDagSource"` + CreatedAt time.Time `json:"-"` + MaxTaskDuration types.Interval `json:"-"` + GasLimit *uint32 `json:"-"` + ForwardingAllowed bool `json:"-"` JobID int32 `json:"-"` JobName string `json:"-"` diff --git a/core/services/pipeline/orm.go b/core/services/pipeline/orm.go index 872d92a1bbf..de9e259a4b8 100644 --- a/core/services/pipeline/orm.go +++ b/core/services/pipeline/orm.go @@ -13,10 +13,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pg" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) // KeepersObservationSource is the same for all keeper jobs and it is not persisted in DB @@ -77,7 +77,7 @@ type CreateDataSource interface { type ORM interface { services.Service - CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskTimeout models.Interval) (int32, error) + CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskTimeout types.Interval) (int32, error) CreateRun(ctx context.Context, run *Run) (err error) InsertRun(ctx context.Context, run *Run) error DeleteRun(ctx context.Context, id int64) error @@ -184,7 +184,7 @@ func (o *orm) transact(ctx context.Context, fn func(*orm) error) error { return sqlutil.Transact(ctx, o.withDataSource, o.ds, nil, fn) } -func (o *orm) CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskDuration models.Interval) (id int32, err error) { +func (o *orm) CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskDuration types.Interval) (id int32, err error) { sql := `INSERT INTO pipeline_specs (dot_dag_source, max_task_duration, created_at) VALUES ($1, $2, NOW()) RETURNING id;` diff --git a/core/services/pipeline/orm_test.go b/core/services/pipeline/orm_test.go index 54123564241..d69a0c9db16 100644 --- a/core/services/pipeline/orm_test.go +++ b/core/services/pipeline/orm_test.go @@ -14,6 +14,7 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" @@ -28,7 +29,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" ) @@ -90,7 +90,7 @@ func Test_PipelineORM_CreateSpec(t *testing.T) { var ( source = "" - maxTaskDuration = models.Interval(1 * time.Minute) + maxTaskDuration = types.Interval(1 * time.Minute) ) p := pipeline.Pipeline{ @@ -156,7 +156,7 @@ answer2 [type=bridge name=election_winner index=1]; jb := job.Job{ Type: job.DirectRequest, SchemaVersion: 1, - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: types.Interval(1 * time.Minute), DirectRequestSpec: &job.DirectRequestSpec{ ContractAddress: cltest.NewEIP55Address(), EVMChainID: (*big.Big)(&cltest.FixtureChainID), @@ -258,7 +258,7 @@ answer2 [type=bridge name=election_winner index=1]; jb := job.Job{ Type: job.DirectRequest, SchemaVersion: 1, - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: types.Interval(1 * time.Minute), DirectRequestSpec: &job.DirectRequestSpec{ ContractAddress: cltest.NewEIP55Address(), EVMChainID: (*big.Big)(&cltest.FixtureChainID), @@ -272,7 +272,7 @@ answer2 [type=bridge name=election_winner index=1]; spec := pipeline.Spec{ DotDagSource: s, CreatedAt: time.Now(), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: types.Interval(1 * time.Minute), JobID: jb.ID, JobName: jb.Name.ValueOrZero(), JobType: string(jb.Type), @@ -678,7 +678,7 @@ func Test_GetUnfinishedRuns_Keepers(t *testing.T) { Type: job.Keeper, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: types.Interval(1 * time.Minute), } err := jorm.CreateJob(ctx, &keeperJob) @@ -780,7 +780,7 @@ func Test_GetUnfinishedRuns_DirectRequest(t *testing.T) { Type: job.DirectRequest, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: types.Interval(1 * time.Minute), } err := jorm.CreateJob(ctx, &drJob) diff --git a/core/services/pipeline/runner.go b/core/services/pipeline/runner.go index eda0b3b347f..0befd117931 100644 --- a/core/services/pipeline/runner.go +++ b/core/services/pipeline/runner.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/types" commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" @@ -27,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/recovery" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) type Runner interface { @@ -559,7 +559,7 @@ func (r *runner) executeTaskRun(ctx context.Context, spec Spec, taskRun *memoryT ctx, cancel = context.WithTimeout(ctx, taskTimeout) defer cancel() } - if spec.MaxTaskDuration != models.Interval(time.Duration(0)) { + if spec.MaxTaskDuration != types.Interval(time.Duration(0)) { ctx, cancel = context.WithTimeout(ctx, time.Duration(spec.MaxTaskDuration)) defer cancel() } diff --git a/core/services/relay/evm/types/types.go b/core/services/relay/evm/types/types.go index e1ee359b12d..f5bc116f216 100644 --- a/core/services/relay/evm/types/types.go +++ b/core/services/relay/evm/types/types.go @@ -20,7 +20,6 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) type ChainWriterConfig struct { @@ -75,7 +74,7 @@ type PollingFilter struct { Topic2 evmtypes.HashArray `json:"topic2"` // list of possible values for topic2 Topic3 evmtypes.HashArray `json:"topic3"` // list of possible values for topic3 Topic4 evmtypes.HashArray `json:"topic4"` // list of possible values for topic4 - Retention models.Interval `json:"retention"` // maximum amount of time to retain logs + Retention types.Interval `json:"retention"` // maximum amount of time to retain logs MaxLogsKept uint64 `json:"maxLogsKept"` // maximum number of logs to retain ( 0 = unlimited ) LogsPerBlock uint64 `json:"logsPerBlock"` // rate limit ( maximum # of logs per block, 0 = unlimited ) } diff --git a/core/services/relay/evm/types/types_test.go b/core/services/relay/evm/types/types_test.go index c3549a2b795..12797c31bbf 100644 --- a/core/services/relay/evm/types/types_test.go +++ b/core/services/relay/evm/types/types_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/codec" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) // ChainID *big.Big `json:"chainID"` @@ -95,7 +95,7 @@ func Test_ChainReaderConfig(t *testing.T) { Topic2: evmtypes.HashArray{common.HexToHash("0x1abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic3: evmtypes.HashArray{common.HexToHash("0x2abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic4: evmtypes.HashArray{common.HexToHash("0x3abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, - Retention: models.Interval(time.Minute * 1), + Retention: types.Interval(time.Minute * 1), MaxLogsKept: 100, LogsPerBlock: 10, }, @@ -133,7 +133,7 @@ func Test_ChainReaderConfig(t *testing.T) { Topic2: evmtypes.HashArray{common.HexToHash("0x4abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic3: evmtypes.HashArray{common.HexToHash("0x5abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic4: evmtypes.HashArray{common.HexToHash("0x6abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, - Retention: models.Interval(time.Minute * 1), + Retention: types.Interval(time.Minute * 1), MaxLogsKept: 100, LogsPerBlock: 10, }, diff --git a/core/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index 25adc8b020c..061e619663e 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -26,25 +26,24 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/store/migrate" - "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" ) type OffchainReporting2OracleSpec100 struct { - ID int32 `toml:"-"` - ContractID string `toml:"contractID"` - Relay string `toml:"relay"` // RelayID.Network - RelayConfig job.JSONConfig `toml:"relayConfig"` - P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers"` - OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` - MonitoringEndpoint null.String `toml:"monitoringEndpoint"` - TransmitterID null.String `toml:"transmitterID"` - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - JuelsPerFeeCoinPipeline string `toml:"juelsPerFeeCoinSource"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + ID int32 `toml:"-"` + ContractID string `toml:"contractID"` + Relay string `toml:"relay"` // RelayID.Network + RelayConfig job.JSONConfig `toml:"relayConfig"` + P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers"` + OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` + MonitoringEndpoint null.String `toml:"monitoringEndpoint"` + TransmitterID null.String `toml:"transmitterID"` + BlockchainTimeout types.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + JuelsPerFeeCoinPipeline string `toml:"juelsPerFeeCoinSource"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } func getOCR2Spec100() OffchainReporting2OracleSpec100 { diff --git a/core/store/models/common.go b/core/store/models/common.go index 8e7bca3f012..331068518b6 100644 --- a/core/store/models/common.go +++ b/core/store/models/common.go @@ -197,56 +197,6 @@ func (c Cron) String() string { return string(c) } -// Interval represents a time.Duration stored as a Postgres interval type -type Interval time.Duration - -// NewInterval creates Interval for specified duration -func NewInterval(d time.Duration) *Interval { - i := new(Interval) - *i = Interval(d) - return i -} - -func (i Interval) Duration() time.Duration { - return time.Duration(i) -} - -// MarshalText implements the text.Marshaler interface. -func (i Interval) MarshalText() ([]byte, error) { - return []byte(time.Duration(i).String()), nil -} - -// UnmarshalText implements the text.Unmarshaler interface. -func (i *Interval) UnmarshalText(input []byte) error { - v, err := time.ParseDuration(string(input)) - if err != nil { - return err - } - *i = Interval(v) - return nil -} - -func (i *Interval) Scan(v interface{}) error { - if v == nil { - *i = Interval(time.Duration(0)) - return nil - } - asInt64, is := v.(int64) - if !is { - return errors.Errorf("models.Interval#Scan() wanted int64, got %T", v) - } - *i = Interval(time.Duration(asInt64) * time.Nanosecond) - return nil -} - -func (i Interval) Value() (driver.Value, error) { - return time.Duration(i).Nanoseconds(), nil -} - -func (i Interval) IsZero() bool { - return time.Duration(i) == time.Duration(0) -} - // SendEtherRequest represents a request to transfer ETH. type SendEtherRequest struct { DestinationAddress common.Address `json:"address"` diff --git a/core/store/models/common_test.go b/core/store/models/common_test.go index eca703d5f3a..8aa55f35334 100644 --- a/core/store/models/common_test.go +++ b/core/store/models/common_test.go @@ -5,7 +5,6 @@ import ( "net/url" "strings" "testing" - "time" "github.com/ethereum/go-ethereum/common" @@ -227,15 +226,6 @@ func TestCron_UnmarshalJSON_Invalid(t *testing.T) { } } -func TestNewInterval(t *testing.T) { - t.Parallel() - - duration := 33 * time.Second - interval := models.NewInterval(duration) - - require.Equal(t, duration, interval.Duration()) -} - func TestSha256Hash_MarshalJSON_UnmarshalJSON(t *testing.T) { t.Parallel() @@ -320,50 +310,6 @@ func TestAddressCollection_ToStrings(t *testing.T) { require.Equal(t, hex2, acStrings[1]) } -func TestInterval_IsZero(t *testing.T) { - t.Parallel() - - i := models.NewInterval(0) - require.NotNil(t, i) - require.True(t, i.IsZero()) - - i = models.NewInterval(1) - require.NotNil(t, i) - require.False(t, i.IsZero()) -} - -func TestInterval_Scan_Value(t *testing.T) { - t.Parallel() - - i := models.NewInterval(100) - require.NotNil(t, i) - - val, err := i.Value() - require.NoError(t, err) - - iNew := models.NewInterval(0) - err = iNew.Scan(val) - require.NoError(t, err) - - require.Equal(t, i, iNew) -} - -func TestInterval_MarshalText_UnmarshalText(t *testing.T) { - t.Parallel() - - i := models.NewInterval(100) - require.NotNil(t, i) - - txt, err := i.MarshalText() - require.NoError(t, err) - - iNew := models.NewInterval(0) - err = iNew.UnmarshalText(txt) - require.NoError(t, err) - - require.Equal(t, i, iNew) -} - func TestWebURL_Scan_Value(t *testing.T) { t.Parallel() diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index 8fcbdba1022..3221897ccb3 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -9,6 +9,7 @@ import ( commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -123,23 +124,23 @@ func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec { // OffChainReportingSpec defines the spec details of a OffChainReporting Job type OffChainReportingSpec struct { - ContractAddress types.EIP55Address `json:"contractAddress"` - P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` - IsBootstrapPeer bool `json:"isBootstrapPeer"` - EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` - TransmitterAddress *types.EIP55Address `json:"transmitterAddress"` - ObservationTimeout models.Interval `json:"observationTimeout"` - BlockchainTimeout models.Interval `json:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval models.Interval `json:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *big.Big `json:"evmChainID"` - DatabaseTimeout *models.Interval `json:"databaseTimeout"` - ObservationGracePeriod *models.Interval `json:"observationGracePeriod"` - ContractTransmitterTransmitTimeout *models.Interval `json:"contractTransmitterTransmitTimeout"` - CollectTelemetry bool `json:"collectTelemetry,omitempty"` + ContractAddress types.EIP55Address `json:"contractAddress"` + P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` + IsBootstrapPeer bool `json:"isBootstrapPeer"` + EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` + TransmitterAddress *types.EIP55Address `json:"transmitterAddress"` + ObservationTimeout commontypes.Interval `json:"observationTimeout"` + BlockchainTimeout commontypes.Interval `json:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval commontypes.Interval `json:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval commontypes.Interval `json:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *big.Big `json:"evmChainID"` + DatabaseTimeout *commontypes.Interval `json:"databaseTimeout"` + ObservationGracePeriod *commontypes.Interval `json:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *commontypes.Interval `json:"contractTransmitterTransmitTimeout"` + CollectTelemetry bool `json:"collectTelemetry,omitempty"` } // NewOffChainReportingSpec initializes a new OffChainReportingSpec from a @@ -174,9 +175,9 @@ type OffChainReporting2Spec struct { P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` OCRKeyBundleID null.String `json:"ocrKeyBundleID"` TransmitterID null.String `json:"transmitterID"` - ObservationTimeout models.Interval `json:"observationTimeout"` - BlockchainTimeout models.Interval `json:"blockchainTimeout"` - ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` + ObservationTimeout commontypes.Interval `json:"observationTimeout"` + BlockchainTimeout commontypes.Interval `json:"blockchainTimeout"` + ContractConfigTrackerPollInterval commontypes.Interval `json:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` OnchainSigningStrategy map[string]interface{} `json:"onchainSigningStrategy"` CreatedAt time.Time `json:"createdAt"` @@ -400,9 +401,9 @@ type BootstrapSpec struct { ContractID string `json:"contractID"` Relay string `json:"relay"` // RelayID.Network RelayConfig map[string]interface{} `json:"relayConfig"` - BlockchainTimeout models.Interval `json:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval models.Interval `json:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` + BlockchainTimeout commontypes.Interval `json:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval commontypes.Interval `json:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval commontypes.Interval `json:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` @@ -520,7 +521,7 @@ type JobResource struct { SchemaVersion uint32 `json:"schemaVersion"` GasLimit clnull.Uint32 `json:"gasLimit"` ForwardingAllowed bool `json:"forwardingAllowed"` - MaxTaskDuration models.Interval `json:"maxTaskDuration"` + MaxTaskDuration commontypes.Interval `json:"maxTaskDuration"` ExternalJobID uuid.UUID `json:"externalJobID"` DirectRequestSpec *DirectRequestSpec `json:"directRequestSpec"` FluxMonitorSpec *FluxMonitorSpec `json:"fluxMonitorSpec"` diff --git a/core/web/presenters/job_test.go b/core/web/presenters/job_test.go index 1f99455af02..4e886760709 100644 --- a/core/web/presenters/job_test.go +++ b/core/web/presenters/job_test.go @@ -14,6 +14,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/assets" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" evmassets "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -87,7 +88,7 @@ func TestJob(t *testing.T) { Type: job.DirectRequest, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -160,7 +161,7 @@ func TestJob(t *testing.T) { Type: job.FluxMonitor, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -225,17 +226,17 @@ func TestJob(t *testing.T) { IsBootstrapPeer: true, EncryptedOCRKeyBundleID: &ocrKeyID, TransmitterAddress: &transmitterAddress, - ObservationTimeout: models.Interval(1 * time.Minute), - BlockchainTimeout: models.Interval(1 * time.Minute), - ContractConfigTrackerSubscribeInterval: models.Interval(1 * time.Minute), - ContractConfigTrackerPollInterval: models.Interval(1 * time.Minute), + ObservationTimeout: commontypes.Interval(1 * time.Minute), + BlockchainTimeout: commontypes.Interval(1 * time.Minute), + ContractConfigTrackerSubscribeInterval: commontypes.Interval(1 * time.Minute), + ContractConfigTrackerPollInterval: commontypes.Interval(1 * time.Minute), ContractConfigConfirmations: 1, CreatedAt: timestamp, UpdatedAt: timestamp, EVMChainID: evmChainID, - DatabaseTimeout: models.NewInterval(2 * time.Second), - ObservationGracePeriod: models.NewInterval(3 * time.Second), - ContractTransmitterTransmitTimeout: models.NewInterval(444 * time.Millisecond), + DatabaseTimeout: commontypes.NewInterval(2 * time.Second), + ObservationGracePeriod: commontypes.NewInterval(3 * time.Second), + ContractTransmitterTransmitTimeout: commontypes.NewInterval(444 * time.Millisecond), }, ExternalJobID: uuid.MustParse("0EEC7E1D-D0D2-476C-A1A8-72DFB6633F46"), PipelineSpec: &pipeline.Spec{ @@ -247,7 +248,7 @@ func TestJob(t *testing.T) { Name: null.StringFrom("test"), GasLimit: clnull.Uint32From(123), ForwardingAllowed: true, - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -323,7 +324,7 @@ func TestJob(t *testing.T) { Type: job.Keeper, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -388,7 +389,7 @@ func TestJob(t *testing.T) { Type: job.Cron, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -449,7 +450,7 @@ func TestJob(t *testing.T) { Type: job.Webhook, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), }, want: ` { @@ -1087,7 +1088,7 @@ func TestJob(t *testing.T) { Type: job.Keeper, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: models.Interval(1 * time.Minute), + MaxTaskDuration: commontypes.Interval(1 * time.Minute), JobSpecErrors: []job.SpecError{ { ID: 200, diff --git a/core/web/resolver/job_test.go b/core/web/resolver/job_test.go index 920dc70b619..8c5983a9bd2 100644 --- a/core/web/resolver/job_test.go +++ b/core/web/resolver/job_test.go @@ -15,13 +15,13 @@ import ( "github.com/stretchr/testify/mock" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/chains" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" clnull "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/directrequest" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs" "github.com/smartcontractkit/chainlink/v2/core/utils/stringutils" ) @@ -79,7 +79,7 @@ func TestResolver_Jobs(t *testing.T) { ID: 1, Name: null.StringFrom("job1"), SchemaVersion: 1, - MaxTaskDuration: models.Interval(1 * time.Second), + MaxTaskDuration: types.Interval(1 * time.Second), ExternalJobID: externalJobID, CreatedAt: f.Timestamp(), Type: job.OffchainReporting, @@ -215,7 +215,7 @@ func TestResolver_Job(t *testing.T) { Name: null.StringFrom("job1"), SchemaVersion: 1, GasLimit: clnull.Uint32From(123), - MaxTaskDuration: models.Interval(1 * time.Second), + MaxTaskDuration: types.Interval(1 * time.Second), ExternalJobID: externalJobID, CreatedAt: f.Timestamp(), Type: job.OffchainReporting, @@ -264,7 +264,7 @@ func TestResolver_Job(t *testing.T) { Name: null.StringFrom("job1"), SchemaVersion: 1, GasLimit: clnull.Uint32From(123), - MaxTaskDuration: models.Interval(1 * time.Second), + MaxTaskDuration: types.Interval(1 * time.Second), ExternalJobID: externalJobID, CreatedAt: f.Timestamp(), Type: job.OffchainReporting, @@ -459,7 +459,7 @@ func TestResolver_DeleteJob(t *testing.T) { ID: id, Name: null.StringFrom("test-job"), ExternalJobID: extJID, - MaxTaskDuration: models.Interval(2 * time.Second), + MaxTaskDuration: types.Interval(2 * time.Second), CreatedAt: f.Timestamp(), }, nil) f.App.On("JobORM").Return(f.Mocks.jobORM) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index d3738259ae6..804b4c5ca48 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -378,19 +378,19 @@ func TestResolver_OCRSpec(t *testing.T) { f.Mocks.jobORM.On("FindJobWithoutSpecErrors", mock.Anything, id).Return(job.Job{ Type: job.OffchainReporting, OCROracleSpec: &job.OCROracleSpec{ - BlockchainTimeout: models.Interval(1 * time.Minute), + BlockchainTimeout: types.Interval(1 * time.Minute), ContractAddress: contractAddress, ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: models.Interval(1 * time.Minute), - ContractConfigTrackerSubscribeInterval: models.Interval(2 * time.Minute), - DatabaseTimeout: models.NewInterval(3 * time.Second), - ObservationGracePeriod: models.NewInterval(4 * time.Second), - ContractTransmitterTransmitTimeout: models.NewInterval(555 * time.Millisecond), + ContractConfigTrackerPollInterval: types.Interval(1 * time.Minute), + ContractConfigTrackerSubscribeInterval: types.Interval(2 * time.Minute), + DatabaseTimeout: types.NewInterval(3 * time.Second), + ObservationGracePeriod: types.NewInterval(4 * time.Second), + ContractTransmitterTransmitTimeout: types.NewInterval(555 * time.Millisecond), CreatedAt: f.Timestamp(), EVMChainID: ubig.NewI(42), IsBootstrapPeer: false, EncryptedOCRKeyBundleID: &keyBundleID, - ObservationTimeout: models.Interval(2 * time.Minute), + ObservationTimeout: types.Interval(2 * time.Minute), P2PV2Bootstrappers: pq.StringArray{"12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw@localhost:5001"}, TransmitterAddress: &transmitterAddress, }, @@ -489,10 +489,10 @@ func TestResolver_OCR2Spec(t *testing.T) { f.Mocks.jobORM.On("FindJobWithoutSpecErrors", mock.Anything, id).Return(job.Job{ Type: job.OffchainReporting2, OCR2OracleSpec: &job.OCR2OracleSpec{ - BlockchainTimeout: models.Interval(1 * time.Minute), + BlockchainTimeout: types.Interval(1 * time.Minute), ContractID: contractAddress.String(), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: models.Interval(1 * time.Minute), + ContractConfigTrackerPollInterval: types.Interval(1 * time.Minute), OnchainSigningStrategy: onchainSigningStrategy, CreatedAt: f.Timestamp(), OCRKeyBundleID: null.StringFrom(keyBundleID.String()), @@ -963,8 +963,8 @@ func TestResolver_BootstrapSpec(t *testing.T) { Relay: "evm", RelayConfig: map[string]interface{}{}, MonitoringEndpoint: null.String{}, - BlockchainTimeout: models.Interval(2 * time.Minute), - ContractConfigTrackerPollInterval: models.Interval(2 * time.Minute), + BlockchainTimeout: types.Interval(2 * time.Minute), + ContractConfigTrackerPollInterval: types.Interval(2 * time.Minute), ContractConfigConfirmations: 100, CreatedAt: f.Timestamp(), }, diff --git a/deployment/go.mod b/deployment/go.mod index 7ee208c5a68..981fa936340 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -39,7 +39,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/deployment/go.sum b/deployment/go.sum index 3a12c72ea38..2a416b0b0ec 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1334,8 +1334,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/go.mod b/go.mod index efd0ff49f1d..1936284f00a 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/go.sum b/go.sum index 9649e1746dc..c26f7bba58e 100644 --- a/go.sum +++ b/go.sum @@ -1113,8 +1113,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/actions/automation_ocr_helpers_local.go b/integration-tests/actions/automation_ocr_helpers_local.go index dcc4b4f3d88..cf04198863b 100644 --- a/integration-tests/actions/automation_ocr_helpers_local.go +++ b/integration-tests/actions/automation_ocr_helpers_local.go @@ -6,8 +6,6 @@ import ( "fmt" "time" - tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" - "github.com/ethereum/go-ethereum/common" "github.com/lib/pq" "github.com/rs/zerolog" @@ -20,12 +18,14 @@ import ( ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" + "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func ReadRegistryConfig(c tc.AutomationTestConfig) contracts.KeeperRegistrySettings { @@ -268,7 +268,7 @@ func CreateOCRKeeperJobsLocal( RelayConfig: map[string]interface{}{ "chainID": int(chainID), }, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), }, } _, err = bootstrapNode.MustCreateJob(bootstrapSpec) @@ -310,7 +310,7 @@ func CreateOCRKeeperJobsLocal( "mercuryCredentialName": "\"cred1\"", "contractVersion": "\"" + contractVersion + "\"", }, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), ContractID: registryAddr, // registryAddr OCRKeyBundleID: null.StringFrom(nodeOCRKeyId[0]), // get node ocr2config.ID TransmitterID: null.StringFrom(nodeTransmitterAddress[keyIndex]), // node addr diff --git a/integration-tests/actions/automationv2/actions.go b/integration-tests/actions/automationv2/actions.go index 489fb0223fd..f1084cbf5fb 100644 --- a/integration-tests/actions/automationv2/actions.go +++ b/integration-tests/actions/automationv2/actions.go @@ -27,6 +27,7 @@ import ( ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" ctf_concurrency "github.com/smartcontractkit/chainlink-testing-framework/lib/concurrency" "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" "github.com/smartcontractkit/chainlink-testing-framework/seth" @@ -43,7 +44,6 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) type NodeDetails struct { @@ -418,7 +418,7 @@ func (a *AutomationTest) AddBootstrapJob() error { RelayConfig: map[string]interface{}{ "chainID": int(a.ChainClient.ChainID), }, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), }, } _, err := a.ChainlinkNodes[0].MustCreateJob(bootstrapSpec) @@ -459,7 +459,7 @@ func (a *AutomationTest) AddAutomationJobs() error { "chainID": int(a.ChainClient.ChainID), }, PluginConfig: pluginCfg, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), TransmitterID: null.StringFrom(a.NodeDetails[i].TransmitterAddresses[a.TransmitterKeyIndex]), P2PV2Bootstrappers: pq.StringArray{a.DefaultP2Pv2Bootstrapper}, OCRKeyBundleID: null.StringFrom(a.NodeDetails[i].OCR2Id), diff --git a/integration-tests/actions/ocr2_helpers.go b/integration-tests/actions/ocr2_helpers.go index 842395bb25b..3a42e4f0e83 100644 --- a/integration-tests/actions/ocr2_helpers.go +++ b/integration-tests/actions/ocr2_helpers.go @@ -21,15 +21,14 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" ctfClient "github.com/smartcontractkit/chainlink-testing-framework/lib/client" + "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" + "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" - "github.com/smartcontractkit/chainlink/v2/core/store/models" - - "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" ) // BuildMedianOCR2Config builds a default OCRv2 config for the given chainlink nodes for a standard median aggregation job @@ -236,7 +235,7 @@ func CreateOCRv2Jobs( "chainID": chainId, }, MonitoringEndpoint: null.StringFrom(fmt.Sprintf("%s/%s", mockserver.Config.ClusterURL, "ocr2")), - ContractConfigTrackerPollInterval: *models.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), }, } _, err := bootstrapNode.MustCreateJob(bootstrapSpec) @@ -284,7 +283,7 @@ func CreateOCRv2Jobs( PluginConfig: map[string]any{ "juelsPerFeeCoinSource": fmt.Sprintf("\"\"\"%s\"\"\"", nodeclient.ObservationSourceSpecBridge(juelsBridge)), }, - ContractConfigTrackerPollInterval: *models.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), ContractID: ocrInstance.Address(), // registryAddr OCRKeyBundleID: null.StringFrom(nodeOCRKeyId), // get node ocr2config.ID TransmitterID: null.StringFrom(nodeTransmitterAddress), // node addr diff --git a/integration-tests/actions/ocr2_helpers_local.go b/integration-tests/actions/ocr2_helpers_local.go index 3f105f53014..57ae1723ef5 100644 --- a/integration-tests/actions/ocr2_helpers_local.go +++ b/integration-tests/actions/ocr2_helpers_local.go @@ -20,17 +20,16 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/codec" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env" "github.com/smartcontractkit/chainlink-testing-framework/parrot" + "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" + "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/store/models" - - "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" ) func CreateOCRv2JobsLocal( @@ -78,7 +77,7 @@ func CreateOCRv2JobsLocal( "chainID": chainId, }, MonitoringEndpoint: null.StringFrom(fmt.Sprintf("%s/%s", mockAdapter.InternalEndpoint, valPath)), - ContractConfigTrackerPollInterval: *models.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), }, } _, err := bootstrapNode.MustCreateJob(bootstrapSpec) @@ -129,7 +128,7 @@ func CreateOCRv2JobsLocal( PluginConfig: map[string]any{ "juelsPerFeeCoinSource": fmt.Sprintf("\"\"\"%s\"\"\"", nodeclient.ObservationSourceSpecBridge(juelsBridge)), }, - ContractConfigTrackerPollInterval: *models.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), ContractID: ocrInstance.Address(), // registryAddr OCRKeyBundleID: null.StringFrom(nodeOCRKeyID), // get node ocr2config.ID TransmitterID: null.StringFrom(nodeTransmitterAddress), // node addr diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 2dafd774cd9..9d0f9e89f7d 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 299428459d3..6e843eee8b1 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1580,8 +1580,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index daea8d0e704..6a2049f27c7 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index c7264a87e3f..aa13c9e5dbb 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1559,8 +1559,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/utils/cl_node_jobs.go b/integration-tests/utils/cl_node_jobs.go index 681e1da4111..ceaec7b946f 100644 --- a/integration-tests/utils/cl_node_jobs.go +++ b/integration-tests/utils/cl_node_jobs.go @@ -12,9 +12,9 @@ import ( "github.com/lib/pq" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func BuildBootstrapSpec(verifierAddr common.Address, chainID int64, feedId [32]byte) *nodeclient.OCR2TaskJobSpec { @@ -29,7 +29,7 @@ func BuildBootstrapSpec(verifierAddr common.Address, chainID int64, feedId [32]b RelayConfig: map[string]interface{}{ "chainID": int(chainID), }, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *types.NewInterval(time.Second * 15), }, } } @@ -105,7 +105,7 @@ ask_price [type=median allowedFaults={{.AllowedFaults}} index=2]; "chainID": int(chainID), "fromBlock": fromBlock, }, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *types.NewInterval(time.Second * 15), ContractID: verifierAddr.String(), FeedID: &hash, OCRKeyBundleID: null.StringFrom(nodeOCRKey), diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index b778dd66d5a..f06740968c3 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -33,7 +33,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/scylladb/go-reflectx v1.0.1 github.com/smartcontractkit/chain-selectors v1.0.72 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index 324cc0fca7b..ed37fb54c74 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1575,8 +1575,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index a72f837ad51..4f6e427b277 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -38,7 +38,7 @@ require ( github.com/prometheus/common v0.65.0 github.com/rs/zerolog v1.33.0 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250917110014-65bff6568f77 diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index fecc36d8d6e..5cff2601c4e 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1778,8 +1778,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= From 1cac52cb5977b496e171f6e68f7af28a0b059f91 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 1 Oct 2025 14:21:50 +0200 Subject: [PATCH 2/6] Minor. --- core/services/job/models_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/services/job/models_test.go b/core/services/job/models_test.go index d1cef08f2b5..0527b9af40c 100644 --- a/core/services/job/models_test.go +++ b/core/services/job/models_test.go @@ -21,7 +21,6 @@ import ( "gopkg.in/guregu/null.v4" evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func TestStandardCapabilitiesSpec_Deserialization(t *testing.T) { @@ -144,7 +143,7 @@ func TestOCR2OracleSpec(t *testing.T) { OCRKeyBundleID: null.StringFrom("bar"), TransmitterID: null.StringFrom("baz"), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: *models.NewInterval(time.Second), + ContractConfigTrackerPollInterval: *types.NewInterval(time.Second), RelayConfig: map[string]interface{}{ "chainID": 1337, "fromBlock": 42, From 0f5954012e9ce04eecd5e17c40cbe2b8e37aa4e5 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 1 Oct 2025 14:28:43 +0200 Subject: [PATCH 3/6] Minor. --- core/services/pipeline/task.bridge_test.go | 31 +++++++++++----------- core/services/pipeline/task.http_test.go | 4 +-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/core/services/pipeline/task.bridge_test.go b/core/services/pipeline/task.bridge_test.go index 8e9a22cbae6..57733bfa223 100644 --- a/core/services/pipeline/task.bridge_test.go +++ b/core/services/pipeline/task.bridge_test.go @@ -23,6 +23,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -233,7 +234,7 @@ func TestBridgeTask_Happy(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -291,7 +292,7 @@ func TestBridgeTask_HandlesIntermittentFailure(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) result, runInfo := task.Run(testutils.Context(t), logger.TestLogger(t), @@ -355,7 +356,7 @@ func TestBridgeTask_DoesNotReturnStaleResults(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -462,7 +463,7 @@ func TestBridgeTask_AsyncJobPendingState(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, id, c) @@ -640,7 +641,7 @@ func TestBridgeTask_Variables(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -708,7 +709,7 @@ func TestBridgeTask_Meta(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -762,7 +763,7 @@ func TestBridgeTask_IncludeInputAtKey(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -818,7 +819,7 @@ func TestBridgeTask_ErrorMessage(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -857,7 +858,7 @@ func TestBridgeTask_OnlyErrorMessage(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -882,7 +883,7 @@ func TestBridgeTask_ErrorIfBridgeMissing(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() orm := bridges.NewORM(db) trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -970,7 +971,7 @@ func TestBridgeTask_Headers(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -992,7 +993,7 @@ func TestBridgeTask_Headers(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -1013,7 +1014,7 @@ func TestBridgeTask_Headers(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -1063,7 +1064,7 @@ func TestBridgeTask_AdapterResponseStatusFailure(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -1160,7 +1161,7 @@ func TestBridgeTask_AdapterTimeout(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) diff --git a/core/services/pipeline/task.http_test.go b/core/services/pipeline/task.http_test.go index 70d3e53418c..b46f92fd054 100644 --- a/core/services/pipeline/task.http_test.go +++ b/core/services/pipeline/task.http_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" clhttp "github.com/smartcontractkit/chainlink-common/pkg/http" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -25,7 +26,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -176,7 +176,7 @@ func TestHTTPTask_Variables(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *models.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) From 0b6d6c34275ef57c9769c694868ba1e44304cd8f Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 1 Oct 2025 16:23:42 +0200 Subject: [PATCH 4/6] Minor. --- core/bridges/orm_test.go | 4 +- .../ccip/configs/evm/contract_reader.go | 32 ++++++------ core/cmd/jobs_commands_test.go | 4 +- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 +- core/services/job/helpers_test.go | 10 ++-- .../job/job_pipeline_orm_integration_test.go | 4 +- core/services/job/models.go | 33 ++++++------ core/services/job/models_test.go | 3 +- core/services/job/orm.go | 14 +++--- core/services/job/orm_test.go | 15 +++--- core/services/job/runner_integration_test.go | 14 +++--- .../ccip/testhelpers/integration/jobspec.go | 7 +-- .../generic/pipeline_runner_adapter.go | 4 +- .../ocr2/plugins/median/config/config.go | 8 +-- .../ocr2/plugins/median/config/config_test.go | 18 +++---- core/services/ocrcommon/data_source_test.go | 8 +-- core/services/pipeline/mocks/orm.go | 16 +++--- core/services/pipeline/models.go | 12 ++--- core/services/pipeline/orm.go | 5 +- core/services/pipeline/orm_test.go | 13 +++-- core/services/pipeline/runner.go | 3 +- core/services/pipeline/task.bridge_test.go | 32 ++++++------ core/services/pipeline/task.http_test.go | 4 +- core/services/relay/evm/types/types.go | 3 +- core/services/relay/evm/types/types_test.go | 6 +-- core/store/migrate/migrate_test.go | 29 +++++------ core/web/presenters/job.go | 50 +++++++++---------- core/web/presenters/job_test.go | 30 +++++------ core/web/resolver/job_test.go | 10 ++-- core/web/resolver/spec_test.go | 23 +++++---- deployment/go.mod | 2 +- deployment/go.sum | 4 +- go.mod | 2 +- go.sum | 4 +- .../actions/automation_ocr_helpers_local.go | 7 ++- .../actions/automationv2/actions.go | 6 +-- integration-tests/actions/ocr2_helpers.go | 6 +-- .../actions/ocr2_helpers_local.go | 6 +-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 +- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 +- integration-tests/utils/cl_node_jobs.go | 6 +-- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 +- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 +- 48 files changed, 244 insertions(+), 243 deletions(-) diff --git a/core/bridges/orm_test.go b/core/bridges/orm_test.go index 9d40fd1ca48..2ef6807f841 100644 --- a/core/bridges/orm_test.go +++ b/core/bridges/orm_test.go @@ -10,7 +10,7 @@ import ( "github.com/jmoiron/sqlx" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -144,7 +144,7 @@ func TestORM_TestCachedResponse(t *testing.T) { orm := bridges.NewORM(db) trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) _, err = orm.GetCachedResponse(ctx, "dot", specID, 1*time.Second) diff --git a/core/capabilities/ccip/configs/evm/contract_reader.go b/core/capabilities/ccip/configs/evm/contract_reader.go index c74d801d0c3..5e6aebdb448 100644 --- a/core/capabilities/ccip/configs/evm/contract_reader.go +++ b/core/capabilities/ccip/configs/evm/contract_reader.go @@ -9,7 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/pkg/consts" "github.com/smartcontractkit/chainlink-common/pkg/codec" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -74,7 +74,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ mustGetEventName(consts.EventNameCommitReportAccepted, offrampABI), }, PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -135,7 +135,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: nonce_manager.NonceManagerABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -153,7 +153,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: fee_quoter.FeeQuoterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -203,7 +203,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_remote.RMNRemoteABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -225,7 +225,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_proxy_contract.RMNProxyABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -239,7 +239,7 @@ var DestReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: router.RouterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -262,7 +262,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ consts.EventNameCCIPMessageSent, }, PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -308,7 +308,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: router.RouterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -322,7 +322,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: fee_quoter.FeeQuoterABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -352,7 +352,7 @@ var SourceReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_remote.RMNRemoteABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -381,7 +381,7 @@ var FeedReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractABI: aggregator_v3_interface.AggregatorV3InterfaceABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -403,7 +403,7 @@ var USDCReaderConfig = evmrelaytypes.ChainReaderConfig{ ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ GenericEventNames: []string{consts.EventNameCCTPMessageSent}, PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -433,7 +433,7 @@ var HomeChainReaderConfigRaw = evmrelaytypes.ChainReaderConfig{ ContractABI: kcr.CapabilitiesRegistryABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -446,7 +446,7 @@ var HomeChainReaderConfigRaw = evmrelaytypes.ChainReaderConfig{ ContractABI: ccip_home.CCIPHomeABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ @@ -462,7 +462,7 @@ var HomeChainReaderConfigRaw = evmrelaytypes.ChainReaderConfig{ ContractABI: rmn_home.RMNHomeABI, ContractPollingFilter: evmrelaytypes.ContractPollingFilter{ PollingFilter: evmrelaytypes.PollingFilter{ - Retention: types.Interval(DefaultCCIPLogsRetention), + Retention: sqlutil.Interval(DefaultCCIPLogsRetention), }, }, Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ diff --git a/core/cmd/jobs_commands_test.go b/core/cmd/jobs_commands_test.go index 5d25b7285b7..8dc5686f567 100644 --- a/core/cmd/jobs_commands_test.go +++ b/core/cmd/jobs_commands_test.go @@ -16,7 +16,7 @@ import ( "github.com/smartcontractkit/freeport" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -33,7 +33,7 @@ func TestJobPresenter_RenderTable(t *testing.T) { name = "Job 1" jobSpecType = "fluxmonitor" schemaVersion = uint32(1) - maxTaskDuration = types.Interval(1 * time.Second) + maxTaskDuration = sqlutil.Interval(1 * time.Second) createdAt = time.Now() updatedAt = time.Now().Add(time.Second) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 1fc1b2fd7be..f97cc6362b2 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -47,7 +47,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 78f79a5935c..0cf7733249f 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1597,8 +1597,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/core/services/job/helpers_test.go b/core/services/job/helpers_test.go index 58d93ce0d2a..b4c5f21376e 100644 --- a/core/services/job/helpers_test.go +++ b/core/services/job/helpers_test.go @@ -17,7 +17,7 @@ import ( "github.com/jmoiron/sqlx" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" chainlinkevmbig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -199,10 +199,10 @@ func compareOCRJobSpecs(t *testing.T, expected, actual job.Job) { func makeMinimalHTTPOracleSpec(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralConfig, contractAddress, transmitterAddress, keyBundle, fetchUrl, timeout string) *job.Job { var ocrSpec = job.OCROracleSpec{ P2PV2Bootstrappers: pq.StringArray{}, - ObservationTimeout: types.Interval(10 * time.Second), - BlockchainTimeout: types.Interval(20 * time.Second), - ContractConfigTrackerSubscribeInterval: types.Interval(2 * time.Minute), - ContractConfigTrackerPollInterval: types.Interval(1 * time.Minute), + ObservationTimeout: sqlutil.Interval(10 * time.Second), + BlockchainTimeout: sqlutil.Interval(20 * time.Second), + ContractConfigTrackerSubscribeInterval: sqlutil.Interval(2 * time.Minute), + ContractConfigTrackerPollInterval: sqlutil.Interval(1 * time.Minute), ContractConfigConfirmations: uint16(3), EVMChainID: chainlinkevmbig.New(testutils.FixtureChainID), } diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go index 74b877a673f..2a2e17674ba 100644 --- a/core/services/job/job_pipeline_orm_integration_test.go +++ b/core/services/job/job_pipeline_orm_integration_test.go @@ -10,7 +10,7 @@ import ( "github.com/jmoiron/sqlx" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink/v2/core/bridges" @@ -135,7 +135,7 @@ func TestPipelineORM_Integration(t *testing.T) { p, err := pipeline.Parse(DotStr) require.NoError(t, err) - specID, err = orm.CreateSpec(ctx, *p, types.Interval(0)) + specID, err = orm.CreateSpec(ctx, *p, sqlutil.Interval(0)) require.NoError(t, err) var pipelineSpecs []pipeline.Spec diff --git a/core/services/job/models.go b/core/services/job/models.go index bd8f021a642..2d8055b0b9c 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -17,6 +17,7 @@ import ( "gopkg.in/guregu/null.v4" commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/workflows/sdk" @@ -190,7 +191,7 @@ type Job struct { GasLimit clnull.Uint32 `toml:"gasLimit"` ForwardingAllowed bool `toml:"forwardingAllowed"` Name null.String `toml:"name"` - MaxTaskDuration types.Interval + MaxTaskDuration sqlutil.Interval Pipeline pipeline.Pipeline `toml:"observationSource"` CreatedAt time.Time } @@ -279,15 +280,15 @@ type OCROracleSpec struct { IsBootstrapPeer bool `toml:"isBootstrapPeer"` EncryptedOCRKeyBundleID *models.Sha256Hash `toml:"keyBundleID"` TransmitterAddress *evmtypes.EIP55Address `toml:"transmitterAddress"` - ObservationTimeout types.Interval `toml:"observationTimeout"` - BlockchainTimeout types.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval types.Interval `toml:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` + ObservationTimeout sqlutil.Interval `toml:"observationTimeout"` + BlockchainTimeout sqlutil.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval sqlutil.Interval `toml:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval sqlutil.Interval `toml:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` EVMChainID *big.Big `toml:"evmChainID" db:"evm_chain_id"` - DatabaseTimeout *types.Interval `toml:"databaseTimeout"` - ObservationGracePeriod *types.Interval `toml:"observationGracePeriod"` - ContractTransmitterTransmitTimeout *types.Interval `toml:"contractTransmitterTransmitTimeout"` + DatabaseTimeout *sqlutil.Interval `toml:"databaseTimeout"` + ObservationGracePeriod *sqlutil.Interval `toml:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *sqlutil.Interval `toml:"contractTransmitterTransmitTimeout"` CaptureEATelemetry bool `toml:"captureEATelemetry"` CreatedAt time.Time `toml:"-"` UpdatedAt time.Time `toml:"-"` @@ -377,8 +378,8 @@ type OCR2OracleSpec struct { OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` MonitoringEndpoint null.String `toml:"monitoringEndpoint"` TransmitterID null.String `toml:"transmitterID"` - BlockchainTimeout types.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` + BlockchainTimeout sqlutil.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval sqlutil.Interval `toml:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` OnchainSigningStrategy JSONConfig `toml:"onchainSigningStrategy"` PluginConfig JSONConfig `toml:"pluginConfig"` @@ -781,12 +782,12 @@ type BootstrapSpec struct { FeedID *common.Hash `toml:"feedID"` Relay string `toml:"relay"` // RelayID.Network RelayConfig JSONConfig - MonitoringEndpoint null.String `toml:"monitoringEndpoint"` - BlockchainTimeout types.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + MonitoringEndpoint null.String `toml:"monitoringEndpoint"` + BlockchainTimeout sqlutil.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval sqlutil.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } // AsOCR2Spec transforms the bootstrap spec into a generic OCR2 format to enable code sharing between specs. diff --git a/core/services/job/models_test.go b/core/services/job/models_test.go index 0527b9af40c..928cab871a2 100644 --- a/core/services/job/models_test.go +++ b/core/services/job/models_test.go @@ -10,6 +10,7 @@ import ( "github.com/pelletier/go-toml/v2" "github.com/smartcontractkit/chainlink-common/pkg/codec" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" pkgworkflows "github.com/smartcontractkit/chainlink-common/pkg/workflows" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -143,7 +144,7 @@ func TestOCR2OracleSpec(t *testing.T) { OCRKeyBundleID: null.StringFrom("bar"), TransmitterID: null.StringFrom("baz"), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: *types.NewInterval(time.Second), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second), RelayConfig: map[string]interface{}{ "chainID": 1337, "fromBlock": 42, diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 6e0ca0f7dcf..1352779da2f 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -948,28 +948,28 @@ type OCRConfig interface { // LoadConfigVarsLocalOCR loads local OCR vars into the OCROracleSpec. func LoadConfigVarsLocalOCR(evmOcrCfg evmconfig.OCR, os OCROracleSpec, ocrCfg OCRConfig) *OCROracleSpec { if os.ObservationTimeout == 0 { - os.ObservationTimeout = types.Interval(ocrCfg.ObservationTimeout()) + os.ObservationTimeout = sqlutil.Interval(ocrCfg.ObservationTimeout()) } if os.BlockchainTimeout == 0 { - os.BlockchainTimeout = types.Interval(ocrCfg.BlockchainTimeout()) + os.BlockchainTimeout = sqlutil.Interval(ocrCfg.BlockchainTimeout()) } if os.ContractConfigTrackerSubscribeInterval == 0 { - os.ContractConfigTrackerSubscribeInterval = types.Interval(ocrCfg.ContractSubscribeInterval()) + os.ContractConfigTrackerSubscribeInterval = sqlutil.Interval(ocrCfg.ContractSubscribeInterval()) } if os.ContractConfigTrackerPollInterval == 0 { - os.ContractConfigTrackerPollInterval = types.Interval(ocrCfg.ContractPollInterval()) + os.ContractConfigTrackerPollInterval = sqlutil.Interval(ocrCfg.ContractPollInterval()) } if os.ContractConfigConfirmations == 0 { os.ContractConfigConfirmations = evmOcrCfg.ContractConfirmations() } if os.DatabaseTimeout == nil { - os.DatabaseTimeout = types.NewInterval(evmOcrCfg.DatabaseTimeout()) + os.DatabaseTimeout = sqlutil.NewInterval(evmOcrCfg.DatabaseTimeout()) } if os.ObservationGracePeriod == nil { - os.ObservationGracePeriod = types.NewInterval(evmOcrCfg.ObservationGracePeriod()) + os.ObservationGracePeriod = sqlutil.NewInterval(evmOcrCfg.ObservationGracePeriod()) } if os.ContractTransmitterTransmitTimeout == nil { - os.ContractTransmitterTransmitTimeout = types.NewInterval(evmOcrCfg.ContractTransmitterTransmitTimeout()) + os.ContractTransmitterTransmitTimeout = sqlutil.NewInterval(evmOcrCfg.ContractTransmitterTransmitTimeout()) } os.CaptureEATelemetry = ocrCfg.CaptureEATelemetry() diff --git a/core/services/job/orm_test.go b/core/services/job/orm_test.go index 9b981776a6c..9f3cd296c38 100644 --- a/core/services/job/orm_test.go +++ b/core/services/job/orm_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -35,16 +34,16 @@ func TestLoadConfigVarsLocalOCR(t *testing.T) { jobSpec = job.LoadConfigVarsLocalOCR(chainConfig.EVM().OCR(), *jobSpec, config.OCR()) - require.Equal(t, types.Interval(config.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) - require.Equal(t, types.Interval(config.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) - require.Equal(t, types.Interval(config.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) - require.Equal(t, types.Interval(config.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) + require.Equal(t, sqlutil.Interval(config.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) + require.Equal(t, sqlutil.Interval(config.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) + require.Equal(t, sqlutil.Interval(config.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) + require.Equal(t, sqlutil.Interval(config.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) require.Equal(t, config.OCR().CaptureEATelemetry(), jobSpec.CaptureEATelemetry) require.Equal(t, chainConfig.EVM().OCR().ContractConfirmations(), jobSpec.ContractConfigConfirmations) - require.Equal(t, types.Interval(chainConfig.EVM().OCR().DatabaseTimeout()), *jobSpec.DatabaseTimeout) - require.Equal(t, types.Interval(chainConfig.EVM().OCR().ObservationGracePeriod()), *jobSpec.ObservationGracePeriod) - require.Equal(t, types.Interval(chainConfig.EVM().OCR().ContractTransmitterTransmitTimeout()), *jobSpec.ContractTransmitterTransmitTimeout) + require.Equal(t, sqlutil.Interval(chainConfig.EVM().OCR().DatabaseTimeout()), *jobSpec.DatabaseTimeout) + require.Equal(t, sqlutil.Interval(chainConfig.EVM().OCR().ObservationGracePeriod()), *jobSpec.ObservationGracePeriod) + require.Equal(t, sqlutil.Interval(chainConfig.EVM().OCR().ContractTransmitterTransmitTimeout()), *jobSpec.ContractTransmitterTransmitTimeout) } func TestSetDRMinIncomingConfirmations(t *testing.T) { diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index de6a50d4f96..e0f1edefcd5 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -26,7 +26,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -463,7 +463,7 @@ answer1 [type=median index=0]; require.NoError(t, err) err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) - jb.MaxTaskDuration = commontypes.Interval(cltest.MustParseDuration(t, "1s")) + jb.MaxTaskDuration = sqlutil.Interval(cltest.MustParseDuration(t, "1s")) err = jobORM.CreateJob(testutils.Context(t), &jb) require.NoError(t, err) @@ -500,10 +500,10 @@ answer1 [type=median index=0]; err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) - jb.MaxTaskDuration = commontypes.Interval(cltest.MustParseDuration(t, "1s")) + jb.MaxTaskDuration = sqlutil.Interval(cltest.MustParseDuration(t, "1s")) err = jobORM.CreateJob(testutils.Context(t), &jb) require.NoError(t, err) - assert.Equal(t, jb.MaxTaskDuration, commontypes.Interval(cltest.MustParseDuration(t, "1s"))) + assert.Equal(t, jb.MaxTaskDuration, sqlutil.Interval(cltest.MustParseDuration(t, "1s"))) lggr := logger.TestLogger(t) pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), db, lggr) @@ -592,10 +592,10 @@ answer1 [type=median index=0]; err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) - jb.MaxTaskDuration = commontypes.Interval(cltest.MustParseDuration(t, "1s")) + jb.MaxTaskDuration = sqlutil.Interval(cltest.MustParseDuration(t, "1s")) err = jobORM.CreateJob(testutils.Context(t), &jb) require.NoError(t, err) - assert.Equal(t, jb.MaxTaskDuration, commontypes.Interval(cltest.MustParseDuration(t, "1s"))) + assert.Equal(t, jb.MaxTaskDuration, sqlutil.Interval(cltest.MustParseDuration(t, "1s"))) lggr := logger.TestLogger(t) pw := ocrcommon.NewSingletonPeerWrapper(keyStore, config.P2P(), config.OCR(), db, lggr) @@ -736,7 +736,7 @@ answer1 [type=median index=0]; // Job specified task timeout should fail. jb = makeMinimalHTTPOracleSpec(t, db, config, cltest.NewEIP55Address().String(), transmitterAddress.Hex(), cltest.DefaultOCRKeyBundleID, serv.URL, "") - jb.MaxTaskDuration = commontypes.Interval(time.Duration(1)) + jb.MaxTaskDuration = sqlutil.Interval(time.Duration(1)) jb.Name = null.NewString("a job 3", true) err = jobORM.CreateJob(ctx, jb) require.NoError(t, err) diff --git a/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go b/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go index 3cffb871ca8..302f4eb86de 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go @@ -12,6 +12,7 @@ import ( "github.com/google/uuid" "github.com/lib/pq" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -248,7 +249,7 @@ func (params CCIPJobSpecParams) CommitJobSpec() (*OCR2TaskJobSpec, error) { PluginType: types.CCIPCommit, ContractID: params.CommitStore.Hex(), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: types.Interval(20 * time.Second), + ContractConfigTrackerPollInterval: sqlutil.Interval(20 * time.Second), P2PV2Bootstrappers: params.P2PV2Bootstrappers, PluginConfig: pluginConfig, RelayConfig: map[string]interface{}{ @@ -280,7 +281,7 @@ func (params CCIPJobSpecParams) ExecutionJobSpec() (*OCR2TaskJobSpec, error) { PluginType: types.CCIPExecution, ContractID: params.OffRamp.Hex(), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: types.Interval(20 * time.Second), + ContractConfigTrackerPollInterval: sqlutil.Interval(20 * time.Second), P2PV2Bootstrappers: params.P2PV2Bootstrappers, PluginConfig: map[string]interface{}{}, @@ -323,7 +324,7 @@ func (params CCIPJobSpecParams) BootstrapJob(contractID string) *OCR2TaskJobSpec ContractID: contractID, Relay: relay.NetworkEVM, ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: types.Interval(20 * time.Second), + ContractConfigTrackerPollInterval: sqlutil.Interval(20 * time.Second), RelayConfig: map[string]interface{}{ "chainID": params.DestEvmChainId, }, diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go index 723c6e45462..e1c923fe229 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -28,7 +28,7 @@ func (p *PipelineRunnerAdapter) ExecuteRun(ctx context.Context, spec string, var s := pipeline.Spec{ DotDagSource: spec, CreatedAt: time.Now(), - MaxTaskDuration: types.Interval(options.MaxTaskDuration), + MaxTaskDuration: sqlutil.Interval(options.MaxTaskDuration), JobID: p.job.ID, JobName: p.job.Name.ValueOrZero(), JobType: string(p.job.Type), diff --git a/core/services/ocr2/plugins/median/config/config.go b/core/services/ocr2/plugins/median/config/config.go index 61f10cdef8d..74db77ee09f 100644 --- a/core/services/ocr2/plugins/median/config/config.go +++ b/core/services/ocr2/plugins/median/config/config.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) @@ -27,9 +27,9 @@ type PluginConfig struct { } type JuelsPerFeeCoinCache struct { - Disable bool `json:"disable"` - UpdateInterval types.Interval `json:"updateInterval"` - StalenessAlertThreshold types.Interval `json:"stalenessAlertThreshold"` + Disable bool `json:"disable"` + UpdateInterval sqlutil.Interval `json:"updateInterval"` + StalenessAlertThreshold sqlutil.Interval `json:"stalenessAlertThreshold"` } // ValidatePluginConfig validates the arguments for the Median plugin. diff --git a/core/services/ocr2/plugins/median/config/config_test.go b/core/services/ocr2/plugins/median/config/config_test.go index 2b800791d6f..e4e29d0b7fa 100644 --- a/core/services/ocr2/plugins/median/config/config_test.go +++ b/core/services/ocr2/plugins/median/config/config_test.go @@ -7,22 +7,22 @@ import ( "github.com/stretchr/testify/assert" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) func TestValidatePluginConfig(t *testing.T) { type testCase struct { name string pipeline string - cacheDuration types.Interval + cacheDuration sqlutil.Interval expectedError error } t.Run("pipeline validation", func(t *testing.T) { for _, tc := range []testCase{ - {"empty pipeline", "", types.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, - {"blank pipeline", " ", types.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, - {"foo pipeline", "foo", types.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: UnmarshalTaskFromMap: unknown task type: \"\"")}, + {"empty pipeline", "", sqlutil.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, + {"blank pipeline", " ", sqlutil.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: empty pipeline")}, + {"foo pipeline", "foo", sqlutil.Interval(time.Minute), errors.New("invalid juelsPerFeeCoinSource pipeline: UnmarshalTaskFromMap: unknown task type: \"\"")}, } { t.Run(tc.name, func(t *testing.T) { pc := PluginConfig{JuelsPerFeeCoinPipeline: tc.pipeline} @@ -33,8 +33,8 @@ func TestValidatePluginConfig(t *testing.T) { t.Run("cache duration validation", func(t *testing.T) { for _, tc := range []testCase{ - {"cache duration below minimum", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Second * 29), errors.New("juelsPerFeeCoinSourceCache update interval: 29s is below 30 second minimum")}, - {"cache duration above maximum", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Minute*20 + time.Second), errors.New("juelsPerFeeCoinSourceCache update interval: 20m1s is above 20 minute maximum")}, + {"cache duration below minimum", `ds1 [type=bridge name=voter_turnout];`, sqlutil.Interval(time.Second * 29), errors.New("juelsPerFeeCoinSourceCache update interval: 29s is below 30 second minimum")}, + {"cache duration above maximum", `ds1 [type=bridge name=voter_turnout];`, sqlutil.Interval(time.Minute*20 + time.Second), errors.New("juelsPerFeeCoinSourceCache update interval: 20m1s is above 20 minute maximum")}, } { t.Run(tc.name, func(t *testing.T) { pc := PluginConfig{JuelsPerFeeCoinPipeline: tc.pipeline, JuelsPerFeeCoinCache: &JuelsPerFeeCoinCache{UpdateInterval: tc.cacheDuration}} @@ -46,8 +46,8 @@ func TestValidatePluginConfig(t *testing.T) { t.Run("valid values", func(t *testing.T) { for _, s := range []testCase{ {"valid 0 cache duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, 0, nil}, - {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Second * 30), nil}, - {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, types.Interval(time.Minute * 20), nil}, + {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, sqlutil.Interval(time.Second * 30), nil}, + {"valid duration and valid pipeline", `ds1 [type=bridge name=voter_turnout];`, sqlutil.Interval(time.Minute * 20), nil}, } { t.Run(s.name, func(t *testing.T) { pc := PluginConfig{JuelsPerFeeCoinPipeline: s.pipeline} diff --git a/core/services/ocrcommon/data_source_test.go b/core/services/ocrcommon/data_source_test.go index a96471d8405..ce120bee694 100644 --- a/core/services/ocrcommon/data_source_test.go +++ b/core/services/ocrcommon/data_source_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" serializablebig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -80,7 +80,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { mockKVStore := mocks.KVStore{} mockKVStore.On("Store", mock.Anything, mock.Anything, mock.Anything).Return(nil) mockKVStore.On("Get", mock.Anything, mock.Anything).Return(nil, nil) - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: commontypes.Interval(time.Second * 2)}) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: sqlutil.Interval(time.Second * 2)}) require.NoError(t, err) servicetest.Run(t, dsCache) @@ -114,7 +114,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { mockKVStore.On("Get", mock.Anything, mock.Anything).Return(result, nil) // set updater to a long time so that it doesn't log errors after the test is done - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: commontypes.Interval(time.Hour * 100)}) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: sqlutil.Interval(time.Hour * 100)}) require.NoError(t, err) changeResultValue(runner, "-1", true, false) servicetest.Run(t, dsCache) @@ -133,7 +133,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { mockKVStore.On("Get", mock.Anything, mock.Anything).Return(nil, assert.AnError) // set updater to a long time so that it doesn't log errors after the test is done - dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: commontypes.Interval(time.Hour * 100)}) + dsCache, err := ocrcommon.NewInMemoryDataSourceCache(ds, &mockKVStore, &config.JuelsPerFeeCoinCache{UpdateInterval: sqlutil.Interval(time.Hour * 100)}) require.NoError(t, err) changeResultValue(runner, "-1", true, false) servicetest.Run(t, dsCache) diff --git a/core/services/pipeline/mocks/orm.go b/core/services/pipeline/mocks/orm.go index ca330b09b4c..cadcf496ea4 100644 --- a/core/services/pipeline/mocks/orm.go +++ b/core/services/pipeline/mocks/orm.go @@ -123,7 +123,7 @@ func (_c *ORM_CreateRun_Call) RunAndReturn(run func(context.Context, *pipeline.R } // CreateSpec provides a mock function with given fields: ctx, _a1, maxTaskTimeout -func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout types.Interval) (int32, error) { +func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout sqlutil.Interval) (int32, error) { ret := _m.Called(ctx, _a1, maxTaskTimeout) if len(ret) == 0 { @@ -132,16 +132,16 @@ func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTim var r0 int32 var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, types.Interval) (int32, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, sqlutil.Interval) (int32, error)); ok { return rf(ctx, _a1, maxTaskTimeout) } - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, types.Interval) int32); ok { + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Pipeline, sqlutil.Interval) int32); ok { r0 = rf(ctx, _a1, maxTaskTimeout) } else { r0 = ret.Get(0).(int32) } - if rf, ok := ret.Get(1).(func(context.Context, pipeline.Pipeline, types.Interval) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, pipeline.Pipeline, sqlutil.Interval) error); ok { r1 = rf(ctx, _a1, maxTaskTimeout) } else { r1 = ret.Error(1) @@ -158,14 +158,14 @@ type ORM_CreateSpec_Call struct { // CreateSpec is a helper method to define mock.On call // - ctx context.Context // - _a1 pipeline.Pipeline -// - maxTaskTimeout types.Interval +// - maxTaskTimeout sqlutil.Interval func (_e *ORM_Expecter) CreateSpec(ctx interface{}, _a1 interface{}, maxTaskTimeout interface{}) *ORM_CreateSpec_Call { return &ORM_CreateSpec_Call{Call: _e.mock.On("CreateSpec", ctx, _a1, maxTaskTimeout)} } -func (_c *ORM_CreateSpec_Call) Run(run func(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout types.Interval)) *ORM_CreateSpec_Call { +func (_c *ORM_CreateSpec_Call) Run(run func(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout sqlutil.Interval)) *ORM_CreateSpec_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipeline.Pipeline), args[2].(types.Interval)) + run(args[0].(context.Context), args[1].(pipeline.Pipeline), args[2].(sqlutil.Interval)) }) return _c } @@ -175,7 +175,7 @@ func (_c *ORM_CreateSpec_Call) Return(_a0 int32, _a1 error) *ORM_CreateSpec_Call return _c } -func (_c *ORM_CreateSpec_Call) RunAndReturn(run func(context.Context, pipeline.Pipeline, types.Interval) (int32, error)) *ORM_CreateSpec_Call { +func (_c *ORM_CreateSpec_Call) RunAndReturn(run func(context.Context, pipeline.Pipeline, sqlutil.Interval) (int32, error)) *ORM_CreateSpec_Call { _c.Call.Return(run) return _c } diff --git a/core/services/pipeline/models.go b/core/services/pipeline/models.go index ed34d3efb99..73ee067eea3 100644 --- a/core/services/pipeline/models.go +++ b/core/services/pipeline/models.go @@ -14,17 +14,17 @@ import ( "github.com/shopspring/decimal" "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" ) type Spec struct { ID int32 - DotDagSource string `json:"dotDagSource"` - CreatedAt time.Time `json:"-"` - MaxTaskDuration types.Interval `json:"-"` - GasLimit *uint32 `json:"-"` - ForwardingAllowed bool `json:"-"` + DotDagSource string `json:"dotDagSource"` + CreatedAt time.Time `json:"-"` + MaxTaskDuration sqlutil.Interval `json:"-"` + GasLimit *uint32 `json:"-"` + ForwardingAllowed bool `json:"-"` JobID int32 `json:"-"` JobName string `json:"-"` diff --git a/core/services/pipeline/orm.go b/core/services/pipeline/orm.go index de9e259a4b8..cc877a71e0f 100644 --- a/core/services/pipeline/orm.go +++ b/core/services/pipeline/orm.go @@ -13,7 +13,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pg" @@ -77,7 +76,7 @@ type CreateDataSource interface { type ORM interface { services.Service - CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskTimeout types.Interval) (int32, error) + CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskTimeout sqlutil.Interval) (int32, error) CreateRun(ctx context.Context, run *Run) (err error) InsertRun(ctx context.Context, run *Run) error DeleteRun(ctx context.Context, id int64) error @@ -184,7 +183,7 @@ func (o *orm) transact(ctx context.Context, fn func(*orm) error) error { return sqlutil.Transact(ctx, o.withDataSource, o.ds, nil, fn) } -func (o *orm) CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskDuration types.Interval) (id int32, err error) { +func (o *orm) CreateSpec(ctx context.Context, pipeline Pipeline, maxTaskDuration sqlutil.Interval) (id int32, err error) { sql := `INSERT INTO pipeline_specs (dot_dag_source, max_task_duration, created_at) VALUES ($1, $2, NOW()) RETURNING id;` diff --git a/core/services/pipeline/orm_test.go b/core/services/pipeline/orm_test.go index d69a0c9db16..63fdf3b2037 100644 --- a/core/services/pipeline/orm_test.go +++ b/core/services/pipeline/orm_test.go @@ -14,7 +14,6 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" @@ -90,7 +89,7 @@ func Test_PipelineORM_CreateSpec(t *testing.T) { var ( source = "" - maxTaskDuration = types.Interval(1 * time.Minute) + maxTaskDuration = sqlutil.Interval(1 * time.Minute) ) p := pipeline.Pipeline{ @@ -156,7 +155,7 @@ answer2 [type=bridge name=election_winner index=1]; jb := job.Job{ Type: job.DirectRequest, SchemaVersion: 1, - MaxTaskDuration: types.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), DirectRequestSpec: &job.DirectRequestSpec{ ContractAddress: cltest.NewEIP55Address(), EVMChainID: (*big.Big)(&cltest.FixtureChainID), @@ -258,7 +257,7 @@ answer2 [type=bridge name=election_winner index=1]; jb := job.Job{ Type: job.DirectRequest, SchemaVersion: 1, - MaxTaskDuration: types.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), DirectRequestSpec: &job.DirectRequestSpec{ ContractAddress: cltest.NewEIP55Address(), EVMChainID: (*big.Big)(&cltest.FixtureChainID), @@ -272,7 +271,7 @@ answer2 [type=bridge name=election_winner index=1]; spec := pipeline.Spec{ DotDagSource: s, CreatedAt: time.Now(), - MaxTaskDuration: types.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), JobID: jb.ID, JobName: jb.Name.ValueOrZero(), JobType: string(jb.Type), @@ -678,7 +677,7 @@ func Test_GetUnfinishedRuns_Keepers(t *testing.T) { Type: job.Keeper, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: types.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), } err := jorm.CreateJob(ctx, &keeperJob) @@ -780,7 +779,7 @@ func Test_GetUnfinishedRuns_DirectRequest(t *testing.T) { Type: job.DirectRequest, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: types.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), } err := jorm.CreateJob(ctx, &drJob) diff --git a/core/services/pipeline/runner.go b/core/services/pipeline/runner.go index 0befd117931..6d43cd1ba8e 100644 --- a/core/services/pipeline/runner.go +++ b/core/services/pipeline/runner.go @@ -19,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - "github.com/smartcontractkit/chainlink-common/pkg/types" commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" @@ -559,7 +558,7 @@ func (r *runner) executeTaskRun(ctx context.Context, spec Spec, taskRun *memoryT ctx, cancel = context.WithTimeout(ctx, taskTimeout) defer cancel() } - if spec.MaxTaskDuration != types.Interval(time.Duration(0)) { + if spec.MaxTaskDuration != sqlutil.Interval(time.Duration(0)) { ctx, cancel = context.WithTimeout(ctx, time.Duration(spec.MaxTaskDuration)) defer cancel() } diff --git a/core/services/pipeline/task.bridge_test.go b/core/services/pipeline/task.bridge_test.go index 57733bfa223..76ae9254d43 100644 --- a/core/services/pipeline/task.bridge_test.go +++ b/core/services/pipeline/task.bridge_test.go @@ -23,7 +23,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -234,7 +234,7 @@ func TestBridgeTask_Happy(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -292,7 +292,7 @@ func TestBridgeTask_HandlesIntermittentFailure(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) result, runInfo := task.Run(testutils.Context(t), logger.TestLogger(t), @@ -356,7 +356,7 @@ func TestBridgeTask_DoesNotReturnStaleResults(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -463,7 +463,7 @@ func TestBridgeTask_AsyncJobPendingState(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, id, c) @@ -641,7 +641,7 @@ func TestBridgeTask_Variables(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -709,7 +709,7 @@ func TestBridgeTask_Meta(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -763,7 +763,7 @@ func TestBridgeTask_IncludeInputAtKey(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -819,7 +819,7 @@ func TestBridgeTask_ErrorMessage(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -858,7 +858,7 @@ func TestBridgeTask_OnlyErrorMessage(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -883,7 +883,7 @@ func TestBridgeTask_ErrorIfBridgeMissing(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() orm := bridges.NewORM(db) trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -971,7 +971,7 @@ func TestBridgeTask_Headers(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -993,7 +993,7 @@ func TestBridgeTask_Headers(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -1014,7 +1014,7 @@ func TestBridgeTask_Headers(t *testing.T) { c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -1064,7 +1064,7 @@ func TestBridgeTask_AdapterResponseStatusFailure(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) @@ -1161,7 +1161,7 @@ func TestBridgeTask_AdapterTimeout(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(ctx, pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) diff --git a/core/services/pipeline/task.http_test.go b/core/services/pipeline/task.http_test.go index b46f92fd054..dcf026d7a58 100644 --- a/core/services/pipeline/task.http_test.go +++ b/core/services/pipeline/task.http_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" clhttp "github.com/smartcontractkit/chainlink-common/pkg/http" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -176,7 +176,7 @@ func TestHTTPTask_Variables(t *testing.T) { } c := clhttptest.NewTestLocalOnlyHTTPClient() trORM := pipeline.NewORM(db, logger.TestLogger(t), cfg.JobPipeline().MaxSuccessfulRuns()) - specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *types.NewInterval(5 * time.Minute)) + specID, err := trORM.CreateSpec(testutils.Context(t), pipeline.Pipeline{}, *sqlutil.NewInterval(5 * time.Minute)) require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) diff --git a/core/services/relay/evm/types/types.go b/core/services/relay/evm/types/types.go index f5bc116f216..9197cd73330 100644 --- a/core/services/relay/evm/types/types.go +++ b/core/services/relay/evm/types/types.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" @@ -74,7 +75,7 @@ type PollingFilter struct { Topic2 evmtypes.HashArray `json:"topic2"` // list of possible values for topic2 Topic3 evmtypes.HashArray `json:"topic3"` // list of possible values for topic3 Topic4 evmtypes.HashArray `json:"topic4"` // list of possible values for topic4 - Retention types.Interval `json:"retention"` // maximum amount of time to retain logs + Retention sqlutil.Interval `json:"retention"` // maximum amount of time to retain logs MaxLogsKept uint64 `json:"maxLogsKept"` // maximum number of logs to retain ( 0 = unlimited ) LogsPerBlock uint64 `json:"logsPerBlock"` // rate limit ( maximum # of logs per block, 0 = unlimited ) } diff --git a/core/services/relay/evm/types/types_test.go b/core/services/relay/evm/types/types_test.go index 12797c31bbf..c4cb71b7524 100644 --- a/core/services/relay/evm/types/types_test.go +++ b/core/services/relay/evm/types/types_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/codec" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -95,7 +95,7 @@ func Test_ChainReaderConfig(t *testing.T) { Topic2: evmtypes.HashArray{common.HexToHash("0x1abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic3: evmtypes.HashArray{common.HexToHash("0x2abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic4: evmtypes.HashArray{common.HexToHash("0x3abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, - Retention: types.Interval(time.Minute * 1), + Retention: sqlutil.Interval(time.Minute * 1), MaxLogsKept: 100, LogsPerBlock: 10, }, @@ -133,7 +133,7 @@ func Test_ChainReaderConfig(t *testing.T) { Topic2: evmtypes.HashArray{common.HexToHash("0x4abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic3: evmtypes.HashArray{common.HexToHash("0x5abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, Topic4: evmtypes.HashArray{common.HexToHash("0x6abbe4784b1fb071039bb9cb50b82978fb5d3ab98fb512c032e75786b93e2c52")}, - Retention: types.Interval(time.Minute * 1), + Retention: sqlutil.Interval(time.Minute * 1), MaxLogsKept: 100, LogsPerBlock: 10, }, diff --git a/core/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index 061e619663e..85fc4565c51 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" evmcfg "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" @@ -30,20 +31,20 @@ import ( ) type OffchainReporting2OracleSpec100 struct { - ID int32 `toml:"-"` - ContractID string `toml:"contractID"` - Relay string `toml:"relay"` // RelayID.Network - RelayConfig job.JSONConfig `toml:"relayConfig"` - P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers"` - OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` - MonitoringEndpoint null.String `toml:"monitoringEndpoint"` - TransmitterID null.String `toml:"transmitterID"` - BlockchainTimeout types.Interval `toml:"blockchainTimeout"` - ContractConfigTrackerPollInterval types.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - JuelsPerFeeCoinPipeline string `toml:"juelsPerFeeCoinSource"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + ID int32 `toml:"-"` + ContractID string `toml:"contractID"` + Relay string `toml:"relay"` // RelayID.Network + RelayConfig job.JSONConfig `toml:"relayConfig"` + P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers"` + OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` + MonitoringEndpoint null.String `toml:"monitoringEndpoint"` + TransmitterID null.String `toml:"transmitterID"` + BlockchainTimeout sqlutil.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerPollInterval sqlutil.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + JuelsPerFeeCoinPipeline string `toml:"juelsPerFeeCoinSource"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } func getOCR2Spec100() OffchainReporting2OracleSpec100 { diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index 3221897ccb3..e2b85ff3c0f 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -9,7 +9,7 @@ import ( commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -124,23 +124,23 @@ func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec { // OffChainReportingSpec defines the spec details of a OffChainReporting Job type OffChainReportingSpec struct { - ContractAddress types.EIP55Address `json:"contractAddress"` - P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` - IsBootstrapPeer bool `json:"isBootstrapPeer"` - EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` - TransmitterAddress *types.EIP55Address `json:"transmitterAddress"` - ObservationTimeout commontypes.Interval `json:"observationTimeout"` - BlockchainTimeout commontypes.Interval `json:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval commontypes.Interval `json:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval commontypes.Interval `json:"contractConfigTrackerPollInterval"` - ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *big.Big `json:"evmChainID"` - DatabaseTimeout *commontypes.Interval `json:"databaseTimeout"` - ObservationGracePeriod *commontypes.Interval `json:"observationGracePeriod"` - ContractTransmitterTransmitTimeout *commontypes.Interval `json:"contractTransmitterTransmitTimeout"` - CollectTelemetry bool `json:"collectTelemetry,omitempty"` + ContractAddress types.EIP55Address `json:"contractAddress"` + P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` + IsBootstrapPeer bool `json:"isBootstrapPeer"` + EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` + TransmitterAddress *types.EIP55Address `json:"transmitterAddress"` + ObservationTimeout sqlutil.Interval `json:"observationTimeout"` + BlockchainTimeout sqlutil.Interval `json:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval sqlutil.Interval `json:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval sqlutil.Interval `json:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *big.Big `json:"evmChainID"` + DatabaseTimeout *sqlutil.Interval `json:"databaseTimeout"` + ObservationGracePeriod *sqlutil.Interval `json:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *sqlutil.Interval `json:"contractTransmitterTransmitTimeout"` + CollectTelemetry bool `json:"collectTelemetry,omitempty"` } // NewOffChainReportingSpec initializes a new OffChainReportingSpec from a @@ -175,9 +175,9 @@ type OffChainReporting2Spec struct { P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` OCRKeyBundleID null.String `json:"ocrKeyBundleID"` TransmitterID null.String `json:"transmitterID"` - ObservationTimeout commontypes.Interval `json:"observationTimeout"` - BlockchainTimeout commontypes.Interval `json:"blockchainTimeout"` - ContractConfigTrackerPollInterval commontypes.Interval `json:"contractConfigTrackerPollInterval"` + ObservationTimeout sqlutil.Interval `json:"observationTimeout"` + BlockchainTimeout sqlutil.Interval `json:"blockchainTimeout"` + ContractConfigTrackerPollInterval sqlutil.Interval `json:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` OnchainSigningStrategy map[string]interface{} `json:"onchainSigningStrategy"` CreatedAt time.Time `json:"createdAt"` @@ -401,9 +401,9 @@ type BootstrapSpec struct { ContractID string `json:"contractID"` Relay string `json:"relay"` // RelayID.Network RelayConfig map[string]interface{} `json:"relayConfig"` - BlockchainTimeout commontypes.Interval `json:"blockchainTimeout"` - ContractConfigTrackerSubscribeInterval commontypes.Interval `json:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerPollInterval commontypes.Interval `json:"contractConfigTrackerPollInterval"` + BlockchainTimeout sqlutil.Interval `json:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval sqlutil.Interval `json:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval sqlutil.Interval `json:"contractConfigTrackerPollInterval"` ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` @@ -521,7 +521,7 @@ type JobResource struct { SchemaVersion uint32 `json:"schemaVersion"` GasLimit clnull.Uint32 `json:"gasLimit"` ForwardingAllowed bool `json:"forwardingAllowed"` - MaxTaskDuration commontypes.Interval `json:"maxTaskDuration"` + MaxTaskDuration sqlutil.Interval `json:"maxTaskDuration"` ExternalJobID uuid.UUID `json:"externalJobID"` DirectRequestSpec *DirectRequestSpec `json:"directRequestSpec"` FluxMonitorSpec *FluxMonitorSpec `json:"fluxMonitorSpec"` diff --git a/core/web/presenters/job_test.go b/core/web/presenters/job_test.go index 4e886760709..cf09a486e2f 100644 --- a/core/web/presenters/job_test.go +++ b/core/web/presenters/job_test.go @@ -14,7 +14,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/assets" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" evmassets "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -88,7 +88,7 @@ func TestJob(t *testing.T) { Type: job.DirectRequest, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -161,7 +161,7 @@ func TestJob(t *testing.T) { Type: job.FluxMonitor, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -226,17 +226,17 @@ func TestJob(t *testing.T) { IsBootstrapPeer: true, EncryptedOCRKeyBundleID: &ocrKeyID, TransmitterAddress: &transmitterAddress, - ObservationTimeout: commontypes.Interval(1 * time.Minute), - BlockchainTimeout: commontypes.Interval(1 * time.Minute), - ContractConfigTrackerSubscribeInterval: commontypes.Interval(1 * time.Minute), - ContractConfigTrackerPollInterval: commontypes.Interval(1 * time.Minute), + ObservationTimeout: sqlutil.Interval(1 * time.Minute), + BlockchainTimeout: sqlutil.Interval(1 * time.Minute), + ContractConfigTrackerSubscribeInterval: sqlutil.Interval(1 * time.Minute), + ContractConfigTrackerPollInterval: sqlutil.Interval(1 * time.Minute), ContractConfigConfirmations: 1, CreatedAt: timestamp, UpdatedAt: timestamp, EVMChainID: evmChainID, - DatabaseTimeout: commontypes.NewInterval(2 * time.Second), - ObservationGracePeriod: commontypes.NewInterval(3 * time.Second), - ContractTransmitterTransmitTimeout: commontypes.NewInterval(444 * time.Millisecond), + DatabaseTimeout: sqlutil.NewInterval(2 * time.Second), + ObservationGracePeriod: sqlutil.NewInterval(3 * time.Second), + ContractTransmitterTransmitTimeout: sqlutil.NewInterval(444 * time.Millisecond), }, ExternalJobID: uuid.MustParse("0EEC7E1D-D0D2-476C-A1A8-72DFB6633F46"), PipelineSpec: &pipeline.Spec{ @@ -248,7 +248,7 @@ func TestJob(t *testing.T) { Name: null.StringFrom("test"), GasLimit: clnull.Uint32From(123), ForwardingAllowed: true, - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -324,7 +324,7 @@ func TestJob(t *testing.T) { Type: job.Keeper, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -389,7 +389,7 @@ func TestJob(t *testing.T) { Type: job.Cron, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), }, want: fmt.Sprintf(` { @@ -450,7 +450,7 @@ func TestJob(t *testing.T) { Type: job.Webhook, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), }, want: ` { @@ -1088,7 +1088,7 @@ func TestJob(t *testing.T) { Type: job.Keeper, SchemaVersion: 1, Name: null.StringFrom("test"), - MaxTaskDuration: commontypes.Interval(1 * time.Minute), + MaxTaskDuration: sqlutil.Interval(1 * time.Minute), JobSpecErrors: []job.SpecError{ { ID: 200, diff --git a/core/web/resolver/job_test.go b/core/web/resolver/job_test.go index 8c5983a9bd2..a768f0e8cbf 100644 --- a/core/web/resolver/job_test.go +++ b/core/web/resolver/job_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/mock" "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-evm/pkg/chains" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" clnull "github.com/smartcontractkit/chainlink/v2/core/null" @@ -79,7 +79,7 @@ func TestResolver_Jobs(t *testing.T) { ID: 1, Name: null.StringFrom("job1"), SchemaVersion: 1, - MaxTaskDuration: types.Interval(1 * time.Second), + MaxTaskDuration: sqlutil.Interval(1 * time.Second), ExternalJobID: externalJobID, CreatedAt: f.Timestamp(), Type: job.OffchainReporting, @@ -215,7 +215,7 @@ func TestResolver_Job(t *testing.T) { Name: null.StringFrom("job1"), SchemaVersion: 1, GasLimit: clnull.Uint32From(123), - MaxTaskDuration: types.Interval(1 * time.Second), + MaxTaskDuration: sqlutil.Interval(1 * time.Second), ExternalJobID: externalJobID, CreatedAt: f.Timestamp(), Type: job.OffchainReporting, @@ -264,7 +264,7 @@ func TestResolver_Job(t *testing.T) { Name: null.StringFrom("job1"), SchemaVersion: 1, GasLimit: clnull.Uint32From(123), - MaxTaskDuration: types.Interval(1 * time.Second), + MaxTaskDuration: sqlutil.Interval(1 * time.Second), ExternalJobID: externalJobID, CreatedAt: f.Timestamp(), Type: job.OffchainReporting, @@ -459,7 +459,7 @@ func TestResolver_DeleteJob(t *testing.T) { ID: id, Name: null.StringFrom("test-job"), ExternalJobID: extJID, - MaxTaskDuration: types.Interval(2 * time.Second), + MaxTaskDuration: sqlutil.Interval(2 * time.Second), CreatedAt: f.Timestamp(), }, nil) f.App.On("JobORM").Return(f.Mocks.jobORM) diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 804b4c5ca48..2eae3d38ef5 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -13,6 +13,7 @@ import ( "gopkg.in/guregu/null.v4" commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/assets" @@ -378,19 +379,19 @@ func TestResolver_OCRSpec(t *testing.T) { f.Mocks.jobORM.On("FindJobWithoutSpecErrors", mock.Anything, id).Return(job.Job{ Type: job.OffchainReporting, OCROracleSpec: &job.OCROracleSpec{ - BlockchainTimeout: types.Interval(1 * time.Minute), + BlockchainTimeout: sqlutil.Interval(1 * time.Minute), ContractAddress: contractAddress, ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: types.Interval(1 * time.Minute), - ContractConfigTrackerSubscribeInterval: types.Interval(2 * time.Minute), - DatabaseTimeout: types.NewInterval(3 * time.Second), - ObservationGracePeriod: types.NewInterval(4 * time.Second), - ContractTransmitterTransmitTimeout: types.NewInterval(555 * time.Millisecond), + ContractConfigTrackerPollInterval: sqlutil.Interval(1 * time.Minute), + ContractConfigTrackerSubscribeInterval: sqlutil.Interval(2 * time.Minute), + DatabaseTimeout: sqlutil.NewInterval(3 * time.Second), + ObservationGracePeriod: sqlutil.NewInterval(4 * time.Second), + ContractTransmitterTransmitTimeout: sqlutil.NewInterval(555 * time.Millisecond), CreatedAt: f.Timestamp(), EVMChainID: ubig.NewI(42), IsBootstrapPeer: false, EncryptedOCRKeyBundleID: &keyBundleID, - ObservationTimeout: types.Interval(2 * time.Minute), + ObservationTimeout: sqlutil.Interval(2 * time.Minute), P2PV2Bootstrappers: pq.StringArray{"12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw@localhost:5001"}, TransmitterAddress: &transmitterAddress, }, @@ -489,10 +490,10 @@ func TestResolver_OCR2Spec(t *testing.T) { f.Mocks.jobORM.On("FindJobWithoutSpecErrors", mock.Anything, id).Return(job.Job{ Type: job.OffchainReporting2, OCR2OracleSpec: &job.OCR2OracleSpec{ - BlockchainTimeout: types.Interval(1 * time.Minute), + BlockchainTimeout: sqlutil.Interval(1 * time.Minute), ContractID: contractAddress.String(), ContractConfigConfirmations: 1, - ContractConfigTrackerPollInterval: types.Interval(1 * time.Minute), + ContractConfigTrackerPollInterval: sqlutil.Interval(1 * time.Minute), OnchainSigningStrategy: onchainSigningStrategy, CreatedAt: f.Timestamp(), OCRKeyBundleID: null.StringFrom(keyBundleID.String()), @@ -963,8 +964,8 @@ func TestResolver_BootstrapSpec(t *testing.T) { Relay: "evm", RelayConfig: map[string]interface{}{}, MonitoringEndpoint: null.String{}, - BlockchainTimeout: types.Interval(2 * time.Minute), - ContractConfigTrackerPollInterval: types.Interval(2 * time.Minute), + BlockchainTimeout: sqlutil.Interval(2 * time.Minute), + ContractConfigTrackerPollInterval: sqlutil.Interval(2 * time.Minute), ContractConfigConfirmations: 100, CreatedAt: f.Timestamp(), }, diff --git a/deployment/go.mod b/deployment/go.mod index 981fa936340..f88875ffed0 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -39,7 +39,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/deployment/go.sum b/deployment/go.sum index 2a416b0b0ec..011db713d5a 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1334,8 +1334,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/go.mod b/go.mod index 1936284f00a..4ac94d7b6db 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/go.sum b/go.sum index c26f7bba58e..0adf4f006b5 100644 --- a/go.sum +++ b/go.sum @@ -1113,8 +1113,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/actions/automation_ocr_helpers_local.go b/integration-tests/actions/automation_ocr_helpers_local.go index cf04198863b..a822d64fea5 100644 --- a/integration-tests/actions/automation_ocr_helpers_local.go +++ b/integration-tests/actions/automation_ocr_helpers_local.go @@ -17,8 +17,7 @@ import ( ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config" - - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" @@ -268,7 +267,7 @@ func CreateOCRKeeperJobsLocal( RelayConfig: map[string]interface{}{ "chainID": int(chainID), }, - ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second * 15), }, } _, err = bootstrapNode.MustCreateJob(bootstrapSpec) @@ -310,7 +309,7 @@ func CreateOCRKeeperJobsLocal( "mercuryCredentialName": "\"cred1\"", "contractVersion": "\"" + contractVersion + "\"", }, - ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second * 15), ContractID: registryAddr, // registryAddr OCRKeyBundleID: null.StringFrom(nodeOCRKeyId[0]), // get node ocr2config.ID TransmitterID: null.StringFrom(nodeTransmitterAddress[keyIndex]), // node addr diff --git a/integration-tests/actions/automationv2/actions.go b/integration-tests/actions/automationv2/actions.go index f1084cbf5fb..0483cf99157 100644 --- a/integration-tests/actions/automationv2/actions.go +++ b/integration-tests/actions/automationv2/actions.go @@ -27,7 +27,7 @@ import ( ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ctf_concurrency "github.com/smartcontractkit/chainlink-testing-framework/lib/concurrency" "github.com/smartcontractkit/chainlink-testing-framework/lib/logging" "github.com/smartcontractkit/chainlink-testing-framework/seth" @@ -418,7 +418,7 @@ func (a *AutomationTest) AddBootstrapJob() error { RelayConfig: map[string]interface{}{ "chainID": int(a.ChainClient.ChainID), }, - ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second * 15), }, } _, err := a.ChainlinkNodes[0].MustCreateJob(bootstrapSpec) @@ -459,7 +459,7 @@ func (a *AutomationTest) AddAutomationJobs() error { "chainID": int(a.ChainClient.ChainID), }, PluginConfig: pluginCfg, - ContractConfigTrackerPollInterval: *commontypes.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second * 15), TransmitterID: null.StringFrom(a.NodeDetails[i].TransmitterAddresses[a.TransmitterKeyIndex]), P2PV2Bootstrappers: pq.StringArray{a.DefaultP2Pv2Bootstrapper}, OCRKeyBundleID: null.StringFrom(a.NodeDetails[i].OCR2Id), diff --git a/integration-tests/actions/ocr2_helpers.go b/integration-tests/actions/ocr2_helpers.go index 3a42e4f0e83..71e2a7e4f55 100644 --- a/integration-tests/actions/ocr2_helpers.go +++ b/integration-tests/actions/ocr2_helpers.go @@ -21,7 +21,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ctfClient "github.com/smartcontractkit/chainlink-testing-framework/lib/client" "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" "github.com/smartcontractkit/chainlink/integration-tests/contracts" @@ -235,7 +235,7 @@ func CreateOCRv2Jobs( "chainID": chainId, }, MonitoringEndpoint: null.StringFrom(fmt.Sprintf("%s/%s", mockserver.Config.ClusterURL, "ocr2")), - ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(15 * time.Second), }, } _, err := bootstrapNode.MustCreateJob(bootstrapSpec) @@ -283,7 +283,7 @@ func CreateOCRv2Jobs( PluginConfig: map[string]any{ "juelsPerFeeCoinSource": fmt.Sprintf("\"\"\"%s\"\"\"", nodeclient.ObservationSourceSpecBridge(juelsBridge)), }, - ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(15 * time.Second), ContractID: ocrInstance.Address(), // registryAddr OCRKeyBundleID: null.StringFrom(nodeOCRKeyId), // get node ocr2config.ID TransmitterID: null.StringFrom(nodeTransmitterAddress), // node addr diff --git a/integration-tests/actions/ocr2_helpers_local.go b/integration-tests/actions/ocr2_helpers_local.go index 57ae1723ef5..af3ce0ca8e1 100644 --- a/integration-tests/actions/ocr2_helpers_local.go +++ b/integration-tests/actions/ocr2_helpers_local.go @@ -20,7 +20,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/codec" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env" "github.com/smartcontractkit/chainlink-testing-framework/parrot" @@ -77,7 +77,7 @@ func CreateOCRv2JobsLocal( "chainID": chainId, }, MonitoringEndpoint: null.StringFrom(fmt.Sprintf("%s/%s", mockAdapter.InternalEndpoint, valPath)), - ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(15 * time.Second), }, } _, err := bootstrapNode.MustCreateJob(bootstrapSpec) @@ -128,7 +128,7 @@ func CreateOCRv2JobsLocal( PluginConfig: map[string]any{ "juelsPerFeeCoinSource": fmt.Sprintf("\"\"\"%s\"\"\"", nodeclient.ObservationSourceSpecBridge(juelsBridge)), }, - ContractConfigTrackerPollInterval: *commontypes.NewInterval(15 * time.Second), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(15 * time.Second), ContractID: ocrInstance.Address(), // registryAddr OCRKeyBundleID: null.StringFrom(nodeOCRKeyID), // get node ocr2config.ID TransmitterID: null.StringFrom(nodeTransmitterAddress), // node addr diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 9d0f9e89f7d..b2d64c9f7dd 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 6e843eee8b1..d3fabcb50c8 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1580,8 +1580,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 6a2049f27c7..e34d99a3afa 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index aa13c9e5dbb..48801434e1e 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1559,8 +1559,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/utils/cl_node_jobs.go b/integration-tests/utils/cl_node_jobs.go index ceaec7b946f..23e3d0ec3a6 100644 --- a/integration-tests/utils/cl_node_jobs.go +++ b/integration-tests/utils/cl_node_jobs.go @@ -12,7 +12,7 @@ import ( "github.com/lib/pq" "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) @@ -29,7 +29,7 @@ func BuildBootstrapSpec(verifierAddr common.Address, chainID int64, feedId [32]b RelayConfig: map[string]interface{}{ "chainID": int(chainID), }, - ContractConfigTrackerPollInterval: *types.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second * 15), }, } } @@ -105,7 +105,7 @@ ask_price [type=median allowedFaults={{.AllowedFaults}} index=2]; "chainID": int(chainID), "fromBlock": fromBlock, }, - ContractConfigTrackerPollInterval: *types.NewInterval(time.Second * 15), + ContractConfigTrackerPollInterval: *sqlutil.NewInterval(time.Second * 15), ContractID: verifierAddr.String(), FeedID: &hash, OCRKeyBundleID: null.StringFrom(nodeOCRKey), diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index f06740968c3..7a468dbb38e 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -33,7 +33,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/scylladb/go-reflectx v1.0.1 github.com/smartcontractkit/chain-selectors v1.0.72 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index ed37fb54c74..4b328f72840 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1575,8 +1575,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index 4f6e427b277..477cfe46cdf 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -38,7 +38,7 @@ require ( github.com/prometheus/common v0.65.0 github.com/rs/zerolog v1.33.0 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250917110014-65bff6568f77 diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index 5cff2601c4e..6f4ad855d86 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1778,8 +1778,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8 h1:ORYlHAUS1bE/cQC6b4m45e7P+rWHqmEFs+0de2eSIic= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001110654-28a090681bc8/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= From 9307f2768f5a61241ba79d5119e8d7247e38383d Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 1 Oct 2025 16:28:58 +0200 Subject: [PATCH 5/6] Minor. --- core/services/pipeline/mocks/orm.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/services/pipeline/mocks/orm.go b/core/services/pipeline/mocks/orm.go index cadcf496ea4..4e2b17cc911 100644 --- a/core/services/pipeline/mocks/orm.go +++ b/core/services/pipeline/mocks/orm.go @@ -12,8 +12,6 @@ import ( time "time" - types "github.com/smartcontractkit/chainlink-common/pkg/types" - uuid "github.com/google/uuid" ) From 2e430f2523e7bd6e6045538c85bf0e1c7fed477c Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 1 Oct 2025 17:03:41 +0200 Subject: [PATCH 6/6] Minor. --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- 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 ++-- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 ++-- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index f97cc6362b2..8126c2d0d10 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -47,7 +47,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 0cf7733249f..cb4f499513b 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1597,8 +1597,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/deployment/go.mod b/deployment/go.mod index f88875ffed0..937c21bcfa2 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -39,7 +39,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/deployment/go.sum b/deployment/go.sum index 011db713d5a..28c3760b029 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1334,8 +1334,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/go.mod b/go.mod index 4ac94d7b6db..ff06552a5ed 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/go.sum b/go.sum index 0adf4f006b5..9a1ac828bab 100644 --- a/go.sum +++ b/go.sum @@ -1113,8 +1113,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index b2d64c9f7dd..39f835eee81 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/integration-tests/go.sum b/integration-tests/go.sum index d3fabcb50c8..e78811798b0 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1580,8 +1580,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index e34d99a3afa..f4cb3b1fcde 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250930202440-88c08e65d960 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-deployments-framework v0.49.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 48801434e1e..dafd988199b 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1559,8 +1559,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index 7a468dbb38e..eb61dfa5dba 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -33,7 +33,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/scylladb/go-reflectx v1.0.1 github.com/smartcontractkit/chain-selectors v1.0.72 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index 4b328f72840..033fbb3f7fe 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1575,8 +1575,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index 477cfe46cdf..3de51205eb4 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -38,7 +38,7 @@ require ( github.com/prometheus/common v0.65.0 github.com/rs/zerolog v1.33.0 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 github.com/smartcontractkit/chainlink-data-streams v0.1.2 github.com/smartcontractkit/chainlink-deployments-framework v0.52.0 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250917110014-65bff6568f77 diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index 6f4ad855d86..e2702679d75 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1778,8 +1778,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1 h1:Xvdl97kZF+Frw9bDctpv2GK/0rNp6OBZ8ISO+mk7LkA= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001141153-34ff689c75b1/go.mod h1:xRLbIePmIYTQXw15fbpIdVc8MhqwuKUAtYz1qe6SvOA= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124 h1:rnt5y06fVvWngpQkJbFZjr3sIjvWDCpdETDIXzgwHnI= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251001150007-98903c79c124/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4/go.mod h1:eKGyfTKzr0/PeR7qKN4l2FcW9p+HzyKUwAfGhm/5YZc= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=