Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llo blue green config fixes and suppressed legacy mercury jobs #15782

Merged
merged 3 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions core/services/llo/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ type DelegateConfig struct {
// One Oracle will be started for each ContractConfigTracker
ContractConfigTrackers []ocr2types.ContractConfigTracker
ContractTransmitter ocr3types.ContractTransmitter[llotypes.ReportInfo]
Database ocr3types.Database
OCR3MonitoringEndpoint ocrcommontypes.MonitoringEndpoint
OffchainConfigDigester ocr2types.OffchainConfigDigester
OffchainKeyring ocr2types.OffchainKeyring
OnchainKeyring ocr3types.OnchainKeyring[llotypes.ReportInfo]
LocalConfig ocr2types.LocalConfig
NewOCR3DB func(pluginID int32) ocr3types.Database
}

func NewDelegate(cfg DelegateConfig) (job.ServiceCtx, error) {
Expand Down Expand Up @@ -146,7 +146,7 @@ func (d *delegate) Start(ctx context.Context) error {
V2Bootstrappers: d.cfg.V2Bootstrappers,
ContractConfigTracker: configTracker,
ContractTransmitter: d.cfg.ContractTransmitter,
Database: d.cfg.Database,
Database: d.cfg.NewOCR3DB(int32(i)), // //nolint:gosec // G115 // impossible due to check on line 119
LocalConfig: d.cfg.LocalConfig,
Logger: ocrLogger,
MonitoringEndpoint: d.cfg.OCR3MonitoringEndpoint,
Expand Down
7 changes: 5 additions & 2 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,8 @@ func (d *Delegate) newServicesMercury(

lc.ContractConfigTrackerPollInterval = 1 * time.Second // This is the fastest that libocr supports. See: https://github.com/smartcontractkit/offchain-reporting/pull/520

ocrLogger := ocrcommon.NewOCRWrapper(lggr, d.cfg.OCR2().TraceLogging(), func(ctx context.Context, msg string) {
// Disable OCR debug+info logging for legacy mercury jobs unless tracelogging is enabled, because its simply too verbose (150 jobs => ~50k logs per second)
ocrLogger := ocrcommon.NewOCRWrapper(llo.NewSuppressedLogger(lggr, d.cfg.OCR2().TraceLogging()), d.cfg.OCR2().TraceLogging(), func(ctx context.Context, msg string) {
lggr.ErrorIf(d.jobORM.RecordError(ctx, jb.ID, msg), "unable to record error")
})

Expand Down Expand Up @@ -1055,7 +1056,6 @@ func (d *Delegate) newServicesLLO(
V2Bootstrappers: bootstrapPeers,
ContractTransmitter: provider.ContractTransmitter(),
ContractConfigTrackers: provider.ContractConfigTrackers(),
Database: ocrDB,
LocalConfig: lc,
OCR3MonitoringEndpoint: d.monitoringEndpointGen.GenMonitoringEndpoint(rid.Network, rid.ChainID, telemetryContractID, synchronization.OCR3Mercury),
OffchainConfigDigester: provider.OffchainConfigDigester(),
Expand All @@ -1064,6 +1064,9 @@ func (d *Delegate) newServicesLLO(

// Enable verbose logging if either Mercury.VerboseLogging is on or OCR2.TraceLogging is on
ReportingPluginConfig: datastreamsllo.Config{VerboseLogging: d.cfg.Mercury().VerboseLogging() || d.cfg.OCR2().TraceLogging()},
NewOCR3DB: func(pluginID int32) ocr3types.Database {
return NewDB(d.ds, spec.ID, pluginID, lggr)
},
}
oracle, err := llo.NewDelegate(cfg)
if err != nil {
Expand Down
Loading