Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,15 @@ type connProvider interface {
ClientConn() grpc.ClientConnInterface
}

func AdjustLocalConfigForRegistryBasedConfig(lc ocrtypes.LocalConfig) ocrtypes.LocalConfig {
// block confirmations are irrelevant when using registry-based config
// this also works with legacy config contracts, simply doesn't wait for extra confirmations
lc.SkipContractConfigConfirmations = true
// poll frequently to react to config changes quickly
lc.ContractConfigTrackerPollInterval = 5 * time.Second
return lc
Comment thread
cedric-cordenier marked this conversation as resolved.
Outdated
Comment thread
cedric-cordenier marked this conversation as resolved.
Outdated
}

func (d *Delegate) newServicesVaultPlugin(
ctx context.Context,
lggr logger.SugaredLogger,
Expand Down Expand Up @@ -754,6 +763,7 @@ func (d *Delegate) newServicesVaultPlugin(
if err != nil {
return nil, fmt.Errorf("failed to get config digester from OCRConfigService: %w", err)
}

lggr.Infow("Using dynamic OCR config from registry", "capabilityID", vaultCapabilityID, "ocrConfigKey", vaultOCRConfigKey)
Comment thread
cedric-cordenier marked this conversation as resolved.
}

Expand Down Expand Up @@ -848,6 +858,7 @@ func (d *Delegate) newServicesVaultPlugin(
if err != nil {
return nil, fmt.Errorf("failed to get DKG config digester from OCRConfigService: %w", err)
}
lc = AdjustLocalConfigForRegistryBasedConfig(lc)
lggr.Infow("Using dynamic OCR config from registry for DKG", "capabilityID", vaultCapabilityID, "ocrConfigKey", dkgOCRConfigKey)
}

Expand Down Expand Up @@ -969,6 +980,7 @@ func (d *Delegate) newDonTimePlugin(
if err != nil {
return nil, fmt.Errorf("failed to get config digester from OCRConfigService: %w", err)
}
lc = AdjustLocalConfigForRegistryBasedConfig(lc)
Comment thread
cedric-cordenier marked this conversation as resolved.
Outdated
lggr.Infow("Using dynamic OCR config from registry", "capabilityID", dontimeCapabilityID)
}

Expand Down
Loading