Documentation ¶
Index ¶
- Variables
- func ContractSetConfigArgsFromSharedConfigDeterministic(c SharedConfig, ...) (signers []types.OnchainPublicKey, transmitters []types.Account, f uint8, ...)
- func XXXContractSetConfigArgsFromSharedConfigEthereum(c SharedConfig, ...) (setConfigArgs ethcontractconfig.SetConfigArgs, err error)
- type OffchainConfigProto
- func (*OffchainConfigProto) Descriptor() ([]byte, []int)deprecated
- func (x *OffchainConfigProto) GetDeltaCertifiedCommitRequestNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaGraceNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaInitialNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaProgressNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaResendNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaRoundNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaStageNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationInitializationNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationObservationNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationQueryNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationShouldAcceptAttestedReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetOffchainPublicKeys() [][]byte
- func (x *OffchainConfigProto) GetPeerIds() []string
- func (x *OffchainConfigProto) GetRMax() uint64
- func (x *OffchainConfigProto) GetReportingPluginConfig() []byte
- func (x *OffchainConfigProto) GetS() []uint32
- func (x *OffchainConfigProto) GetSharedSecretEncryptions() *SharedSecretEncryptionsProto
- func (*OffchainConfigProto) ProtoMessage()
- func (x *OffchainConfigProto) ProtoReflect() protoreflect.Message
- func (x *OffchainConfigProto) Reset()
- func (x *OffchainConfigProto) String() string
- type PublicConfig
- type SharedConfig
- type SharedSecretEncryptionsProto
- func (*SharedSecretEncryptionsProto) Descriptor() ([]byte, []int)deprecated
- func (x *SharedSecretEncryptionsProto) GetDiffieHellmanPoint() []byte
- func (x *SharedSecretEncryptionsProto) GetEncryptions() [][]byte
- func (x *SharedSecretEncryptionsProto) GetSharedSecretHash() []byte
- func (*SharedSecretEncryptionsProto) ProtoMessage()
- func (x *SharedSecretEncryptionsProto) ProtoReflect() protoreflect.Message
- func (x *SharedSecretEncryptionsProto) Reset()
- func (x *SharedSecretEncryptionsProto) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_offchainreporting3_offchain_config_proto protoreflect.FileDescriptor
Functions ¶
func ContractSetConfigArgsFromSharedConfigDeterministic ¶
func ContractSetConfigArgsFromSharedConfigDeterministic( c SharedConfig, sharedSecretEncryptionPublicKeys []types.ConfigEncryptionPublicKey, ephemeralSk *[curve25519.ScalarSize]byte, ) ( signers []types.OnchainPublicKey, transmitters []types.Account, f uint8, onchainConfig []byte, offchainConfigVersion uint64, offchainConfig_ []byte, err error, )
func XXXContractSetConfigArgsFromSharedConfigEthereum ¶
func XXXContractSetConfigArgsFromSharedConfigEthereum( c SharedConfig, sharedSecretEncryptionPublicKeys []types.ConfigEncryptionPublicKey, ) ( setConfigArgs ethcontractconfig.SetConfigArgs, err error, )
Types ¶
type OffchainConfigProto ¶
type OffchainConfigProto struct { DeltaProgressNanoseconds uint64 `` /* 137-byte string literal not displayed */ DeltaResendNanoseconds uint64 `` /* 131-byte string literal not displayed */ DeltaInitialNanoseconds uint64 `` /* 134-byte string literal not displayed */ DeltaRoundNanoseconds uint64 `` /* 128-byte string literal not displayed */ DeltaGraceNanoseconds uint64 `` /* 128-byte string literal not displayed */ DeltaCertifiedCommitRequestNanoseconds uint64 `` /* 183-byte string literal not displayed */ DeltaStageNanoseconds uint64 `` /* 128-byte string literal not displayed */ RMax uint64 `protobuf:"varint,30,opt,name=r_max,json=rMax,proto3" json:"r_max,omitempty"` S []uint32 `protobuf:"varint,31,rep,packed,name=s,proto3" json:"s,omitempty"` OffchainPublicKeys [][]byte `protobuf:"bytes,32,rep,name=offchain_public_keys,json=offchainPublicKeys,proto3" json:"offchain_public_keys,omitempty"` PeerIds []string `protobuf:"bytes,33,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` ReportingPluginConfig []byte `` /* 127-byte string literal not displayed */ MaxDurationInitializationNanoseconds *uint64 `` /* 181-byte string literal not displayed */ MaxDurationQueryNanoseconds uint64 `` /* 148-byte string literal not displayed */ MaxDurationObservationNanoseconds uint64 `` /* 166-byte string literal not displayed */ MaxDurationShouldAcceptAttestedReportNanoseconds uint64 `` /* 217-byte string literal not displayed */ MaxDurationShouldTransmitAcceptedReportNanoseconds uint64 `` /* 223-byte string literal not displayed */ // contains filtered or unexported fields }
func (*OffchainConfigProto) Descriptor
deprecated
func (*OffchainConfigProto) Descriptor() ([]byte, []int)
Deprecated: Use OffchainConfigProto.ProtoReflect.Descriptor instead.
func (*OffchainConfigProto) GetDeltaCertifiedCommitRequestNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaCertifiedCommitRequestNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaGraceNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaGraceNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaInitialNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaInitialNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaProgressNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaProgressNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaResendNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaResendNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaRoundNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaRoundNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaStageNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaStageNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationInitializationNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationInitializationNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationObservationNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationObservationNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationQueryNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationQueryNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationShouldAcceptAttestedReportNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationShouldAcceptAttestedReportNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds() uint64
func (*OffchainConfigProto) GetOffchainPublicKeys ¶
func (x *OffchainConfigProto) GetOffchainPublicKeys() [][]byte
func (*OffchainConfigProto) GetPeerIds ¶
func (x *OffchainConfigProto) GetPeerIds() []string
func (*OffchainConfigProto) GetRMax ¶
func (x *OffchainConfigProto) GetRMax() uint64
func (*OffchainConfigProto) GetReportingPluginConfig ¶
func (x *OffchainConfigProto) GetReportingPluginConfig() []byte
func (*OffchainConfigProto) GetS ¶
func (x *OffchainConfigProto) GetS() []uint32
func (*OffchainConfigProto) GetSharedSecretEncryptions ¶
func (x *OffchainConfigProto) GetSharedSecretEncryptions() *SharedSecretEncryptionsProto
func (*OffchainConfigProto) ProtoMessage ¶
func (*OffchainConfigProto) ProtoMessage()
func (*OffchainConfigProto) ProtoReflect ¶
func (x *OffchainConfigProto) ProtoReflect() protoreflect.Message
func (*OffchainConfigProto) Reset ¶
func (x *OffchainConfigProto) Reset()
func (*OffchainConfigProto) String ¶
func (x *OffchainConfigProto) String() string
type PublicConfig ¶
type PublicConfig struct { // If an epoch (driven by a leader) fails to achieve progress (generate a // report) after DeltaProgress, we enter a new epoch. This parameter must be // chosen carefully. If the duration is too short, we may keep prematurely // switching epochs without ever achieving any progress, resulting in a // liveness failure! DeltaProgress time.Duration // DeltaResend determines how often Pacemaker newepoch messages should be // resent, allowing oracles that had crashed and are recovering to rejoin // the protocol more quickly. ~30s should be a reasonable default under most // circumstances. DeltaResend time.Duration // If no message from the leader has been received after the epoch start plus // DeltaInitial, we enter a new epoch. This parameter must be // chosen carefully. If the duration is too short, we may keep prematurely // switching epochs without ever achieving any progress, resulting in a // liveness failure! DeltaInitial time.Duration // DeltaRound determines the minimal amount of time that should pass between // the start of outcome generation rounds. With OCR3 (not OCR1!) you can // set this value very aggressively. Note that this only provides a lower // bound on the round interval; actual rounds might take longer. DeltaRound time.Duration // Once the leader of a outcome generation round has collected sufficiently // many observations, it will wait for DeltaGrace to pass to allow slower // oracles to still contribute an observation before moving on to generating // the report. Consequently, rounds driven by correct leaders will always // take at least DeltaGrace. DeltaGrace time.Duration // DeltaCertifiedCommitRequest determines the duration between requests for // a certified commit after we have received f+1 signatures in the report // attestation protocol but are still missing the certified commit/outcome // required for validating the report signatures. DeltaCertifiedCommitRequest time.Duration // DeltaStage determines the duration between stages of the transmission // protocol. In each stage, a certain number of oracles (determined by S) // will attempt to transmit, assuming that no other oracle has yet // successfully transmitted a report. DeltaStage time.Duration // The maximum number of rounds during an epoch. RMax uint64 // S is the transmission schedule. For example, S = [1,2,3] indicates that // in the first stage of transmission one oracle will attempt to transmit, // in the second stage two more will attempt to transmit (if in their view // the first stage didn't succeed), and in the third stage three more will // attempt to transmit (if in their view the first and second stage didn't // succeed). // // sum(S) should equal n. S []int // Identities (i.e. public keys) of the oracles participating in this // protocol instance. OracleIdentities []config.OracleIdentity // Binary blob containing configuration passed through to the // ReportingPlugin. ReportingPluginConfig []byte // MaxDurationX is the maximum duration a ReportingPlugin should spend // performing X. Reasonable values for these will be specific to each // ReportingPlugin. Be sure to not set these too short, or the corresponding // ReportingPlugin function may always time out. The logic for // MaxDurationQuery and MaxDurationObservation has changed since these // values were first introduced. Unlike the other MaxDurationX values, // exceeding MaxDurationQuery and MaxDurationObservation will only cause // warnings to be logged, but will *not* cause X to time out. // // These values are passed to the ReportingPlugin during initialization. // Consequently, the ReportingPlugin may exhibit specific behaviors based on // these values. For instance, the MercuryReportingPlugin uses // MaxDurationObservation to set context timeouts. MaxDurationInitialization *time.Duration // Context deadline passed to NewReportingPlugin. If this is nil, LocalConfig.DefaultMaxDurationInitialization will be used instead. MaxDurationQuery time.Duration // If the Query function takes longer than this, a warning will be logged. MaxDurationObservation time.Duration // If the Observation function takes longer than this, a warning will be logged. MaxDurationShouldAcceptAttestedReport time.Duration // Context deadline passed to ShouldAcceptAttestedReport. MaxDurationShouldTransmitAcceptedReport time.Duration // Context deadline passed to ShouldTransmitAcceptedReport. // The maximum number of oracles that are assumed to be faulty while the // protocol can retain liveness and safety. Unless you really know what // you’re doing, be sure to set this to floor((n-1)/3) where n is the total // number of oracles. F int // Binary blob containing configuration passed through to the // ReportingPlugin, and also available to the contract. (Unlike // ReportingPluginConfig which is only available offchain.) OnchainConfig []byte ConfigDigest types.ConfigDigest }
PublicConfig is the configuration disseminated through the smart contract It's public, because anybody can read it from the blockchain
func PublicConfigFromContractConfig ¶
func PublicConfigFromContractConfig(skipResourceExhaustionChecks bool, change types.ContractConfig) (PublicConfig, error)
func (*PublicConfig) ByzQuorumSize ¶
func (c *PublicConfig) ByzQuorumSize() int
func (*PublicConfig) CheckParameterBounds ¶
func (c *PublicConfig) CheckParameterBounds() error
func (*PublicConfig) MinRoundInterval ¶
func (c *PublicConfig) MinRoundInterval() time.Duration
func (*PublicConfig) N ¶
func (c *PublicConfig) N() int
N is the number of oracles participating in the protocol
type SharedConfig ¶
type SharedConfig struct {}
SharedConfig is the configuration shared by all oracles running an instance of the protocol. It's disseminated through the smart contract, but parts of it are encrypted so that only oracles can access them.
func SharedConfigFromContractConfig ¶
func SharedConfigFromContractConfig[RI any]( skipResourceExhaustionChecks bool, change types.ContractConfig, offchainKeyring types.OffchainKeyring, onchainKeyring ocr3types.OnchainKeyring[RI], peerID string, transmitAccount types.Account, ) (SharedConfig, commontypes.OracleID, error)
func (*SharedConfig) LeaderSelectionKey ¶
func (c *SharedConfig) LeaderSelectionKey() [16]byte
func (*SharedConfig) TransmissionOrderKey ¶
func (c *SharedConfig) TransmissionOrderKey() [16]byte
type SharedSecretEncryptionsProto ¶
type SharedSecretEncryptionsProto struct { // contains filtered or unexported fields }
func (*SharedSecretEncryptionsProto) Descriptor
deprecated
func (*SharedSecretEncryptionsProto) Descriptor() ([]byte, []int)
Deprecated: Use SharedSecretEncryptionsProto.ProtoReflect.Descriptor instead.
func (*SharedSecretEncryptionsProto) GetDiffieHellmanPoint ¶
func (x *SharedSecretEncryptionsProto) GetDiffieHellmanPoint() []byte
func (*SharedSecretEncryptionsProto) GetEncryptions ¶
func (x *SharedSecretEncryptionsProto) GetEncryptions() [][]byte
func (*SharedSecretEncryptionsProto) GetSharedSecretHash ¶
func (x *SharedSecretEncryptionsProto) GetSharedSecretHash() []byte
func (*SharedSecretEncryptionsProto) ProtoMessage ¶
func (*SharedSecretEncryptionsProto) ProtoMessage()
func (*SharedSecretEncryptionsProto) ProtoReflect ¶
func (x *SharedSecretEncryptionsProto) ProtoReflect() protoreflect.Message
func (*SharedSecretEncryptionsProto) Reset ¶
func (x *SharedSecretEncryptionsProto) Reset()
func (*SharedSecretEncryptionsProto) String ¶
func (x *SharedSecretEncryptionsProto) String() string
Click to show internal directories.
Click to hide internal directories.