pluginconfig

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 11 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	OCRVersionOCR3  = "3.0"
	OCRVersionOCR31 = "3.1"
)
View Source
const MaxPluginConfigSize = 8 * 1024 * 1024 // 8 MiB

MaxPluginConfigSize is a sanity limit on the size of the JSON-encoded plugin config. It is generous enough to hold inline ChannelDefinitions for very large DONs, while preventing unbounded allocations from a malformed or hostile config blob.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginConfig

type PluginConfig struct {
	ChannelDefinitionsContractAddress   common.Address `json:"channelDefinitionsContractAddress" toml:"channelDefinitionsContractAddress"`
	ChannelDefinitionsContractFromBlock int64          `json:"channelDefinitionsContractFromBlock" toml:"channelDefinitionsContractFromBlock"`

	// NOTE: ChannelDefinitions is an override.
	// If ChannelDefinitions is specified, values for
	// ChannelDefinitionsContractAddress and
	// ChannelDefinitionsContractFromBlock will be ignored
	ChannelDefinitions string `json:"channelDefinitions" toml:"channelDefinitions"`

	// BenchmarkMode is a flag to enable benchmarking mode. In this mode, the
	// transmitter will not transmit anything at all and instead emit
	// logs/metrics.
	BenchmarkMode bool `json:"benchmarkMode" toml:"benchmarkMode"`

	// KeyBundleIDs maps supported keys to their respective bundle IDs
	// Key must match llo's ReportFormat
	KeyBundleIDs map[string]string `json:"keyBundleIDs" toml:"keyBundleIDs"`

	DonID uint32 `json:"donID" toml:"donID"`

	// Mercury servers
	Servers map[string]hex.PlainHexBytes `json:"servers" toml:"servers"`

	Transmitters []TransmitterConfig `json:"transmitters" toml:"transmitters"`

	// OCRVersion selects the libocr protocol version the plugin runs on:
	//   "" or "3.0" => OCR3.0 (llo/v30)
	//   "3.1"       => OCR3.1 (llo/dev/v31)
	// NOTE: this is the OCR protocol version, distinct from the LLO offchain
	// ProtocolVersion (0/1) carried in the offchain config.
	OCRVersion string `json:"ocrVersion" toml:"ocrVersion"`
}

func (PluginConfig) GetServers

func (p PluginConfig) GetServers() (servers []mercuryconfig.Server)

func (PluginConfig) IsOCR31

func (p PluginConfig) IsOCR31() bool

IsOCR31 reports whether the job should run on the OCR3.1 (llo/dev/v31) plugin.

func (*PluginConfig) Unmarshal

func (p *PluginConfig) Unmarshal(data []byte) error

func (PluginConfig) Validate

func (p PluginConfig) Validate() (merr error)

type TransmitterConfig

type TransmitterConfig struct {
	Type TransmitterType `json:"type" toml:"type"`
	// each sub-transmitter can have its own specific configuration
	Opts json.RawMessage `json:"opts" toml:"opts"`
}

type TransmitterType

type TransmitterType int
const (
	TransmitterTypeCRE TransmitterType = iota
)

func (TransmitterType) String

func (t TransmitterType) String() string

func (*TransmitterType) UnmarshalText

func (t *TransmitterType) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL