diff --git a/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go b/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go index d9080266aab..28dfbe6d859 100644 --- a/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go +++ b/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go @@ -558,6 +558,7 @@ func doesBridgeExist(api *nodeAPI, name string) bool { } func generateMercuryOCR2Config(nca []NodeKeys) MercuryOCR2Config { + ctx := context.Background() f := uint8(1) rawOnchainConfig := mercurytypes.OnchainConfig{ Min: big.NewInt(0), @@ -570,7 +571,7 @@ func generateMercuryOCR2Config(nca []NodeKeys) MercuryOCR2Config { BaseUSDFee: decimal.NewFromInt(0), } - onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(rawOnchainConfig) + onchainConfig, err := (datastreamsmercury.StandardOnchainConfigCodec{}).Encode(ctx, rawOnchainConfig) helpers.PanicErr(err) reportingPluginConfig, err := json.Marshal(rawReportingPluginConfig) helpers.PanicErr(err) @@ -621,8 +622,9 @@ func generateMercuryOCR2Config(nca []NodeKeys) MercuryOCR2Config { []int{len(identities)}, // S identities, reportingPluginConfig, // reportingPluginConfig []byte, - 250*time.Millisecond, // Max duration observation - int(f), // f + nil, + 250*time.Millisecond, // Max duration observation + int(f), // f onchainConfig, ) signerAddresses, err := evm.OnchainPublicKeyToAddress(signers) diff --git a/core/services/relay/evm/mercury/transmitter.go b/core/services/relay/evm/mercury/transmitter.go index 3f6b1a33ad5..79573bb51e9 100644 --- a/core/services/relay/evm/mercury/transmitter.go +++ b/core/services/relay/evm/mercury/transmitter.go @@ -393,7 +393,7 @@ func (mt *mercuryTransmitter) HealthReport() map[string]error { return report } -func (mt *mercuryTransmitter) sendToTrigger(report ocrtypes.Report, rawReportCtx [3][32]byte, signatures []ocrtypes.AttributedOnchainSignature) error { +func (mt *mercuryTransmitter) sendToTrigger(ctx context.Context, report ocrtypes.Report, rawReportCtx [3][32]byte, signatures []ocrtypes.AttributedOnchainSignature) error { rawSignatures := [][]byte{} for _, sig := range signatures { rawSignatures = append(rawSignatures, sig.Signature) @@ -413,11 +413,11 @@ func (mt *mercuryTransmitter) sendToTrigger(report ocrtypes.Report, rawReportCtx // after decoding and validating signatures. } - price, err := mt.codec.BenchmarkPriceFromReport(report) + price, err := mt.codec.BenchmarkPriceFromReport(ctx, report) if err != nil { mt.lggr.Warn("Failed to decode benchmark price from report") } - obsTs, err := mt.codec.ObservationTimestampFromReport(report) + obsTs, err := mt.codec.ObservationTimestampFromReport(ctx, report) if err != nil { mt.lggr.Warn("Failed to decode observation timestamp from report") } @@ -430,7 +430,7 @@ func (mt *mercuryTransmitter) Transmit(ctx context.Context, reportCtx ocrtypes.R rawReportCtx := evmutil.RawReportContext(reportCtx) if mt.triggerCapability != nil { // Acting as a Capability - send report to trigger service and exit. - return mt.sendToTrigger(report, rawReportCtx, signatures) + return mt.sendToTrigger(ctx, report, rawReportCtx, signatures) } var rs [][32]byte