Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ func MakeOCRTriggerEvent(lggr logger.Logger, reports *datastreams.LLOStreamsTrig
}

// Encode the report to bytes
reportBytes, err := reportCodec.Encode(report, channelDef)
cache := datastreamsllo.NewOptsCache()
cache.Set(report.ChannelID, opts)
reportBytes, err := reportCodec.Encode(report, channelDef, cache)
if err != nil {
return nil, "", fmt.Errorf("failed to encode report: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ 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.20260317185256-d5f7db87ae70
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319152340-832f46afef07
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
github.com/smartcontractkit/chainlink-data-streams v0.1.12
github.com/smartcontractkit/chainlink-data-streams v0.1.13
github.com/smartcontractkit/chainlink-deployments-framework v0.86.3
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260318010722-59d4165024f1
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd
Expand Down
8 changes: 4 additions & 4 deletions core/scripts/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions core/services/llo/cre/report_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (r *ReportCodecCapabilityTriggerOpts) Encode() ([]byte, error) {

// Encode a report into a capability trigger report
// the returned byte slice is the marshaled protobuf of [capabilitiespb.OCRTriggerReport]
func (r ReportCodecCapabilityTrigger) Encode(report datastreamsllo.Report, cd llotypes.ChannelDefinition) ([]byte, error) {
func (r ReportCodecCapabilityTrigger) Encode(report datastreamsllo.Report, cd llotypes.ChannelDefinition, optsCache *datastreamsllo.OptsCache) ([]byte, error) {
if len(cd.Streams) != len(report.Values) {
// Invariant violation
return nil, fmt.Errorf("capability trigger expected %d streams, got %d", len(cd.Streams), len(report.Values))
Expand All @@ -71,8 +71,10 @@ func (r ReportCodecCapabilityTrigger) Encode(report datastreamsllo.Report, cd ll
}

var opts ReportCodecCapabilityTriggerOpts
if err := (&opts).Decode(cd.Opts); err != nil {
return nil, fmt.Errorf("failed to decode opts; got: '%s'; %w", cd.Opts, err)
var err error
opts, err = datastreamsllo.GetOpts[ReportCodecCapabilityTriggerOpts](optsCache, report.ChannelID)
if err != nil {
return nil, fmt.Errorf("failed to get opts: %w", err)
}

payload := make([]*commonds.LLOStreamDecimal, len(report.Values))
Expand Down
9 changes: 7 additions & 2 deletions core/services/llo/cre/report_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func Test_ReportCodec(t *testing.T) {
donID := uint32(1)
c := NewReportCodecCapabilityTrigger(logger.Test(t), donID)

optsCache := datastreamsllo.NewOptsCache()
r := datastreamsllo.Report{
ConfigDigest: types.ConfigDigest{1, 2, 3},
SeqNr: 32,
Expand All @@ -32,12 +33,13 @@ func Test_ReportCodec(t *testing.T) {
Values: []llo.StreamValue{llo.ToDecimal(decimal.NewFromInt(35)), llo.ToDecimal(decimal.NewFromInt(36))},
Specimen: false,
}
optsCache.Set(r.ChannelID, []byte{})
encoded, err := c.Encode(r, llotypes.ChannelDefinition{
Streams: []llotypes.Stream{
{StreamID: 1},
{StreamID: 2},
},
})
}, optsCache)
require.NoError(t, err)

var pbuf capabilitiespb.OCRTriggerReport
Expand Down Expand Up @@ -85,13 +87,16 @@ func Test_ReportCodec(t *testing.T) {
multiplier3, err := decimal.NewFromString("1000000") // 10^6
require.NoError(t, err)

cache := datastreamsllo.NewOptsCache()

opts, err := (&ReportCodecCapabilityTriggerOpts{
Multipliers: []ReportCodecCapabilityTriggerMultiplier{
{Multiplier: multiplier1, StreamID: 1},
{Multiplier: multiplier2, StreamID: 2},
{Multiplier: multiplier3, StreamID: 3},
},
}).Encode()
cache.Set(r.ChannelID, opts)
require.NoError(t, err)
encoded, err := c.Encode(r, llotypes.ChannelDefinition{
Streams: []llotypes.Stream{
Expand All @@ -100,7 +105,7 @@ func Test_ReportCodec(t *testing.T) {
{StreamID: 3},
},
Opts: opts,
})
}, cache)
require.NoError(t, err)

var pbuf capabilitiespb.OCRTriggerReport
Expand Down
4 changes: 3 additions & 1 deletion core/services/llo/cre/transmitter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ func encodeReport(t *testing.T, timestamp uint64) ocr3types.ReportWithInfo[lloty
{StreamID: 2},
},
}
rawReport, err := codec.Encode(rep, cd)
cache := datastreamsllo.NewOptsCache()
cache.Set(rep.ChannelID, []byte{})
rawReport, err := codec.Encode(rep, cd, cache)
require.NoError(t, err)

return ocr3types.ReportWithInfo[llotypes.ReportInfo]{
Expand Down
2 changes: 1 addition & 1 deletion core/services/llo/mercurytransmitter/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func newServer(lggr logger.Logger, verboseLogging bool, cfg QueueConfig, client
NewTransmitQueue(lggr, serverURL, int(cfg.TransmitQueueMaxSize()), pm),
serverURL,
evm.NewReportCodecPremiumLegacy(codecLggr, pm.DonID()),
evm.NewReportCodecStreamlined(),
evm.NewReportCodecStreamlined(codecLggr),
llo.JSONReportCodec{},
promTransmitSuccessCount.WithLabelValues(donIDStr, serverURL),
promTransmitDuplicateCount.WithLabelValues(donIDStr, serverURL),
Expand Down
2 changes: 1 addition & 1 deletion core/services/llo/report_codecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func NewReportCodecs(lggr logger.Logger, donID uint32) map[llotypes.ReportFormat
codecs[llotypes.ReportFormatEVMABIEncodeUnpacked] = evm.NewReportCodecEVMABIEncodeUnpacked(lggr, donID)
codecs[llotypes.ReportFormatEVMABIEncodeUnpackedExpr] = evm.NewReportCodecEVMABIEncodeUnpackedExpr(lggr, donID)
codecs[llotypes.ReportFormatCapabilityTrigger] = cre.NewReportCodecCapabilityTrigger(lggr, donID)
codecs[llotypes.ReportFormatEVMStreamlined] = evm.NewReportCodecStreamlined()
codecs[llotypes.ReportFormatEVMStreamlined] = evm.NewReportCodecStreamlined(lggr)

return codecs
}
4 changes: 2 additions & 2 deletions deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260224214816-cb23ec38649f
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260310183131-8d0f0e383288
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260317175207-e9ff89561326
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319152340-832f46afef07
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
github.com/smartcontractkit/chainlink-deployments-framework v0.86.3
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260318010722-59d4165024f1
Expand Down Expand Up @@ -424,7 +424,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260313162934-73fcb2020b93 // indirect
github.com/smartcontractkit/chainlink-ccv v0.0.0-20260317124520-6b2931b8cd0a // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.1.12 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.1.13 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260317132927-e8bc2c7b01f1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions deployment/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260224214816-cb23ec38649f
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5
github.com/smartcontractkit/chainlink-ccv v0.0.0-20260317124520-6b2931b8cd0a
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319152340-832f46afef07
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10
github.com/smartcontractkit/chainlink-data-streams v0.1.12
github.com/smartcontractkit/chainlink-data-streams v0.1.13
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260318010722-59d4165024f1
github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260107191744-4b93f62cffe3
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251222115927-36a18321243c
Expand Down
8 changes: 4 additions & 4 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260317185256-d5f7db87ae70
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260310183131-8d0f0e383288
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260310183131-8d0f0e383288
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319152340-832f46afef07
github.com/smartcontractkit/chainlink-common v0.10.1-0.20260319155722-325b0156b188
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
github.com/smartcontractkit/chainlink-deployments-framework v0.86.3
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260318010722-59d4165024f1
Expand Down Expand Up @@ -501,7 +501,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260317185256-d5f7db87ae70 // indirect
github.com/smartcontractkit/chainlink-ccv v0.0.0-20260317124520-6b2931b8cd0a // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.1.12 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.1.13 // indirect
github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260107191744-4b93f62cffe3 // indirect
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading