From 921a89ca6243d274062b2090458e6b40421242e9 Mon Sep 17 00:00:00 2001 From: ilija42 <57732589+ilija42@users.noreply.github.com> Date: Tue, 31 Oct 2023 20:14:02 +0100 Subject: [PATCH] BCF-2672 cleanup legacy job orm env var loading (#11119) * Remove unused DRSpecConfig param in LoadEnvConfigVarsVRF * Remove unused DirectRequestSpec MinIncomingConfirmationsEnv field * Remove unnecessary DRSpecConfig wrapper interface from job orm * Remove DirectRequestSpec MinIncomingConfirmations override from job orm MinIncomingConfirmations for DirectRequestSpec already gets overridden in delegate before its only usage * Remove DirectRequestSpec MinIncomingConfirmationsENV from graphql spec * Revert removal of DirectRequestSpec MinIncomingConfirmationsENV * Remove legacy chains from job orm - Remove LoadEnvConfigVarsOCR for ocr spec, because it gets called in delegate anyway - Remove legacy chains as it is no longer used in orm * Remove unused legacyChains from job_orm_test.go * Revert "Remove unused legacyChains from job_orm_test.go" This reverts commit dce7e3f5dc67fb924a204ecb5f1491a970786286. * Revert "Remove legacy chains from job orm" This reverts commit a41a48f74b11235a4e9519e691eab31e6bb6088d. * Rename legacy env var loading funcs in job orm and cleanup unused stuff * Remove unused legacy tramsnimtter address env * minor func rename * Update func signature in calls to LoadDefaultVRFPollPeriod * Remove EncryptedOCRKeyBundleIDEnv and ConfirmationsEnv --- core/services/directrequest/delegate.go | 2 +- core/services/job/models.go | 74 +++++++-------- core/services/job/orm.go | 62 ++++--------- core/services/job/orm_test.go | 32 +++---- core/services/ocr/config.go | 2 +- core/services/ocr/delegate.go | 2 +- core/services/vrf/v1/listener_v1.go | 2 +- core/services/vrf/v2/listener_v2.go | 2 +- core/web/presenters/job.go | 114 ++++++++++-------------- core/web/resolver/spec.go | 58 ------------ core/web/resolver/spec_test.go | 72 +++++---------- core/web/schema/type/spec.graphql | 10 --- 12 files changed, 140 insertions(+), 292 deletions(-) diff --git a/core/services/directrequest/delegate.go b/core/services/directrequest/delegate.go index 174dca062aa..920f94b4d60 100644 --- a/core/services/directrequest/delegate.go +++ b/core/services/directrequest/delegate.go @@ -77,7 +77,7 @@ func (d *Delegate) ServicesForSpec(jb job.Job) ([]job.ServiceCtx, error) { if err != nil { return nil, err } - concreteSpec := job.LoadEnvConfigVarsDR(chain.Config().EVM(), *jb.DirectRequestSpec) + concreteSpec := job.SetDRMinIncomingConfirmations(chain.Config().EVM().MinIncomingConfirmations(), *jb.DirectRequestSpec) oracle, err := operator_wrapper.NewOperator(concreteSpec.ContractAddress.Address(), chain.Client()) if err != nil { diff --git a/core/services/job/models.go b/core/services/job/models.go index a3dfce59996..a474040dd41 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -15,6 +15,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink/v2/core/assets" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" @@ -233,35 +234,25 @@ func (pr *PipelineRun) SetID(value string) error { // OCROracleSpec defines the job spec for OCR jobs. type OCROracleSpec struct { - ID int32 `toml:"-"` - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` - P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers" db:"p2p_bootstrap_peers"` - P2PV2Bootstrappers pq.StringArray `toml:"p2pv2Bootstrappers" db:"p2pv2_bootstrappers"` - IsBootstrapPeer bool `toml:"isBootstrapPeer"` - EncryptedOCRKeyBundleID *models.Sha256Hash `toml:"keyBundleID"` - EncryptedOCRKeyBundleIDEnv bool - TransmitterAddress *ethkey.EIP55Address `toml:"transmitterAddress"` - TransmitterAddressEnv bool - ObservationTimeout models.Interval `toml:"observationTimeout"` - ObservationTimeoutEnv bool - BlockchainTimeout models.Interval `toml:"blockchainTimeout"` - BlockchainTimeoutEnv bool - ContractConfigTrackerSubscribeInterval models.Interval `toml:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerSubscribeIntervalEnv bool - ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` - ContractConfigTrackerPollIntervalEnv bool - ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` - ContractConfigConfirmationsEnv bool - EVMChainID *utils.Big `toml:"evmChainID" db:"evm_chain_id"` - DatabaseTimeout *models.Interval `toml:"databaseTimeout"` - DatabaseTimeoutEnv bool - ObservationGracePeriod *models.Interval `toml:"observationGracePeriod"` - ObservationGracePeriodEnv bool - ContractTransmitterTransmitTimeout *models.Interval `toml:"contractTransmitterTransmitTimeout"` - ContractTransmitterTransmitTimeoutEnv bool - CaptureEATelemetry bool `toml:"captureEATelemetry"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + ID int32 `toml:"-"` + ContractAddress ethkey.EIP55Address `toml:"contractAddress"` + P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers" db:"p2p_bootstrap_peers"` + P2PV2Bootstrappers pq.StringArray `toml:"p2pv2Bootstrappers" db:"p2pv2_bootstrappers"` + IsBootstrapPeer bool `toml:"isBootstrapPeer"` + EncryptedOCRKeyBundleID *models.Sha256Hash `toml:"keyBundleID"` + TransmitterAddress *ethkey.EIP55Address `toml:"transmitterAddress"` + ObservationTimeout models.Interval `toml:"observationTimeout"` + BlockchainTimeout models.Interval `toml:"blockchainTimeout"` + ContractConfigTrackerSubscribeInterval models.Interval `toml:"contractConfigTrackerSubscribeInterval"` + ContractConfigTrackerPollInterval models.Interval `toml:"contractConfigTrackerPollInterval"` + ContractConfigConfirmations uint16 `toml:"contractConfigConfirmations"` + EVMChainID *utils.Big `toml:"evmChainID" db:"evm_chain_id"` + DatabaseTimeout *models.Interval `toml:"databaseTimeout"` + ObservationGracePeriod *models.Interval `toml:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *models.Interval `toml:"contractTransmitterTransmitTimeout"` + CaptureEATelemetry bool `toml:"captureEATelemetry"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } // GetID is a getter function that returns the ID of the spec. @@ -438,15 +429,14 @@ func (w *WebhookSpec) SetID(value string) error { } type DirectRequestSpec struct { - ID int32 `toml:"-"` - ContractAddress ethkey.EIP55Address `toml:"contractAddress"` - MinIncomingConfirmations clnull.Uint32 `toml:"minIncomingConfirmations"` - MinIncomingConfirmationsEnv bool `toml:"minIncomingConfirmationsEnv"` - Requesters models.AddressCollection `toml:"requesters"` - MinContractPayment *assets.Link `toml:"minContractPaymentLinkJuels"` - EVMChainID *utils.Big `toml:"evmChainID"` - CreatedAt time.Time `toml:"-"` - UpdatedAt time.Time `toml:"-"` + ID int32 `toml:"-"` + ContractAddress ethkey.EIP55Address `toml:"contractAddress"` + MinIncomingConfirmations clnull.Uint32 `toml:"minIncomingConfirmations"` + Requesters models.AddressCollection `toml:"requesters"` + MinContractPayment *assets.Link `toml:"minContractPaymentLinkJuels"` + EVMChainID *utils.Big `toml:"evmChainID"` + CreatedAt time.Time `toml:"-"` + UpdatedAt time.Time `toml:"-"` } type CronSpec struct { @@ -522,13 +512,11 @@ type VRFSpec struct { CoordinatorAddress ethkey.EIP55Address `toml:"coordinatorAddress"` PublicKey secp256k1.PublicKey `toml:"publicKey"` MinIncomingConfirmations uint32 `toml:"minIncomingConfirmations"` - ConfirmationsEnv bool `toml:"-"` EVMChainID *utils.Big `toml:"evmChainID"` FromAddresses []ethkey.EIP55Address `toml:"fromAddresses"` - PollPeriod time.Duration `toml:"pollPeriod"` // For v2 jobs - PollPeriodEnv bool - RequestedConfsDelay int64 `toml:"requestedConfsDelay"` // For v2 jobs. Optional, defaults to 0 if not provided. - RequestTimeout time.Duration `toml:"requestTimeout"` // Optional, defaults to 24hr if not provided. + PollPeriod time.Duration `toml:"pollPeriod"` // For v2 jobs + RequestedConfsDelay int64 `toml:"requestedConfsDelay"` // For v2 jobs. Optional, defaults to 0 if not provided. + RequestTimeout time.Duration `toml:"requestTimeout"` // Optional, defaults to 24hr if not provided. // GasLanePrice specifies the gas lane price for this VRF job. // If the specified keys in FromAddresses do not have the provided gas price the job diff --git a/core/services/job/orm.go b/core/services/job/orm.go index cbdd7ebfae6..372b2fe74a1 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -705,61 +705,41 @@ func (o *orm) FindJobs(offset, limit int) (jobs []Job, count int, err error) { return err } for i := range jobs { - err = multierr.Combine(err, o.LoadEnvConfigVars(&jobs[i])) + err = multierr.Combine(err, o.LoadConfigVars(&jobs[i])) } return nil }) return jobs, int(count), err } -func (o *orm) LoadEnvConfigVars(jb *Job) error { +func (o *orm) LoadConfigVars(jb *Job) error { if jb.OCROracleSpec != nil { ch, err := o.legacyChains.Get(jb.OCROracleSpec.EVMChainID.String()) if err != nil { return err } - newSpec, err := LoadEnvConfigVarsOCR(ch.Config().EVM().OCR(), ch.Config().OCR(), *jb.OCROracleSpec) + newSpec, err := LoadConfigVarsOCR(ch.Config().EVM().OCR(), ch.Config().OCR(), *jb.OCROracleSpec) if err != nil { return err } jb.OCROracleSpec = newSpec - } else if jb.VRFSpec != nil { - ch, err := o.legacyChains.Get(jb.VRFSpec.EVMChainID.String()) - if err != nil { - return err - } - jb.VRFSpec = LoadEnvConfigVarsVRF(ch.Config().EVM(), *jb.VRFSpec) - } else if jb.DirectRequestSpec != nil { - ch, err := o.legacyChains.Get(jb.DirectRequestSpec.EVMChainID.String()) - if err != nil { - return err - } - jb.DirectRequestSpec = LoadEnvConfigVarsDR(ch.Config().EVM(), *jb.DirectRequestSpec) } return nil } -type DRSpecConfig interface { - MinIncomingConfirmations() uint32 -} - -func LoadEnvConfigVarsVRF(cfg DRSpecConfig, vrfs VRFSpec) *VRFSpec { +func LoadDefaultVRFPollPeriod(vrfs VRFSpec) *VRFSpec { if vrfs.PollPeriod == 0 { - vrfs.PollPeriodEnv = true vrfs.PollPeriod = 5 * time.Second } return &vrfs } -func LoadEnvConfigVarsDR(cfg DRSpecConfig, drs DirectRequestSpec) *DirectRequestSpec { - // Take the largest of the global vs specific. - minIncomingConfirmations := cfg.MinIncomingConfirmations() - if !drs.MinIncomingConfirmations.Valid || drs.MinIncomingConfirmations.Uint32 < minIncomingConfirmations { - drs.MinIncomingConfirmationsEnv = true - drs.MinIncomingConfirmations = null.Uint32From(minIncomingConfirmations) +// SetDRMinIncomingConfirmations takes the largest of the global vs specific. +func SetDRMinIncomingConfirmations(defaultMinIncomingConfirmations uint32, drs DirectRequestSpec) *DirectRequestSpec { + if !drs.MinIncomingConfirmations.Valid || drs.MinIncomingConfirmations.Uint32 < defaultMinIncomingConfirmations { + drs.MinIncomingConfirmations = null.Uint32From(defaultMinIncomingConfirmations) } - return &drs } @@ -773,38 +753,30 @@ type OCRConfig interface { TransmitterAddress() (ethkey.EIP55Address, error) } -// LoadEnvConfigVarsLocalOCR loads local OCR env vars into the OCROracleSpec. -func LoadEnvConfigVarsLocalOCR(evmOcrCfg evmconfig.OCR, os OCROracleSpec, ocrCfg OCRConfig) *OCROracleSpec { +// LoadConfigVarsLocalOCR loads local OCR vars into the OCROracleSpec. +func LoadConfigVarsLocalOCR(evmOcrCfg evmconfig.OCR, os OCROracleSpec, ocrCfg OCRConfig) *OCROracleSpec { if os.ObservationTimeout == 0 { - os.ObservationTimeoutEnv = true os.ObservationTimeout = models.Interval(ocrCfg.ObservationTimeout()) } if os.BlockchainTimeout == 0 { - os.BlockchainTimeoutEnv = true os.BlockchainTimeout = models.Interval(ocrCfg.BlockchainTimeout()) } if os.ContractConfigTrackerSubscribeInterval == 0 { - os.ContractConfigTrackerSubscribeIntervalEnv = true os.ContractConfigTrackerSubscribeInterval = models.Interval(ocrCfg.ContractSubscribeInterval()) } if os.ContractConfigTrackerPollInterval == 0 { - os.ContractConfigTrackerPollIntervalEnv = true os.ContractConfigTrackerPollInterval = models.Interval(ocrCfg.ContractPollInterval()) } if os.ContractConfigConfirmations == 0 { - os.ContractConfigConfirmationsEnv = true os.ContractConfigConfirmations = evmOcrCfg.ContractConfirmations() } if os.DatabaseTimeout == nil { - os.DatabaseTimeoutEnv = true os.DatabaseTimeout = models.NewInterval(evmOcrCfg.DatabaseTimeout()) } if os.ObservationGracePeriod == nil { - os.ObservationGracePeriodEnv = true os.ObservationGracePeriod = models.NewInterval(evmOcrCfg.ObservationGracePeriod()) } if os.ContractTransmitterTransmitTimeout == nil { - os.ContractTransmitterTransmitTimeoutEnv = true os.ContractTransmitterTransmitTimeout = models.NewInterval(evmOcrCfg.ContractTransmitterTransmitTimeout()) } os.CaptureEATelemetry = ocrCfg.CaptureEATelemetry() @@ -812,15 +784,14 @@ func LoadEnvConfigVarsLocalOCR(evmOcrCfg evmconfig.OCR, os OCROracleSpec, ocrCfg return &os } -// LoadEnvConfigVarsOCR loads OCR env vars into the OCROracleSpec. -func LoadEnvConfigVarsOCR(evmOcrCfg evmconfig.OCR, ocrCfg OCRConfig, os OCROracleSpec) (*OCROracleSpec, error) { +// LoadConfigVarsOCR loads OCR config vars into the OCROracleSpec. +func LoadConfigVarsOCR(evmOcrCfg evmconfig.OCR, ocrCfg OCRConfig, os OCROracleSpec) (*OCROracleSpec, error) { if os.TransmitterAddress == nil { ta, err := ocrCfg.TransmitterAddress() if !errors.Is(errors.Cause(err), config.ErrEnvUnset) { if err != nil { return nil, err } - os.TransmitterAddressEnv = true os.TransmitterAddress = &ta } } @@ -834,11 +805,10 @@ func LoadEnvConfigVarsOCR(evmOcrCfg evmconfig.OCR, ocrCfg OCRConfig, os OCROracl if err != nil { return nil, err } - os.EncryptedOCRKeyBundleIDEnv = true os.EncryptedOCRKeyBundleID = &encryptedOCRKeyBundleID } - return LoadEnvConfigVarsLocalOCR(evmOcrCfg, os, ocrCfg), nil + return LoadConfigVarsLocalOCR(evmOcrCfg, os, ocrCfg), nil } func (o *orm) FindJobTx(id int32) (Job, error) { @@ -872,7 +842,7 @@ func (o *orm) FindJobWithoutSpecErrors(id int32) (jb Job, err error) { return jb, errors.Wrap(err, "FindJobWithoutSpecErrors failed") } - return jb, o.LoadEnvConfigVars(&jb) + return jb, o.LoadConfigVars(&jb) } // FindSpecErrorsByJobIDs returns all jobs spec errors by jobs IDs @@ -961,7 +931,7 @@ func (o *orm) findJob(jb *Job, col string, arg interface{}, qopts ...pg.QOpt) er if err != nil { return errors.Wrap(err, "findJob failed") } - return o.LoadEnvConfigVars(jb) + return o.LoadConfigVars(jb) } func (o *orm) FindJobIDsWithBridge(name string) (jids []int32, err error) { @@ -1205,7 +1175,7 @@ func (o *orm) FindJobsByPipelineSpecIDs(ids []int32) ([]Job, error) { return err } for i := range jbs { - err = o.LoadEnvConfigVars(&jbs[i]) + err = o.LoadConfigVars(&jbs[i]) //We must return the jobs even if the chainID is disabled if err != nil && !errors.Is(err, chains.ErrNoSuchChainID) { return err diff --git a/core/services/job/orm_test.go b/core/services/job/orm_test.go index a6986d7fb32..cd437147b4f 100644 --- a/core/services/job/orm_test.go +++ b/core/services/job/orm_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func NewTestORM(t *testing.T, db *sqlx.DB, legacyChains evm.LegacyChainContainer, pipelineORM pipeline.ORM, bridgeORM bridges.ORM, keyStore keystore.Master, cfg pg.QConfig) job.ORM { @@ -27,26 +28,28 @@ func NewTestORM(t *testing.T, db *sqlx.DB, legacyChains evm.LegacyChainContainer return o } -func TestLoadEnvConfigVarsLocalOCR(t *testing.T) { +func TestLoadConfigVarsLocalOCR(t *testing.T) { t.Parallel() config := configtest.NewTestGeneralConfig(t) chainConfig := evmtest.NewChainScopedConfig(t, config) jobSpec := &job.OCROracleSpec{} - jobSpec = job.LoadEnvConfigVarsLocalOCR(chainConfig.EVM().OCR(), *jobSpec, chainConfig.OCR()) + jobSpec = job.LoadConfigVarsLocalOCR(chainConfig.EVM().OCR(), *jobSpec, chainConfig.OCR()) - require.True(t, jobSpec.ObservationTimeoutEnv) - require.True(t, jobSpec.BlockchainTimeoutEnv) - require.True(t, jobSpec.ContractConfigTrackerSubscribeIntervalEnv) - require.True(t, jobSpec.ContractConfigTrackerPollIntervalEnv) - require.True(t, jobSpec.ContractConfigConfirmationsEnv) - require.True(t, jobSpec.DatabaseTimeoutEnv) - require.True(t, jobSpec.ObservationGracePeriodEnv) - require.True(t, jobSpec.ContractTransmitterTransmitTimeoutEnv) + require.Equal(t, models.Interval(chainConfig.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) + require.Equal(t, models.Interval(chainConfig.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) + require.Equal(t, models.Interval(chainConfig.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) + require.Equal(t, models.Interval(chainConfig.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) + require.Equal(t, chainConfig.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) } -func TestLoadEnvConfigVarsDR(t *testing.T) { +func TestSetDRMinIncomingConfirmations(t *testing.T) { t.Parallel() config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -59,15 +62,14 @@ func TestLoadEnvConfigVarsDR(t *testing.T) { MinIncomingConfirmations: clnull.Uint32From(10), } - drs10 := job.LoadEnvConfigVarsDR(chainConfig.EVM(), jobSpec10) - assert.True(t, drs10.MinIncomingConfirmationsEnv) + drs10 := job.SetDRMinIncomingConfirmations(chainConfig.EVM().MinIncomingConfirmations(), jobSpec10) + assert.Equal(t, uint32(100), drs10.MinIncomingConfirmations.Uint32) jobSpec200 := job.DirectRequestSpec{ MinIncomingConfirmations: clnull.Uint32From(200), } - drs200 := job.LoadEnvConfigVarsDR(chainConfig.EVM(), jobSpec200) - assert.False(t, drs200.MinIncomingConfirmationsEnv) + drs200 := job.SetDRMinIncomingConfirmations(chainConfig.EVM().MinIncomingConfirmations(), jobSpec200) assert.True(t, drs200.MinIncomingConfirmations.Valid) assert.Equal(t, uint32(200), drs200.MinIncomingConfirmations.Uint32) } diff --git a/core/services/ocr/config.go b/core/services/ocr/config.go index e1bc997f269..53ec9f9cea9 100644 --- a/core/services/ocr/config.go +++ b/core/services/ocr/config.go @@ -14,7 +14,7 @@ type Config interface { } func toLocalConfig(cfg ValidationConfig, evmOcrConfig evmconfig.OCR, insecureCfg insecureConfig, spec job.OCROracleSpec, ocrConfig job.OCRConfig) ocrtypes.LocalConfig { - concreteSpec := job.LoadEnvConfigVarsLocalOCR(evmOcrConfig, spec, ocrConfig) + concreteSpec := job.LoadConfigVarsLocalOCR(evmOcrConfig, spec, ocrConfig) lc := ocrtypes.LocalConfig{ BlockchainTimeout: concreteSpec.BlockchainTimeout.Duration(), ContractConfigConfirmations: concreteSpec.ContractConfigConfirmations, diff --git a/core/services/ocr/delegate.go b/core/services/ocr/delegate.go index dee349a9a0d..b761690485c 100644 --- a/core/services/ocr/delegate.go +++ b/core/services/ocr/delegate.go @@ -95,7 +95,7 @@ func (d *Delegate) ServicesForSpec(jb job.Job) (services []job.ServiceCtx, err e if err != nil { return nil, err } - concreteSpec, err := job.LoadEnvConfigVarsOCR(chain.Config().EVM().OCR(), chain.Config().OCR(), *jb.OCROracleSpec) + concreteSpec, err := job.LoadConfigVarsOCR(chain.Config().EVM().OCR(), chain.Config().OCR(), *jb.OCROracleSpec) if err != nil { return nil, err } diff --git a/core/services/vrf/v1/listener_v1.go b/core/services/vrf/v1/listener_v1.go index 613c0d124df..92e697f2294 100644 --- a/core/services/vrf/v1/listener_v1.go +++ b/core/services/vrf/v1/listener_v1.go @@ -112,7 +112,7 @@ func (lsn *Listener) getLatestHead() uint64 { // Start complies with job.Service func (lsn *Listener) Start(context.Context) error { return lsn.StartOnce("VRFListener", func() error { - spec := job.LoadEnvConfigVarsVRF(lsn.Cfg, *lsn.Job.VRFSpec) + spec := job.LoadDefaultVRFPollPeriod(*lsn.Job.VRFSpec) unsubscribeLogs := lsn.LogBroadcaster.Register(lsn, log.ListenerOpts{ Contract: lsn.Coordinator.Address(), diff --git a/core/services/vrf/v2/listener_v2.go b/core/services/vrf/v2/listener_v2.go index 7560baad3a2..8bac485d656 100644 --- a/core/services/vrf/v2/listener_v2.go +++ b/core/services/vrf/v2/listener_v2.go @@ -271,7 +271,7 @@ func (lsn *listenerV2) Start(ctx context.Context) error { "proofVerificationGas", GasProofVerification) } - spec := job.LoadEnvConfigVarsVRF(lsn.cfg, *lsn.job.VRFSpec) + spec := job.LoadDefaultVRFPollPeriod(*lsn.job.VRFSpec) unsubscribeLogs := lsn.logBroadcaster.Register(lsn, log.ListenerOpts{ Contract: lsn.coordinator.Address(), diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index 2aa97730881..06b9950755f 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -41,26 +41,24 @@ const ( // DirectRequestSpec defines the spec details of a DirectRequest Job type DirectRequestSpec struct { - ContractAddress ethkey.EIP55Address `json:"contractAddress"` - MinIncomingConfirmations clnull.Uint32 `json:"minIncomingConfirmations"` - MinIncomingConfirmationsEnv bool `json:"minIncomingConfirmationsEnv,omitempty"` - MinContractPayment *assets.Link `json:"minContractPaymentLinkJuels"` - Requesters models.AddressCollection `json:"requesters"` - Initiator string `json:"initiator"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *utils.Big `json:"evmChainID"` + ContractAddress ethkey.EIP55Address `json:"contractAddress"` + MinIncomingConfirmations clnull.Uint32 `json:"minIncomingConfirmations"` + MinContractPayment *assets.Link `json:"minContractPaymentLinkJuels"` + Requesters models.AddressCollection `json:"requesters"` + Initiator string `json:"initiator"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *utils.Big `json:"evmChainID"` } // NewDirectRequestSpec initializes a new DirectRequestSpec from a // job.DirectRequestSpec func NewDirectRequestSpec(spec *job.DirectRequestSpec) *DirectRequestSpec { return &DirectRequestSpec{ - ContractAddress: spec.ContractAddress, - MinIncomingConfirmations: spec.MinIncomingConfirmations, - MinIncomingConfirmationsEnv: spec.MinIncomingConfirmationsEnv, - MinContractPayment: spec.MinContractPayment, - Requesters: spec.Requesters, + ContractAddress: spec.ContractAddress, + MinIncomingConfirmations: spec.MinIncomingConfirmations, + MinContractPayment: spec.MinContractPayment, + Requesters: spec.Requesters, // This is hardcoded to runlog. When we support other initiators, we need // to change this Initiator: "runlog", @@ -120,64 +118,48 @@ func NewFluxMonitorSpec(spec *job.FluxMonitorSpec) *FluxMonitorSpec { // OffChainReportingSpec defines the spec details of a OffChainReporting Job type OffChainReportingSpec struct { - ContractAddress ethkey.EIP55Address `json:"contractAddress"` - P2PBootstrapPeers pq.StringArray `json:"p2pBootstrapPeers"` - P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` - IsBootstrapPeer bool `json:"isBootstrapPeer"` - EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` - TransmitterAddress *ethkey.EIP55Address `json:"transmitterAddress"` - ObservationTimeout models.Interval `json:"observationTimeout"` - ObservationTimeoutEnv bool `json:"observationTimeoutEnv,omitempty"` - BlockchainTimeout models.Interval `json:"blockchainTimeout"` - BlockchainTimeoutEnv bool `json:"blockchainTimeoutEnv,omitempty"` - ContractConfigTrackerSubscribeInterval models.Interval `json:"contractConfigTrackerSubscribeInterval"` - ContractConfigTrackerSubscribeIntervalEnv bool `json:"contractConfigTrackerSubscribeIntervalEnv,omitempty"` - ContractConfigTrackerPollInterval models.Interval `json:"contractConfigTrackerPollInterval"` - ContractConfigTrackerPollIntervalEnv bool `json:"contractConfigTrackerPollIntervalEnv,omitempty"` - ContractConfigConfirmations uint16 `json:"contractConfigConfirmations"` - ContractConfigConfirmationsEnv bool `json:"contractConfigConfirmationsEnv,omitempty"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - EVMChainID *utils.Big `json:"evmChainID"` - DatabaseTimeout *models.Interval `json:"databaseTimeout"` - DatabaseTimeoutEnv bool `json:"databaseTimeoutEnv,omitempty"` - ObservationGracePeriod *models.Interval `json:"observationGracePeriod"` - ObservationGracePeriodEnv bool `json:"observationGracePeriodEnv,omitempty"` - ContractTransmitterTransmitTimeout *models.Interval `json:"contractTransmitterTransmitTimeout"` - ContractTransmitterTransmitTimeoutEnv bool `json:"contractTransmitterTransmitTimeoutEnv,omitempty"` - CollectTelemetry bool `json:"collectTelemetry,omitempty"` + ContractAddress ethkey.EIP55Address `json:"contractAddress"` + P2PBootstrapPeers pq.StringArray `json:"p2pBootstrapPeers"` + P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` + IsBootstrapPeer bool `json:"isBootstrapPeer"` + EncryptedOCRKeyBundleID *models.Sha256Hash `json:"keyBundleID"` + TransmitterAddress *ethkey.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 *utils.Big `json:"evmChainID"` + DatabaseTimeout *models.Interval `json:"databaseTimeout"` + ObservationGracePeriod *models.Interval `json:"observationGracePeriod"` + ContractTransmitterTransmitTimeout *models.Interval `json:"contractTransmitterTransmitTimeout"` + CollectTelemetry bool `json:"collectTelemetry,omitempty"` } // NewOffChainReportingSpec initializes a new OffChainReportingSpec from a // job.OCROracleSpec func NewOffChainReportingSpec(spec *job.OCROracleSpec) *OffChainReportingSpec { return &OffChainReportingSpec{ - ContractAddress: spec.ContractAddress, - P2PBootstrapPeers: spec.P2PBootstrapPeers, - P2PV2Bootstrappers: spec.P2PV2Bootstrappers, - IsBootstrapPeer: spec.IsBootstrapPeer, - EncryptedOCRKeyBundleID: spec.EncryptedOCRKeyBundleID, - TransmitterAddress: spec.TransmitterAddress, - ObservationTimeout: spec.ObservationTimeout, - ObservationTimeoutEnv: spec.ObservationTimeoutEnv, - BlockchainTimeout: spec.BlockchainTimeout, - BlockchainTimeoutEnv: spec.BlockchainTimeoutEnv, - ContractConfigTrackerSubscribeInterval: spec.ContractConfigTrackerSubscribeInterval, - ContractConfigTrackerSubscribeIntervalEnv: spec.ContractConfigTrackerSubscribeIntervalEnv, - ContractConfigTrackerPollInterval: spec.ContractConfigTrackerPollInterval, - ContractConfigTrackerPollIntervalEnv: spec.ContractConfigTrackerPollIntervalEnv, - ContractConfigConfirmations: spec.ContractConfigConfirmations, - ContractConfigConfirmationsEnv: spec.ContractConfigConfirmationsEnv, - CreatedAt: spec.CreatedAt, - UpdatedAt: spec.UpdatedAt, - EVMChainID: spec.EVMChainID, - DatabaseTimeout: spec.DatabaseTimeout, - DatabaseTimeoutEnv: spec.DatabaseTimeoutEnv, - ObservationGracePeriod: spec.ObservationGracePeriod, - ObservationGracePeriodEnv: spec.ObservationGracePeriodEnv, - ContractTransmitterTransmitTimeout: spec.ContractTransmitterTransmitTimeout, - ContractTransmitterTransmitTimeoutEnv: spec.ContractTransmitterTransmitTimeoutEnv, - CollectTelemetry: spec.CaptureEATelemetry, + ContractAddress: spec.ContractAddress, + P2PBootstrapPeers: spec.P2PBootstrapPeers, + P2PV2Bootstrappers: spec.P2PV2Bootstrappers, + IsBootstrapPeer: spec.IsBootstrapPeer, + EncryptedOCRKeyBundleID: spec.EncryptedOCRKeyBundleID, + TransmitterAddress: spec.TransmitterAddress, + ObservationTimeout: spec.ObservationTimeout, + BlockchainTimeout: spec.BlockchainTimeout, + ContractConfigTrackerSubscribeInterval: spec.ContractConfigTrackerSubscribeInterval, + ContractConfigTrackerPollInterval: spec.ContractConfigTrackerPollInterval, + ContractConfigConfirmations: spec.ContractConfigConfirmations, + CreatedAt: spec.CreatedAt, + UpdatedAt: spec.UpdatedAt, + EVMChainID: spec.EVMChainID, + DatabaseTimeout: spec.DatabaseTimeout, + ObservationGracePeriod: spec.ObservationGracePeriod, + ContractTransmitterTransmitTimeout: spec.ContractTransmitterTransmitTimeout, + CollectTelemetry: spec.CaptureEATelemetry, } } diff --git a/core/web/resolver/spec.go b/core/web/resolver/spec.go index 48040d118a7..c9ee5199229 100644 --- a/core/web/resolver/spec.go +++ b/core/web/resolver/spec.go @@ -164,11 +164,6 @@ func (r *DirectRequestSpecResolver) MinIncomingConfirmations() int32 { return 0 } -// EVMChainID resolves the spec's evm chain id. -func (r *DirectRequestSpecResolver) MinIncomingConfirmationsEnv() bool { - return r.spec.MinIncomingConfirmationsEnv -} - // MinContractPaymentLinkJuels resolves the spec's min contract payment link. func (r *DirectRequestSpecResolver) MinContractPaymentLinkJuels() string { return r.spec.MinContractPayment.String() @@ -328,12 +323,6 @@ func (r *OCRSpecResolver) BlockchainTimeout() *string { return &timeout } -// BlockchainTimeoutEnv resolves whether the spec's blockchain timeout comes -// from an env var. -func (r *OCRSpecResolver) BlockchainTimeoutEnv() bool { - return r.spec.BlockchainTimeoutEnv -} - // ContractAddress resolves the spec's contract address. func (r *OCRSpecResolver) ContractAddress() string { return r.spec.ContractAddress.String() @@ -350,12 +339,6 @@ func (r *OCRSpecResolver) ContractConfigConfirmations() *int32 { return &confirmations } -// ContractConfigConfirmationsEnv resolves whether spec's confirmations -// config comes from an env var. -func (r *OCRSpecResolver) ContractConfigConfirmationsEnv() bool { - return r.spec.ContractConfigConfirmationsEnv -} - // ContractConfigTrackerPollInterval resolves the spec's contract tracker poll // interval config. func (r *OCRSpecResolver) ContractConfigTrackerPollInterval() *string { @@ -368,12 +351,6 @@ func (r *OCRSpecResolver) ContractConfigTrackerPollInterval() *string { return &interval } -// ContractConfigTrackerPollIntervalEnv resolves the whether spec's tracker poll -// config comes from an env var. -func (r *OCRSpecResolver) ContractConfigTrackerPollIntervalEnv() bool { - return r.spec.ContractConfigTrackerPollIntervalEnv -} - // ContractConfigTrackerSubscribeInterval resolves the spec's tracker subscribe // interval config. func (r *OCRSpecResolver) ContractConfigTrackerSubscribeInterval() *string { @@ -386,12 +363,6 @@ func (r *OCRSpecResolver) ContractConfigTrackerSubscribeInterval() *string { return &interval } -// ContractConfigTrackerSubscribeIntervalEnv resolves whether spec's tracker -// subscribe interval config comes from an env var. -func (r *OCRSpecResolver) ContractConfigTrackerSubscribeIntervalEnv() bool { - return r.spec.ContractConfigTrackerSubscribeIntervalEnv -} - // CreatedAt resolves the spec's created at timestamp. func (r *OCRSpecResolver) CreatedAt() graphql.Time { return graphql.Time{Time: r.spec.CreatedAt} @@ -413,34 +384,16 @@ func (r *OCRSpecResolver) DatabaseTimeout() string { return r.spec.DatabaseTimeout.Duration().String() } -// DatabaseTimeoutEnv resolves the whether spec's database timeout -// config comes from an env var. -func (r *OCRSpecResolver) DatabaseTimeoutEnv() bool { - return r.spec.DatabaseTimeoutEnv -} - // ObservationGracePeriod resolves the spec's observation grace period. func (r *OCRSpecResolver) ObservationGracePeriod() string { return r.spec.ObservationGracePeriod.Duration().String() } -// ObservationGracePeriodEnv resolves the whether spec's observation grace period -// config comes from an env var. -func (r *OCRSpecResolver) ObservationGracePeriodEnv() bool { - return r.spec.ObservationGracePeriodEnv -} - // ContractTransmitterTransmitTimeout resolves the spec's contract transmitter transmit timeout. func (r *OCRSpecResolver) ContractTransmitterTransmitTimeout() string { return r.spec.ContractTransmitterTransmitTimeout.Duration().String() } -// ContractTransmitterTransmitTimeoutEnv resolves the whether spec's -// contract transmitter transmit timeout config comes from an env var. -func (r *OCRSpecResolver) ContractTransmitterTransmitTimeoutEnv() bool { - return r.spec.ContractTransmitterTransmitTimeoutEnv -} - // IsBootstrapPeer resolves whether spec is a bootstrap peer. func (r *OCRSpecResolver) IsBootstrapPeer() bool { return r.spec.IsBootstrapPeer @@ -468,12 +421,6 @@ func (r *OCRSpecResolver) ObservationTimeout() *string { return &timeout } -// ObservationTimeoutEnv resolves whether spec's observation timeout comes -// from an env var. -func (r *OCRSpecResolver) ObservationTimeoutEnv() bool { - return r.spec.ObservationTimeoutEnv -} - // P2PBootstrapPeers resolves the spec's p2p bootstrap peers func (r *OCRSpecResolver) P2PBootstrapPeers() *[]string { if len(r.spec.P2PBootstrapPeers) == 0 { @@ -631,11 +578,6 @@ func (r *VRFSpecResolver) MinIncomingConfirmations() int32 { return int32(r.spec.MinIncomingConfirmations) } -// MinIncomingConfirmations resolves the spec's min incoming confirmations. -func (r *VRFSpecResolver) MinIncomingConfirmationsEnv() bool { - return r.spec.ConfirmationsEnv -} - // CoordinatorAddress resolves the spec's coordinator address. func (r *VRFSpecResolver) CoordinatorAddress() string { return r.spec.CoordinatorAddress.String() diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 04bfffbe05e..8e4095e171e 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -10,6 +10,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-relay/pkg/types" + "github.com/smartcontractkit/chainlink/v2/core/assets" clnull "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -91,13 +92,12 @@ func TestResolver_DirectRequestSpec(t *testing.T) { f.Mocks.jobORM.On("FindJobWithoutSpecErrors", id).Return(job.Job{ Type: job.DirectRequest, DirectRequestSpec: &job.DirectRequestSpec{ - ContractAddress: contractAddress, - CreatedAt: f.Timestamp(), - EVMChainID: utils.NewBigI(42), - MinIncomingConfirmations: clnull.NewUint32(1, true), - MinIncomingConfirmationsEnv: true, - MinContractPayment: assets.NewLinkFromJuels(1000), - Requesters: models.AddressCollection{requesterAddress}, + ContractAddress: contractAddress, + CreatedAt: f.Timestamp(), + EVMChainID: utils.NewBigI(42), + MinIncomingConfirmations: clnull.NewUint32(1, true), + MinContractPayment: assets.NewLinkFromJuels(1000), + Requesters: models.AddressCollection{requesterAddress}, }, }, nil) }, @@ -112,7 +112,6 @@ func TestResolver_DirectRequestSpec(t *testing.T) { createdAt evmChainID minIncomingConfirmations - minIncomingConfirmationsEnv minContractPaymentLinkJuels requesters } @@ -130,7 +129,6 @@ func TestResolver_DirectRequestSpec(t *testing.T) { "createdAt": "2021-01-01T00:00:00Z", "evmChainID": "42", "minIncomingConfirmations": 1, - "minIncomingConfirmationsEnv": true, "minContractPaymentLinkJuels": "1000", "requesters": ["0x3cCad4715152693fE3BC4460591e3D3Fbd071b42"] } @@ -373,30 +371,22 @@ func TestResolver_OCRSpec(t *testing.T) { f.Mocks.jobORM.On("FindJobWithoutSpecErrors", id).Return(job.Job{ Type: job.OffchainReporting, OCROracleSpec: &job.OCROracleSpec{ - BlockchainTimeout: models.Interval(1 * time.Minute), - BlockchainTimeoutEnv: false, - ContractAddress: contractAddress, - ContractConfigConfirmations: 1, - ContractConfigConfirmationsEnv: true, - ContractConfigTrackerPollInterval: models.Interval(1 * time.Minute), - ContractConfigTrackerPollIntervalEnv: false, - ContractConfigTrackerSubscribeInterval: models.Interval(2 * time.Minute), - ContractConfigTrackerSubscribeIntervalEnv: true, - DatabaseTimeout: models.NewInterval(3 * time.Second), - DatabaseTimeoutEnv: true, - ObservationGracePeriod: models.NewInterval(4 * time.Second), - ObservationGracePeriodEnv: true, - ContractTransmitterTransmitTimeout: models.NewInterval(555 * time.Millisecond), - ContractTransmitterTransmitTimeoutEnv: true, - CreatedAt: f.Timestamp(), - EVMChainID: utils.NewBigI(42), - IsBootstrapPeer: false, - EncryptedOCRKeyBundleID: &keyBundleID, - ObservationTimeout: models.Interval(2 * time.Minute), - ObservationTimeoutEnv: false, - P2PBootstrapPeers: pq.StringArray{"/dns4/test.com/tcp/2001/p2pkey"}, - P2PV2Bootstrappers: pq.StringArray{"12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw@localhost:5001"}, - TransmitterAddress: &transmitterAddress, + BlockchainTimeout: models.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), + CreatedAt: f.Timestamp(), + EVMChainID: utils.NewBigI(42), + IsBootstrapPeer: false, + EncryptedOCRKeyBundleID: &keyBundleID, + ObservationTimeout: models.Interval(2 * time.Minute), + P2PBootstrapPeers: pq.StringArray{"/dns4/test.com/tcp/2001/p2pkey"}, + P2PV2Bootstrappers: pq.StringArray{"12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw@localhost:5001"}, + TransmitterAddress: &transmitterAddress, }, }, nil) }, @@ -408,26 +398,18 @@ func TestResolver_OCRSpec(t *testing.T) { __typename ... on OCRSpec { blockchainTimeout - blockchainTimeoutEnv contractAddress contractConfigConfirmations - contractConfigConfirmationsEnv contractConfigTrackerPollInterval - contractConfigTrackerPollIntervalEnv contractConfigTrackerSubscribeInterval - contractConfigTrackerSubscribeIntervalEnv databaseTimeout - databaseTimeoutEnv observationGracePeriod - observationGracePeriodEnv contractTransmitterTransmitTimeout - contractTransmitterTransmitTimeoutEnv createdAt evmChainID isBootstrapPeer keyBundleID observationTimeout - observationTimeoutEnv p2pBootstrapPeers p2pv2Bootstrappers transmitterAddress @@ -443,26 +425,18 @@ func TestResolver_OCRSpec(t *testing.T) { "spec": { "__typename": "OCRSpec", "blockchainTimeout": "1m0s", - "blockchainTimeoutEnv": false, "contractAddress": "0x613a38AC1659769640aaE063C651F48E0250454C", "contractConfigConfirmations": 1, - "contractConfigConfirmationsEnv": true, "contractConfigTrackerPollInterval": "1m0s", - "contractConfigTrackerPollIntervalEnv": false, "contractConfigTrackerSubscribeInterval": "2m0s", - "contractConfigTrackerSubscribeIntervalEnv": true, "databaseTimeout": "3s", - "databaseTimeoutEnv": true, "observationGracePeriod": "4s", - "observationGracePeriodEnv": true, "contractTransmitterTransmitTimeout": "555ms", - "contractTransmitterTransmitTimeoutEnv": true, "createdAt": "2021-01-01T00:00:00Z", "evmChainID": "42", "isBootstrapPeer": false, "keyBundleID": "f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5", "observationTimeout": "2m0s", - "observationTimeoutEnv": false, "p2pBootstrapPeers": ["/dns4/test.com/tcp/2001/p2pkey"], "p2pv2Bootstrappers": ["12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw@localhost:5001"], "transmitterAddress": "0x3cCad4715152693fE3BC4460591e3D3Fbd071b42" diff --git a/core/web/schema/type/spec.graphql b/core/web/schema/type/spec.graphql index cdcbabf9ef0..98203a1870e 100644 --- a/core/web/schema/type/spec.graphql +++ b/core/web/schema/type/spec.graphql @@ -22,7 +22,6 @@ type DirectRequestSpec { createdAt: Time! evmChainID: String minIncomingConfirmations: Int! - minIncomingConfirmationsEnv: Boolean! minContractPaymentLinkJuels: String! requesters: [String!] } @@ -52,29 +51,21 @@ type KeeperSpec { type OCRSpec { blockchainTimeout: String - blockchainTimeoutEnv: Boolean! contractAddress: String! contractConfigConfirmations: Int - contractConfigConfirmationsEnv: Boolean! contractConfigTrackerPollInterval: String - contractConfigTrackerPollIntervalEnv: Boolean! contractConfigTrackerSubscribeInterval: String - contractConfigTrackerSubscribeIntervalEnv: Boolean! createdAt: Time! evmChainID: String isBootstrapPeer: Boolean! keyBundleID: String observationTimeout: String - observationTimeoutEnv: Boolean! p2pBootstrapPeers: [String!] p2pv2Bootstrappers: [String!] transmitterAddress: String databaseTimeout: String! - databaseTimeoutEnv: Boolean! observationGracePeriod: String! - observationGracePeriodEnv: Boolean! contractTransmitterTransmitTimeout: String! - contractTransmitterTransmitTimeoutEnv: Boolean! } type OCR2Spec { @@ -100,7 +91,6 @@ type VRFSpec { evmChainID: String fromAddresses: [String!] minIncomingConfirmations: Int! - minIncomingConfirmationsEnv: Boolean! pollPeriod: String! publicKey: String! requestedConfsDelay: Int!