Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2024 Changes in this version + const MaxObservationLength + const MaxOutcomeLength + const MaxReportCount + const MaxReportLength + var ErrNilStreamValue = errors.New("nil stream value") + var LLOStreamValue_Type_name = map[int32]string + var LLOStreamValue_Type_value = map[string]int32 + func Decode(value StreamValue, data []byte) error + func VerifyChannelDefinitions(channelDefs llotypes.ChannelDefinitions) error + type AggregatorFunc func(values []StreamValue, f int) (StreamValue, error) + func GetAggregatorFunc(a llotypes.Aggregator) AggregatorFunc type DSOpts + ConfigDigest func() ocr2types.ConfigDigest + OutCtx func() ocr3types.OutcomeContext + type Decimal decimal.Decimal + func ToDecimal(d decimal.Decimal) *Decimal + func (v *Decimal) Decimal() decimal.Decimal + func (v *Decimal) MarshalBinary() ([]byte, error) + func (v *Decimal) MarshalText() ([]byte, error) + func (v *Decimal) String() string + func (v *Decimal) Type() LLOStreamValue_Type + func (v *Decimal) UnmarshalBinary(data []byte) error + func (v *Decimal) UnmarshalText(data []byte) error + type EVMOnchainConfigCodec struct + func (EVMOnchainConfigCodec) Decode(b []byte) (OnchainConfig, error) + func (EVMOnchainConfigCodec) Encode(c OnchainConfig) ([]byte, error) type JSONReportCodec + func (cdc JSONReportCodec) Pack(digest types.ConfigDigest, seqNr uint64, report ocr2types.Report, ...) ([]byte, error) + func (cdc JSONReportCodec) Unpack(b []byte) (digest types.ConfigDigest, seqNr uint64, report ocr2types.Report, ...) + func (cdc JSONReportCodec) UnpackDecode(b []byte) (digest types.ConfigDigest, seqNr uint64, report Report, ...) + type JSONStreamValue struct + Type LLOStreamValue_Type + Value string type LLOChannelDefinitionProto + Opts []byte + Streams []*LLOStreamDefinition + func (x *LLOChannelDefinitionProto) GetOpts() []byte + func (x *LLOChannelDefinitionProto) GetStreams() []*LLOStreamDefinition type LLOOutcomeProto + StreamAggregates []*LLOStreamAggregate + func (x *LLOOutcomeProto) GetStreamAggregates() []*LLOStreamAggregate + type LLOStreamAggregate struct + Aggregator uint32 + StreamID uint32 + StreamValue *LLOStreamValue + func StreamAggregatesToProtoOutcome(in StreamAggregates) (out []*LLOStreamAggregate, err error) + func (*LLOStreamAggregate) Descriptor() ([]byte, []int) + func (*LLOStreamAggregate) ProtoMessage() + func (x *LLOStreamAggregate) GetAggregator() uint32 + func (x *LLOStreamAggregate) GetStreamID() uint32 + func (x *LLOStreamAggregate) GetStreamValue() *LLOStreamValue + func (x *LLOStreamAggregate) ProtoReflect() protoreflect.Message + func (x *LLOStreamAggregate) Reset() + func (x *LLOStreamAggregate) String() string + type LLOStreamDefinition struct + Aggregator uint32 + StreamID uint32 + func (*LLOStreamDefinition) Descriptor() ([]byte, []int) + func (*LLOStreamDefinition) ProtoMessage() + func (x *LLOStreamDefinition) GetAggregator() uint32 + func (x *LLOStreamDefinition) GetStreamID() uint32 + func (x *LLOStreamDefinition) ProtoReflect() protoreflect.Message + func (x *LLOStreamDefinition) Reset() + func (x *LLOStreamDefinition) String() string + type LLOStreamValue struct + Type LLOStreamValue_Type + Value []byte + func (*LLOStreamValue) Descriptor() ([]byte, []int) + func (*LLOStreamValue) ProtoMessage() + func (x *LLOStreamValue) GetType() LLOStreamValue_Type + func (x *LLOStreamValue) GetValue() []byte + func (x *LLOStreamValue) ProtoReflect() protoreflect.Message + func (x *LLOStreamValue) Reset() + func (x *LLOStreamValue) String() string + type LLOStreamValueQuote struct + Ask []byte + Benchmark []byte + Bid []byte + func (*LLOStreamValueQuote) Descriptor() ([]byte, []int) + func (*LLOStreamValueQuote) ProtoMessage() + func (x *LLOStreamValueQuote) GetAsk() []byte + func (x *LLOStreamValueQuote) GetBenchmark() []byte + func (x *LLOStreamValueQuote) GetBid() []byte + func (x *LLOStreamValueQuote) ProtoReflect() protoreflect.Message + func (x *LLOStreamValueQuote) Reset() + func (x *LLOStreamValueQuote) String() string + type LLOStreamValue_Type int32 + const LLOStreamValue_Decimal + const LLOStreamValue_Quote + func (LLOStreamValue_Type) Descriptor() protoreflect.EnumDescriptor + func (LLOStreamValue_Type) EnumDescriptor() ([]byte, []int) + func (LLOStreamValue_Type) Type() protoreflect.EnumType + func (x LLOStreamValue_Type) Enum() *LLOStreamValue_Type + func (x LLOStreamValue_Type) Number() protoreflect.EnumNumber + func (x LLOStreamValue_Type) String() string type OnchainConfig + PredecessorConfigDigest *types.ConfigDigest + Version uint8 type Outcome + StreamAggregates StreamAggregates + func (out *Outcome) GenRetirementReport() RetirementReport type Plugin + N int + ReportCodecs map[llotypes.ReportFormat]ReportCodec + RetirementReportCodec RetirementReportCodec type PluginFactory + OnchainConfigCodec OnchainConfigCodec + ReportCodecs map[llotypes.ReportFormat]ReportCodec + RetirementReportCodec RetirementReportCodec + type Quote struct + Ask decimal.Decimal + Benchmark decimal.Decimal + Bid decimal.Decimal + func (v *Quote) IsValid() bool + func (v *Quote) MarshalBinary() (b []byte, err error) + func (v *Quote) MarshalText() ([]byte, error) + func (v *Quote) Type() LLOStreamValue_Type + func (v *Quote) UnmarshalBinary(data []byte) error + func (v *Quote) UnmarshalText(data []byte) error type Report + ObservationTimestampSeconds uint32 + type RetirementReportCodec interface + Decode func([]byte) (RetirementReport, error) + Encode func(RetirementReport) ([]byte, error) + type StandardRetirementReportCodec struct + func (r StandardRetirementReportCodec) Decode(data []byte) (RetirementReport, error) + func (r StandardRetirementReportCodec) Encode(report RetirementReport) ([]byte, error) + type StreamAggregates map[llotypes.StreamID]map[llotypes.Aggregator]StreamValue + type StreamValue interface + Type func() LLOStreamValue_Type + func MedianAggregator(values []StreamValue, f int) (StreamValue, error) + func ModeAggregator(values []StreamValue, f int) (StreamValue, error) + func QuoteAggregator(values []StreamValue, f int) (StreamValue, error) + func UnmarshalJSONStreamValue(enc *JSONStreamValue) (StreamValue, error) + func UnmarshalProtoStreamValue(enc *LLOStreamValue) (sv StreamValue, err error) v0.1.1-beta Nov 26, 2024 v0.0.1 Sep 12, 2024 v0.0.0 Jul 16, 2024 Changes in this version + const LifeCycleStageProduction + const LifeCycleStageRetired + const LifeCycleStageStaging + const MaxObservationRemoveChannelIDsLength + const MaxObservationStreamValuesLength + const MaxObservationUpdateChannelDefinitionsLength + const MaxOutcomeChannelDefinitionsLength + var File_llo_offchain_config_proto protoreflect.FileDescriptor + var File_plugin_codecs_proto protoreflect.FileDescriptor + func ChannelEquals(a, b llotypes.ChannelDefinition) bool + type ChannelDefinitionCache interface + Definitions func() llotypes.ChannelDefinitions + type ChannelDefinitionWithID struct + ChannelID llotypes.ChannelID + type ChannelHash [32]byte + func MakeChannelHash(cd ChannelDefinitionWithID) ChannelHash + type Config struct + VerboseLogging bool + type DSOpts interface + SeqNr func() uint64 + VerboseLogging func() bool + type DataSource interface + Observe func(ctx context.Context, streamValues StreamValues, opts DSOpts) error + type ErrUnreportableChannel struct + ChannelID llotypes.ChannelID + Inner error + Reason string + func (e *ErrUnreportableChannel) Error() string + func (e *ErrUnreportableChannel) String() string + func (e *ErrUnreportableChannel) Unwrap() error + type JSONOnchainConfigCodec struct + func (c *JSONOnchainConfigCodec) Decode([]byte) (OnchainConfig, error) + func (c *JSONOnchainConfigCodec) Encode(OnchainConfig) ([]byte, error) + type JSONReportCodec struct + func (cdc JSONReportCodec) Decode(b []byte) (r Report, err error) + func (cdc JSONReportCodec) Encode(r Report) ([]byte, error) + type LLOChannelDefinitionProto struct + ChainSelector uint64 + ReportFormat uint32 + StreamIDs []uint32 + func (*LLOChannelDefinitionProto) Descriptor() ([]byte, []int) + func (*LLOChannelDefinitionProto) ProtoMessage() + func (x *LLOChannelDefinitionProto) GetChainSelector() uint64 + func (x *LLOChannelDefinitionProto) GetReportFormat() uint32 + func (x *LLOChannelDefinitionProto) GetStreamIDs() []uint32 + func (x *LLOChannelDefinitionProto) ProtoReflect() protoreflect.Message + func (x *LLOChannelDefinitionProto) Reset() + func (x *LLOChannelDefinitionProto) String() string + type LLOChannelIDAndDefinitionProto struct + ChannelDefinition *LLOChannelDefinitionProto + ChannelID uint32 + func (*LLOChannelIDAndDefinitionProto) Descriptor() ([]byte, []int) + func (*LLOChannelIDAndDefinitionProto) ProtoMessage() + func (x *LLOChannelIDAndDefinitionProto) GetChannelDefinition() *LLOChannelDefinitionProto + func (x *LLOChannelIDAndDefinitionProto) GetChannelID() uint32 + func (x *LLOChannelIDAndDefinitionProto) ProtoReflect() protoreflect.Message + func (x *LLOChannelIDAndDefinitionProto) Reset() + func (x *LLOChannelIDAndDefinitionProto) String() string + type LLOChannelIDAndValidAfterSecondsProto struct + ChannelID uint32 + ValidAfterSeconds uint32 + func (*LLOChannelIDAndValidAfterSecondsProto) Descriptor() ([]byte, []int) + func (*LLOChannelIDAndValidAfterSecondsProto) ProtoMessage() + func (x *LLOChannelIDAndValidAfterSecondsProto) GetChannelID() uint32 + func (x *LLOChannelIDAndValidAfterSecondsProto) GetValidAfterSeconds() uint32 + func (x *LLOChannelIDAndValidAfterSecondsProto) ProtoReflect() protoreflect.Message + func (x *LLOChannelIDAndValidAfterSecondsProto) Reset() + func (x *LLOChannelIDAndValidAfterSecondsProto) String() string + type LLOObservationProto struct + AttestedPredecessorRetirement []byte + RemoveChannelIDs []uint32 + ShouldRetire bool + StreamValues map[uint32][]byte + UnixTimestampNanoseconds int64 + UpdateChannelDefinitions map[uint32]*LLOChannelDefinitionProto + func (*LLOObservationProto) Descriptor() ([]byte, []int) + func (*LLOObservationProto) ProtoMessage() + func (x *LLOObservationProto) GetAttestedPredecessorRetirement() []byte + func (x *LLOObservationProto) GetRemoveChannelIDs() []uint32 + func (x *LLOObservationProto) GetShouldRetire() bool + func (x *LLOObservationProto) GetStreamValues() map[uint32][]byte + func (x *LLOObservationProto) GetUnixTimestampNanoseconds() int64 + func (x *LLOObservationProto) GetUpdateChannelDefinitions() map[uint32]*LLOChannelDefinitionProto + func (x *LLOObservationProto) ProtoReflect() protoreflect.Message + func (x *LLOObservationProto) Reset() + func (x *LLOObservationProto) String() string + type LLOOffchainConfigProto struct + PredecessorConfigDigest []byte + func (*LLOOffchainConfigProto) Descriptor() ([]byte, []int) + func (*LLOOffchainConfigProto) ProtoMessage() + func (x *LLOOffchainConfigProto) GetPredecessorConfigDigest() []byte + func (x *LLOOffchainConfigProto) ProtoReflect() protoreflect.Message + func (x *LLOOffchainConfigProto) Reset() + func (x *LLOOffchainConfigProto) String() string + type LLOOutcomeProto struct + ChannelDefinitions []*LLOChannelIDAndDefinitionProto + LifeCycleStage string + ObservationsTimestampNanoseconds int64 + StreamMedians []*LLOStreamIDAndValue + ValidAfterSeconds []*LLOChannelIDAndValidAfterSecondsProto + func (*LLOOutcomeProto) Descriptor() ([]byte, []int) + func (*LLOOutcomeProto) ProtoMessage() + func (x *LLOOutcomeProto) GetChannelDefinitions() []*LLOChannelIDAndDefinitionProto + func (x *LLOOutcomeProto) GetLifeCycleStage() string + func (x *LLOOutcomeProto) GetObservationsTimestampNanoseconds() int64 + func (x *LLOOutcomeProto) GetStreamMedians() []*LLOStreamIDAndValue + func (x *LLOOutcomeProto) GetValidAfterSeconds() []*LLOChannelIDAndValidAfterSecondsProto + func (x *LLOOutcomeProto) ProtoReflect() protoreflect.Message + func (x *LLOOutcomeProto) Reset() + func (x *LLOOutcomeProto) String() string + type LLOStreamIDAndValue struct + StreamID uint32 + Value []byte + func (*LLOStreamIDAndValue) Descriptor() ([]byte, []int) + func (*LLOStreamIDAndValue) ProtoMessage() + func (x *LLOStreamIDAndValue) GetStreamID() uint32 + func (x *LLOStreamIDAndValue) GetValue() []byte + func (x *LLOStreamIDAndValue) ProtoReflect() protoreflect.Message + func (x *LLOStreamIDAndValue) Reset() + func (x *LLOStreamIDAndValue) String() string + type LLOStreamObservationProto struct + Valid bool + Value []byte + func (*LLOStreamObservationProto) Descriptor() ([]byte, []int) + func (*LLOStreamObservationProto) ProtoMessage() + func (x *LLOStreamObservationProto) GetValid() bool + func (x *LLOStreamObservationProto) GetValue() []byte + func (x *LLOStreamObservationProto) ProtoReflect() protoreflect.Message + func (x *LLOStreamObservationProto) Reset() + func (x *LLOStreamObservationProto) String() string + type Observation struct + AttestedPredecessorRetirement []byte + RemoveChannelIDs map[llotypes.ChannelID]struct{} + ShouldRetire bool + StreamValues StreamValues + UnixTimestampNanoseconds int64 + UpdateChannelDefinitions llotypes.ChannelDefinitions + type ObservationCodec interface + Decode func(encoded types.Observation) (obs Observation, err error) + Encode func(obs Observation) (types.Observation, error) + type OffchainConfig struct + PredecessorConfigDigest *types.ConfigDigest + func DecodeOffchainConfig(b []byte) (o OffchainConfig, err error) + func (c OffchainConfig) Encode() ([]byte, error) + type OnchainConfig struct + type OnchainConfigCodec interface + Decode func([]byte) (OnchainConfig, error) + Encode func(OnchainConfig) ([]byte, error) + type Outcome struct + ChannelDefinitions llotypes.ChannelDefinitions + LifeCycleStage llotypes.LifeCycleStage + ObservationsTimestampNanoseconds int64 + StreamMedians map[llotypes.StreamID]*big.Int + ValidAfterSeconds map[llotypes.ChannelID]uint32 + func (out *Outcome) IsReportable(channelID llotypes.ChannelID) *ErrUnreportableChannel + func (out *Outcome) ObservationsTimestampSeconds() (uint32, error) + func (out *Outcome) ReportableChannels() (reportable []llotypes.ChannelID, unreportable []*ErrUnreportableChannel) + type OutcomeCodec interface + Decode func(encoded ocr3types.Outcome) (outcome Outcome, err error) + Encode func(outcome Outcome) (ocr3types.Outcome, error) + type Plugin struct + ChannelDefinitionCache ChannelDefinitionCache + Codecs map[llotypes.ReportFormat]ReportCodec + Config Config + ConfigDigest types.ConfigDigest + DataSource DataSource + F int + Logger logger.Logger + ObservationCodec ObservationCodec + OutcomeCodec OutcomeCodec + PredecessorConfigDigest *types.ConfigDigest + PredecessorRetirementReportCache PredecessorRetirementReportCache + ShouldRetireCache ShouldRetireCache + func (p *Plugin) Close() error + func (p *Plugin) Observation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query) (types.Observation, error) + func (p *Plugin) ObservationQuorum(outctx ocr3types.OutcomeContext, query types.Query) (ocr3types.Quorum, error) + func (p *Plugin) Outcome(outctx ocr3types.OutcomeContext, query types.Query, ...) (ocr3types.Outcome, error) + func (p *Plugin) Query(ctx context.Context, outctx ocr3types.OutcomeContext) (types.Query, error) + func (p *Plugin) Reports(seqNr uint64, rawOutcome ocr3types.Outcome) ([]ocr3types.ReportWithInfo[llotypes.ReportInfo], error) + func (p *Plugin) ShouldAcceptAttestedReport(context.Context, uint64, ocr3types.ReportWithInfo[llotypes.ReportInfo]) (bool, error) + func (p *Plugin) ShouldTransmitAcceptedReport(context.Context, uint64, ocr3types.ReportWithInfo[llotypes.ReportInfo]) (bool, error) + func (p *Plugin) ValidateObservation(outctx ocr3types.OutcomeContext, query types.Query, ...) error + type PluginFactory struct + ChannelDefinitionCache ChannelDefinitionCache + Codecs map[llotypes.ReportFormat]ReportCodec + Config Config + DataSource DataSource + Logger logger.Logger + PredecessorRetirementReportCache PredecessorRetirementReportCache + ShouldRetireCache ShouldRetireCache + func NewPluginFactory(cfg Config, prrc PredecessorRetirementReportCache, src ShouldRetireCache, ...) *PluginFactory + func (f *PluginFactory) NewReportingPlugin(cfg ocr3types.ReportingPluginConfig) (ocr3types.ReportingPlugin[llotypes.ReportInfo], ocr3types.ReportingPluginInfo, ...) + type PredecessorRetirementReportCache interface + AttestedRetirementReport func(predecessorConfigDigest ocr2types.ConfigDigest) ([]byte, error) + CheckAttestedRetirementReport func(predecessorConfigDigest ocr2types.ConfigDigest, ...) (RetirementReport, error) + func NewPredecessorRetirementReportCache() PredecessorRetirementReportCache + type Report struct + ChainSelector uint64 + ChannelID llotypes.ChannelID + ConfigDigest types.ConfigDigest + SeqNr uint64 + Specimen bool + ValidAfterSeconds uint32 + ValidUntilSeconds uint32 + Values []*big.Int + type ReportCodec interface + Decode func([]byte) (Report, error) + Encode func(Report) ([]byte, error) + type RetirementReport struct + ValidAfterSeconds map[llotypes.ChannelID]uint32 + type ShouldRetireCache interface + ShouldRetire func() (bool, error) + func NewShouldRetireCache() ShouldRetireCache + type StreamValues map[llotypes.StreamID]*big.Int + type Transmitter interface