Documentation ¶
Index ¶
- Variables
- func XXXContractSetConfigArgsFromSharedConfig(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) GetDeltaGraceNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaProgressNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaResendNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaRoundNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaStageNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationObservationNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationQueryNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationShouldAcceptFinalizedReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetOffchainPublicKeys() [][]byte
- func (x *OffchainConfigProto) GetPeerIds() []string
- func (x *OffchainConfigProto) GetRMax() uint32
- 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_offchainreporting2_offchain_config_proto protoreflect.FileDescriptor
Functions ¶
func XXXContractSetConfigArgsFromSharedConfig ¶
func XXXContractSetConfigArgsFromSharedConfig( c SharedConfig, sharedSecretEncryptionPublicKeys []types.ConfigEncryptionPublicKey, ) ( 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 `` /* 136-byte string literal not displayed */ DeltaResendNanoseconds uint64 `` /* 130-byte string literal not displayed */ DeltaRoundNanoseconds uint64 `` /* 127-byte string literal not displayed */ DeltaGraceNanoseconds uint64 `` /* 127-byte string literal not displayed */ DeltaStageNanoseconds uint64 `` /* 127-byte string literal not displayed */ RMax uint32 `protobuf:"varint,6,opt,name=r_max,json=rMax,proto3" json:"r_max,omitempty"` S []uint32 `protobuf:"varint,7,rep,packed,name=s,proto3" json:"s,omitempty"` OffchainPublicKeys [][]byte `protobuf:"bytes,8,rep,name=offchain_public_keys,json=offchainPublicKeys,proto3" json:"offchain_public_keys,omitempty"` PeerIds []string `protobuf:"bytes,9,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"` ReportingPluginConfig []byte `` /* 127-byte string literal not displayed */ MaxDurationQueryNanoseconds uint64 `` /* 148-byte string literal not displayed */ MaxDurationObservationNanoseconds uint64 `` /* 166-byte string literal not displayed */ MaxDurationReportNanoseconds uint64 `` /* 151-byte string literal not displayed */ MaxDurationShouldAcceptFinalizedReportNanoseconds uint64 `` /* 220-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) GetDeltaGraceNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaGraceNanoseconds() 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) GetMaxDurationObservationNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationObservationNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationQueryNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationQueryNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationReportNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationReportNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationShouldAcceptFinalizedReportNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationShouldAcceptFinalizedReportNanoseconds() 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() uint32
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 // DeltaRound determines the minimal amount of time that should pass between // the start of report generation rounds. With OCR2 only (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 report 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 // 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 uint8 // 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. MaxDurationQuery time.Duration MaxDurationObservation time.Duration // Used to be an environment variable called OCR_OBSERVATION_TIMEOUT in OCR1 in the Plugin node. MaxDurationReport time.Duration MaxDurationShouldAcceptFinalizedReport time.Duration MaxDurationShouldTransmitAcceptedReport time.Duration // 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) CheckParameterBounds ¶
func (c *PublicConfig) CheckParameterBounds() error
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( skipResourceExhaustionChecks bool, change types.ContractConfig, offchainKeyring types.OffchainKeyring, onchainKeyring types.OnchainKeyring, 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.