Documentation
¶
Index ¶
- Constants
- Variables
- func CheckPublicConfig(skipInsaneForProductionChecks bool, publicConfig PublicConfig) error
- func ContractSetConfigArgsFromSharedConfigDeterministic(c SharedConfig, ...) (signers []types.OnchainPublicKey, transmitters []types.Account, f uint8, ...)
- func DefaultDeltaBlobChunkResponseTimeout() time.Duration
- func DefaultDeltaBlockSyncResponseTimeout() time.Duration
- func DefaultDeltaInitial() time.Duration
- func DefaultDeltaReportsPlusPrecursorRequest() time.Duration
- func DefaultDeltaTreeSyncResponseTimeout() time.Duration
- func XXXContractSetConfigArgsFromSharedConfigEthereum(c SharedConfig, ...) (setConfigArgs ethcontractconfig.SetConfigArgs, err error)
- type OffchainConfigProto
- func (*OffchainConfigProto) Descriptor() ([]byte, []int)deprecated
- func (x *OffchainConfigProto) GetBlobChunkBytes() uint32
- func (x *OffchainConfigProto) GetDeltaBlobBroadcastGraceNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaBlobChunkMinRequestToSameOracleIntervalNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaBlobChunkResponseTimeoutNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaBlobOfferMinRequestToSameOracleIntervalNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaBlobOfferResponseTimeoutNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaBlockSyncMinRequestToSameOracleIntervalNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaBlockSyncResponseTimeoutNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaGraceNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaInitialNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaProgressNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaReportsPlusPrecursorRequestNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaResendNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaRoundNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaStageNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaStateSyncSummaryIntervalNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaTreeSyncMinRequestToSameOracleIntervalNanoseconds() uint64
- func (x *OffchainConfigProto) GetDeltaTreeSyncResponseTimeoutNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxBlocksPerBlockSyncResponse() uint32
- func (x *OffchainConfigProto) GetMaxDurationInitializationNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationShouldAcceptAttestedReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds() uint64
- func (x *OffchainConfigProto) GetMaxHistoricalSnapshotsRetained() uint64
- func (x *OffchainConfigProto) GetMaxParallelRequestedBlocks() uint64
- func (x *OffchainConfigProto) GetMaxParallelTreeSyncChunkFetches() uint32
- func (x *OffchainConfigProto) GetMaxTreeSyncChunkKeys() uint32
- func (x *OffchainConfigProto) GetMaxTreeSyncChunkKeysPlusValuesBytes() uint32
- func (x *OffchainConfigProto) GetOffchainPublicKeys() [][]byte
- func (x *OffchainConfigProto) GetPeerIds() []string
- func (x *OffchainConfigProto) GetPrevConfigDigest() []byte
- func (x *OffchainConfigProto) GetPrevHistoryDigest() []byte
- func (x *OffchainConfigProto) GetPrevSeqNr() uint64
- func (x *OffchainConfigProto) GetRMax() uint64
- func (x *OffchainConfigProto) GetReportingPluginConfig() []byte
- func (x *OffchainConfigProto) GetS() []uint32
- func (x *OffchainConfigProto) GetSharedSecretEncryptions() *SharedSecretEncryptionsProto
- func (x *OffchainConfigProto) GetSnapshotInterval() uint64
- func (x *OffchainConfigProto) GetWarnDurationCommittedNanoseconds() uint64
- func (x *OffchainConfigProto) GetWarnDurationObservationNanoseconds() uint64
- func (x *OffchainConfigProto) GetWarnDurationObservationQuorumNanoseconds() uint64
- func (x *OffchainConfigProto) GetWarnDurationQueryNanoseconds() uint64
- func (x *OffchainConfigProto) GetWarnDurationStateTransitionNanoseconds() uint64
- func (x *OffchainConfigProto) GetWarnDurationValidateObservationNanoseconds() uint64
- func (*OffchainConfigProto) ProtoMessage()
- func (x *OffchainConfigProto) ProtoReflect() protoreflect.Message
- func (x *OffchainConfigProto) Reset()
- func (x *OffchainConfigProto) String() string
- type PublicConfig
- func (c *PublicConfig) ByzQuorumSize() int
- func (c *PublicConfig) CheckParameterBounds() error
- func (c *PublicConfig) GetBlobChunkBytes() int
- func (c *PublicConfig) GetDeltaBlobBroadcastGrace() time.Duration
- func (c *PublicConfig) GetDeltaBlobChunkMinRequestToSameOracleInterval() time.Duration
- func (c *PublicConfig) GetDeltaBlobChunkResponseTimeout() time.Duration
- func (c *PublicConfig) GetDeltaBlobOfferMinRequestToSameOracleInterval() time.Duration
- func (c *PublicConfig) GetDeltaBlobOfferResponseTimeout() time.Duration
- func (c *PublicConfig) GetDeltaBlockSyncMinRequestToSameOracleInterval() time.Duration
- func (c *PublicConfig) GetDeltaBlockSyncResponseTimeout() time.Duration
- func (c *PublicConfig) GetDeltaInitial() time.Duration
- func (c *PublicConfig) GetDeltaReportsPlusPrecursorRequest() time.Duration
- func (c *PublicConfig) GetDeltaResend() time.Duration
- func (c *PublicConfig) GetDeltaStateSyncSummaryInterval() time.Duration
- func (c *PublicConfig) GetDeltaTreeSyncMinRequestToSameOracleInterval() time.Duration
- func (c *PublicConfig) GetDeltaTreeSyncResponseTimeout() time.Duration
- func (c *PublicConfig) GetMaxBlocksPerBlockSyncResponse() int
- func (c *PublicConfig) GetMaxHistoricalSnapshotsRetained() uint64
- func (c *PublicConfig) GetMaxParallelRequestedBlocks() uint64
- func (c *PublicConfig) GetMaxParallelTreeSyncChunkFetches() int
- func (c *PublicConfig) GetMaxTreeSyncChunkKeys() int
- func (c *PublicConfig) GetMaxTreeSyncChunkKeysPlusValuesBytes() int
- func (c *PublicConfig) GetPrevFields() (PublicConfigPrevFields, bool)
- func (c *PublicConfig) GetSnapshotInterval() uint64
- func (c *PublicConfig) MinRoundInterval() time.Duration
- func (c *PublicConfig) N() int
- type PublicConfigMetrics
- type PublicConfigPrevFields
- 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 ¶
const ( DefaultDeltaResend = 5 * time.Second DefaultDeltaStateSyncSummaryInterval = 5 * time.Second DefaultDeltaBlockSyncMinRequestToSameOracleInterval = defaultSmallRequestSizeMinRequestToSameOracleInterval DefaultMaxBlocksPerBlockSyncResponse = 2 DefaultMaxParallelRequestedBlocks = 100 DefaultDeltaTreeSyncMinRequestToSameOracleInterval = defaultSmallRequestSizeMinRequestToSameOracleInterval DefaultMaxTreeSyncChunkKeys = 1024 // A tree sync chunk must always fit at least 1 maximally sized (using maxmax) key-value pair DefaultMaxTreeSyncChunkKeysPlusValuesBytes = ocr3_1types.MaxMaxKeyValueKeyBytes + ocr3_1types.MaxMaxKeyValueValueBytes DefaultMaxParallelTreeSyncChunkFetches = 8 DefaultSnapshotInterval = 10_000 DefaultMaxHistoricalSnapshotsRetained = 10 DefaultDeltaBlobOfferMinRequestToSameOracleInterval = defaultSmallRequestSizeMinRequestToSameOracleInterval DefaultDeltaBlobOfferResponseTimeout = 10 * time.Second DefaultDeltaBlobBroadcastGrace = 10 * time.Millisecond DefaultDeltaBlobChunkMinRequestToSameOracleInterval = defaultSmallRequestSizeMinRequestToSameOracleInterval DefaultBlobChunkBytes = 1_000_000 // 1MB )
const ( MaxMaxBlocksPerBlockSyncResponse = 2 MaxMaxTreeSyncChunkKeys = 10_000 MaxMaxTreeSyncChunkKeysPlusValuesBytes = 50_000_000 // 50MB MaxMaxBlobChunkBytes = 10_000_000 // 10MB )
Variables ¶
var File_offchainreporting3_1_offchain_config_proto protoreflect.FileDescriptor
Functions ¶
func CheckPublicConfig ¶
func CheckPublicConfig(skipInsaneForProductionChecks bool, publicConfig PublicConfig) error
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 DefaultDeltaInitial ¶
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 `` /* 137-byte string literal not displayed */
DeltaInitialNanoseconds *uint64 `` /* 140-byte string literal not displayed */
DeltaRoundNanoseconds uint64 `` /* 128-byte string literal not displayed */
DeltaGraceNanoseconds uint64 `` /* 128-byte string literal not displayed */
DeltaReportsPlusPrecursorRequestNanoseconds *uint64 `` /* 206-byte string literal not displayed */
DeltaStageNanoseconds uint64 `` /* 128-byte string literal not displayed */
DeltaStateSyncSummaryIntervalNanoseconds *uint64 `` /* 197-byte string literal not displayed */
DeltaBlockSyncMinRequestToSameOracleIntervalNanoseconds *uint64 `` /* 250-byte string literal not displayed */
DeltaBlockSyncResponseTimeoutNanoseconds *uint64 `` /* 197-byte string literal not displayed */
MaxBlocksPerBlockSyncResponse *uint32 `` /* 164-byte string literal not displayed */
MaxParallelRequestedBlocks *uint64 `` /* 151-byte string literal not displayed */
DeltaTreeSyncMinRequestToSameOracleIntervalNanoseconds *uint64 `` /* 247-byte string literal not displayed */
DeltaTreeSyncResponseTimeoutNanoseconds *uint64 `` /* 194-byte string literal not displayed */
MaxTreeSyncChunkKeys *uint32 `` /* 135-byte string literal not displayed */
MaxTreeSyncChunkKeysPlusValuesBytes *uint32 `` /* 186-byte string literal not displayed */
MaxParallelTreeSyncChunkFetches *uint32 `` /* 170-byte string literal not displayed */
SnapshotInterval *uint64 `protobuf:"varint,68,opt,name=snapshot_interval,json=snapshotInterval,proto3,oneof" json:"snapshot_interval,omitempty"`
MaxHistoricalSnapshotsRetained *uint64 `` /* 163-byte string literal not displayed */
DeltaBlobOfferMinRequestToSameOracleIntervalNanoseconds *uint64 `` /* 250-byte string literal not displayed */
DeltaBlobOfferResponseTimeoutNanoseconds *uint64 `` /* 197-byte string literal not displayed */
DeltaBlobBroadcastGraceNanoseconds *uint64 `` /* 177-byte string literal not displayed */
DeltaBlobChunkMinRequestToSameOracleIntervalNanoseconds *uint64 `` /* 250-byte string literal not displayed */
DeltaBlobChunkResponseTimeoutNanoseconds *uint64 `` /* 197-byte string literal not displayed */
BlobChunkBytes *uint32 `protobuf:"varint,75,opt,name=blob_chunk_bytes,json=blobChunkBytes,proto3,oneof" json:"blob_chunk_bytes,omitempty"`
RMax uint64 `protobuf:"varint,76,opt,name=r_max,json=rMax,proto3" json:"r_max,omitempty"`
S []uint32 `protobuf:"varint,77,rep,packed,name=s,proto3" json:"s,omitempty"`
OffchainPublicKeys [][]byte `protobuf:"bytes,78,rep,name=offchain_public_keys,json=offchainPublicKeys,proto3" json:"offchain_public_keys,omitempty"`
PeerIds []string `protobuf:"bytes,79,rep,name=peer_ids,json=peerIds,proto3" json:"peer_ids,omitempty"`
ReportingPluginConfig []byte `` /* 127-byte string literal not displayed */
MaxDurationInitializationNanoseconds uint64 `` /* 175-byte string literal not displayed */
WarnDurationQueryNanoseconds uint64 `` /* 151-byte string literal not displayed */
WarnDurationObservationNanoseconds uint64 `` /* 169-byte string literal not displayed */
WarnDurationValidateObservationNanoseconds uint64 `` /* 195-byte string literal not displayed */
WarnDurationObservationQuorumNanoseconds uint64 `` /* 189-byte string literal not displayed */
WarnDurationStateTransitionNanoseconds uint64 `` /* 183-byte string literal not displayed */
WarnDurationCommittedNanoseconds uint64 `` /* 163-byte string literal not displayed */
MaxDurationShouldAcceptAttestedReportNanoseconds uint64 `` /* 217-byte string literal not displayed */
MaxDurationShouldTransmitAcceptedReportNanoseconds uint64 `` /* 223-byte string literal not displayed */
PrevConfigDigest []byte `protobuf:"bytes,91,opt,name=prev_config_digest,json=prevConfigDigest,proto3,oneof" json:"prev_config_digest,omitempty"`
PrevSeqNr *uint64 `protobuf:"varint,92,opt,name=prev_seq_nr,json=prevSeqNr,proto3,oneof" json:"prev_seq_nr,omitempty"`
PrevHistoryDigest []byte `protobuf:"bytes,93,opt,name=prev_history_digest,json=prevHistoryDigest,proto3,oneof" json:"prev_history_digest,omitempty"`
// contains filtered or unexported fields
}
func (*OffchainConfigProto) Descriptor
deprecated
func (*OffchainConfigProto) Descriptor() ([]byte, []int)
Deprecated: Use OffchainConfigProto.ProtoReflect.Descriptor instead.
func (*OffchainConfigProto) GetBlobChunkBytes ¶
func (x *OffchainConfigProto) GetBlobChunkBytes() uint32
func (*OffchainConfigProto) GetDeltaBlobBroadcastGraceNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlobBroadcastGraceNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaBlobChunkMinRequestToSameOracleIntervalNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlobChunkMinRequestToSameOracleIntervalNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaBlobChunkResponseTimeoutNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlobChunkResponseTimeoutNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaBlobOfferMinRequestToSameOracleIntervalNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlobOfferMinRequestToSameOracleIntervalNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaBlobOfferResponseTimeoutNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlobOfferResponseTimeoutNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaBlockSyncMinRequestToSameOracleIntervalNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlockSyncMinRequestToSameOracleIntervalNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaBlockSyncResponseTimeoutNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaBlockSyncResponseTimeoutNanoseconds() 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) GetDeltaReportsPlusPrecursorRequestNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaReportsPlusPrecursorRequestNanoseconds() 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) GetDeltaStateSyncSummaryIntervalNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaStateSyncSummaryIntervalNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaTreeSyncMinRequestToSameOracleIntervalNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaTreeSyncMinRequestToSameOracleIntervalNanoseconds() uint64
func (*OffchainConfigProto) GetDeltaTreeSyncResponseTimeoutNanoseconds ¶
func (x *OffchainConfigProto) GetDeltaTreeSyncResponseTimeoutNanoseconds() uint64
func (*OffchainConfigProto) GetMaxBlocksPerBlockSyncResponse ¶
func (x *OffchainConfigProto) GetMaxBlocksPerBlockSyncResponse() uint32
func (*OffchainConfigProto) GetMaxDurationInitializationNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationInitializationNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationShouldAcceptAttestedReportNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationShouldAcceptAttestedReportNanoseconds() uint64
func (*OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds ¶
func (x *OffchainConfigProto) GetMaxDurationShouldTransmitAcceptedReportNanoseconds() uint64
func (*OffchainConfigProto) GetMaxHistoricalSnapshotsRetained ¶
func (x *OffchainConfigProto) GetMaxHistoricalSnapshotsRetained() uint64
func (*OffchainConfigProto) GetMaxParallelRequestedBlocks ¶
func (x *OffchainConfigProto) GetMaxParallelRequestedBlocks() uint64
func (*OffchainConfigProto) GetMaxParallelTreeSyncChunkFetches ¶
func (x *OffchainConfigProto) GetMaxParallelTreeSyncChunkFetches() uint32
func (*OffchainConfigProto) GetMaxTreeSyncChunkKeys ¶
func (x *OffchainConfigProto) GetMaxTreeSyncChunkKeys() uint32
func (*OffchainConfigProto) GetMaxTreeSyncChunkKeysPlusValuesBytes ¶
func (x *OffchainConfigProto) GetMaxTreeSyncChunkKeysPlusValuesBytes() uint32
func (*OffchainConfigProto) GetOffchainPublicKeys ¶
func (x *OffchainConfigProto) GetOffchainPublicKeys() [][]byte
func (*OffchainConfigProto) GetPeerIds ¶
func (x *OffchainConfigProto) GetPeerIds() []string
func (*OffchainConfigProto) GetPrevConfigDigest ¶
func (x *OffchainConfigProto) GetPrevConfigDigest() []byte
func (*OffchainConfigProto) GetPrevHistoryDigest ¶
func (x *OffchainConfigProto) GetPrevHistoryDigest() []byte
func (*OffchainConfigProto) GetPrevSeqNr ¶
func (x *OffchainConfigProto) GetPrevSeqNr() uint64
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) GetSnapshotInterval ¶
func (x *OffchainConfigProto) GetSnapshotInterval() uint64
func (*OffchainConfigProto) GetWarnDurationCommittedNanoseconds ¶
func (x *OffchainConfigProto) GetWarnDurationCommittedNanoseconds() uint64
func (*OffchainConfigProto) GetWarnDurationObservationNanoseconds ¶
func (x *OffchainConfigProto) GetWarnDurationObservationNanoseconds() uint64
func (*OffchainConfigProto) GetWarnDurationObservationQuorumNanoseconds ¶
func (x *OffchainConfigProto) GetWarnDurationObservationQuorumNanoseconds() uint64
func (*OffchainConfigProto) GetWarnDurationQueryNanoseconds ¶
func (x *OffchainConfigProto) GetWarnDurationQueryNanoseconds() uint64
func (*OffchainConfigProto) GetWarnDurationStateTransitionNanoseconds ¶
func (x *OffchainConfigProto) GetWarnDurationStateTransitionNanoseconds() uint64
func (*OffchainConfigProto) GetWarnDurationValidateObservationNanoseconds ¶
func (x *OffchainConfigProto) GetWarnDurationValidateObservationNanoseconds() uint64
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 messages should be
// resent, allowing oracles that had crashed and are recovering to rejoin
// the protocol more quickly.
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 and higher versions (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
// DeltaReportsPlusPrecursorRequest determines the duration between requests for
// reports plus precursor after we have received f+1 signatures in the report
// attestation protocol but are still missing the reports plus precursor
// required for validating the report signatures.
DeltaReportsPlusPrecursorRequest *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
// DeltaStateSyncSummaryInterval defines how frequently an oracle
// broadcasts a summary of its current state for synchronization purposes.
DeltaStateSyncSummaryInterval *time.Duration
// DeltaBlockSyncMinRequestToSameOracleInterval specifies the minimum
// duration between two consecutive block synchronization requests
// sent to the same oracle.
DeltaBlockSyncMinRequestToSameOracleInterval *time.Duration
// DeltaBlockSyncResponseTimeout specifies the maximum time to wait
// for a response to a specific block synchronization request.
// If no response is received within this duration,
// the protocol retries with another oracle.
DeltaBlockSyncResponseTimeout *time.Duration
// MaxBlocksPerBlockSyncResponse defines the maximum number of blocks
// that can be included in a single block synchronization response.
MaxBlocksPerBlockSyncResponse *int
// MaxParallelRequestedBlocks upper bounds the number of blocks being
// requested in parallel. Multiple blocks might be fetched as part of a one
// request.
MaxParallelRequestedBlocks *uint64
// DeltaTreeSyncMinRequestToSameOracleInterval specifies the minimum
// duration between two consecutive requests for tree synchronization
// sent to the same oracle.
DeltaTreeSyncMinRequestToSameOracleInterval *time.Duration
// DeltaTreeSyncResponseTimeout specifies the maximum amount of time to
// wait for a response to a specific tree synchronization request.
// If no response is received within this duration,
// the protocol retries with another oracle.
DeltaTreeSyncResponseTimeout *time.Duration
// MaxTreeSyncChunkKeys defines the maximum number of key-value pairs
// that an oracle includes in a single tree synchronization response chunk.
MaxTreeSyncChunkKeys *int
// MaxTreeSyncChunkKeysPlusValuesBytes defines the maximum combined
// size (in bytes) of all keys and values in a single tree
// synchronization response chunk.
// The protocol ensures that each chunk includes as many key-value pairs
// as possible without exceeding either this byte-size limit or
// MaxTreeSyncChunkKeys.
// A chunk must always fit at least one maximally sized (using maxmax)
// key-value pair.
MaxTreeSyncChunkKeysPlusValuesBytes *int
// MaxParallelTreeSyncChunkFetches defines the maximum number of tree
// synchronization requests that can be performed in parallel.
MaxParallelTreeSyncChunkFetches *int
// === Snapshotting ===
// SnapshotInterval is defined such that the committed sequence number of
// any snapshot must be a multiple of SnapshotInterval. Decreasing this
// value increases the max historical snapshots retained.
SnapshotInterval *uint64
// MaxHistoricalSnapshotsRetained defines how many complete historical
// snapshots are retained. Retained snapshots enable other oracles to
// synchronize against the committed state from previous snapshot sequence
// numbers. All blocks from the highest block of the earliest retained
// snapshot onward will be kept available for synchronization purposes.
MaxHistoricalSnapshotsRetained *uint64
// === Blob Synchronization ===
//
// DeltaBlobOfferMinRequestToSameOracleInterval defines the minimum
// duration between two consecutive blob offer requests sent to the same
// oracle.
DeltaBlobOfferMinRequestToSameOracleInterval *time.Duration
// DeltaBlobOfferResponseTimeout specifies the maximum duration to wait
// for a response to a blob offer before resending the blob offer.
DeltaBlobOfferResponseTimeout *time.Duration
// DeltaBlobBroadcastGrace defines the additional grace period to wait
// after receiving the minimum number of accepting blob offer responses.
// This allows more oracles a final opportunity to be included in the
// availability certificate.
DeltaBlobBroadcastGrace *time.Duration
// DeltaBlobChunkMinRequestToSameOracleInterval defines the minimum
// duration between two consecutive blob chunk requests sent to the same
// oracle.
DeltaBlobChunkMinRequestToSameOracleInterval *time.Duration
// DeltaBlobChunkResponseTimeout specifies the maximum duration to wait
// for a blob chunk response. If no response is received within this
// time, the protocol retries with another oracle.
DeltaBlobChunkResponseTimeout *time.Duration
// BlobChunkBytes defines the size of blob chunks in bytes.
BlobChunkBytes *int
// 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).
//
// It is recommended to have sum(S) >= n to ensure all oracles are
// included as transmitters.
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
// WarnDurationQuery and WarnDurationObservation has changed since these
// values were first introduced. Unlike the other MaxDurationX values,
// exceeding WarnDurationQuery and WarnDurationObservation 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
// WarnDurationObservation to set context timeouts.
MaxDurationInitialization time.Duration // Context deadline passed to NewReportingPlugin.
WarnDurationQuery time.Duration // If the Query function takes longer than this, a warning will be logged.
WarnDurationObservation time.Duration // If the Observation function takes longer than this, a warning will be logged.
WarnDurationValidateObservation time.Duration // If the ValidateObservation function takes longer than this, a warning will be logged.
WarnDurationObservationQuorum time.Duration // If the ObservationQuorum function takes longer than this, a warning will be logged.
WarnDurationStateTransition time.Duration // If the StateTransition function takes longer than this, a warning will be logged.
WarnDurationCommitted time.Duration // If the Committed 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.
// PrevConfigDigest is the config digest of the previous instance that this
// next instance is a continuation of. The previous instance must overlap in
// at least one oracle with the next instance, though larger overlaps are
// highly encouraged and will improve the initial synchronization
// performance.
//
// WARNING! This is an advanced feature and should only be used if you
// *really* know what you are doing. Failure to set this or any of the other
// Prev fields correctly will result in the instance not making any
// progress or data loss.
PrevConfigDigest *types.ConfigDigest
// PrevSeqNr is the sequence number of the previous instance that this next
// instance will continue from. Sequence numbers in the next instance will
// continue from PrevSeqNr. This must be a snapshot sequence number for the
// previous instance, i.e., PrevSeqNr % PrevInstanceConfig.SnapshotInterval
// == 0. The overlapping oracle must have locally committed the state as of
// PrevSeqNr and the snapshot associated with PrevSeqNr must be in the
// retention window implied by
// PrevInstanceConfig.MaxHistoricalSnapshotsRetained and
// PrevInstanceConfig.SnapshotInterval. (For instances whose previous
// instance already has a PrevSeqNr, this imples PrevSeqNr >
// PrevInstanceConfig.PrevSeqNr.)
//
// Be aware that any state transitions committed after PrevSeqNr in the
// previous instance will not be available in the next instance (and
// typically be lost forever).
//
// WARNING! This is an advanced feature and should only be used if you
// *really* know what you are doing. Failure to set this or any of the other
// Prev fields correctly will result in the instance not making any
// progress or data loss.
PrevSeqNr *uint64
// PrevHistoryDigest is the history digest of the previous instance at
// PrevSeqNr.
//
// WARNING! This is an advanced feature and should only be used if you
// *really* know what you are doing. Failure to set this or any of the other
// Prev fields correctly will result in the instance not making any
// progress or data loss.
PrevHistoryDigest *types.HistoryDigest
// 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. The various parameters (e.g. Delta*, MaxDuration*) have some dependencies on each other, so be sure to consider the holistic impact of changes to them.
func PublicConfigFromContractConfig ¶
func PublicConfigFromContractConfig(skipInsaneForProductionChecks bool, change types.ContractConfig) (PublicConfig, error)
func (*PublicConfig) ByzQuorumSize ¶
func (c *PublicConfig) ByzQuorumSize() int
func (*PublicConfig) CheckParameterBounds ¶
func (c *PublicConfig) CheckParameterBounds() error
func (*PublicConfig) GetBlobChunkBytes ¶
func (c *PublicConfig) GetBlobChunkBytes() int
func (*PublicConfig) GetDeltaBlobBroadcastGrace ¶
func (c *PublicConfig) GetDeltaBlobBroadcastGrace() time.Duration
func (*PublicConfig) GetDeltaBlobChunkMinRequestToSameOracleInterval ¶
func (c *PublicConfig) GetDeltaBlobChunkMinRequestToSameOracleInterval() time.Duration
func (*PublicConfig) GetDeltaBlobChunkResponseTimeout ¶
func (c *PublicConfig) GetDeltaBlobChunkResponseTimeout() time.Duration
func (*PublicConfig) GetDeltaBlobOfferMinRequestToSameOracleInterval ¶
func (c *PublicConfig) GetDeltaBlobOfferMinRequestToSameOracleInterval() time.Duration
func (*PublicConfig) GetDeltaBlobOfferResponseTimeout ¶
func (c *PublicConfig) GetDeltaBlobOfferResponseTimeout() time.Duration
func (*PublicConfig) GetDeltaBlockSyncMinRequestToSameOracleInterval ¶
func (c *PublicConfig) GetDeltaBlockSyncMinRequestToSameOracleInterval() time.Duration
func (*PublicConfig) GetDeltaBlockSyncResponseTimeout ¶
func (c *PublicConfig) GetDeltaBlockSyncResponseTimeout() time.Duration
func (*PublicConfig) GetDeltaInitial ¶
func (c *PublicConfig) GetDeltaInitial() time.Duration
func (*PublicConfig) GetDeltaReportsPlusPrecursorRequest ¶
func (c *PublicConfig) GetDeltaReportsPlusPrecursorRequest() time.Duration
func (*PublicConfig) GetDeltaResend ¶
func (c *PublicConfig) GetDeltaResend() time.Duration
func (*PublicConfig) GetDeltaStateSyncSummaryInterval ¶
func (c *PublicConfig) GetDeltaStateSyncSummaryInterval() time.Duration
func (*PublicConfig) GetDeltaTreeSyncMinRequestToSameOracleInterval ¶
func (c *PublicConfig) GetDeltaTreeSyncMinRequestToSameOracleInterval() time.Duration
func (*PublicConfig) GetDeltaTreeSyncResponseTimeout ¶
func (c *PublicConfig) GetDeltaTreeSyncResponseTimeout() time.Duration
func (*PublicConfig) GetMaxBlocksPerBlockSyncResponse ¶
func (c *PublicConfig) GetMaxBlocksPerBlockSyncResponse() int
func (*PublicConfig) GetMaxHistoricalSnapshotsRetained ¶
func (c *PublicConfig) GetMaxHistoricalSnapshotsRetained() uint64
func (*PublicConfig) GetMaxParallelRequestedBlocks ¶
func (c *PublicConfig) GetMaxParallelRequestedBlocks() uint64
func (*PublicConfig) GetMaxParallelTreeSyncChunkFetches ¶
func (c *PublicConfig) GetMaxParallelTreeSyncChunkFetches() int
func (*PublicConfig) GetMaxTreeSyncChunkKeys ¶
func (c *PublicConfig) GetMaxTreeSyncChunkKeys() int
func (*PublicConfig) GetMaxTreeSyncChunkKeysPlusValuesBytes ¶
func (c *PublicConfig) GetMaxTreeSyncChunkKeysPlusValuesBytes() int
func (*PublicConfig) GetPrevFields ¶
func (c *PublicConfig) GetPrevFields() (PublicConfigPrevFields, bool)
func (*PublicConfig) GetSnapshotInterval ¶
func (c *PublicConfig) GetSnapshotInterval() uint64
func (*PublicConfig) MinRoundInterval ¶
func (c *PublicConfig) MinRoundInterval() time.Duration
The minimum interval between round starts. This is not a guaranteed lower bound. For example, a malicious leader could violate this bound.
func (*PublicConfig) N ¶
func (c *PublicConfig) N() int
N is the number of oracles participating in the protocol
type PublicConfigMetrics ¶
type PublicConfigMetrics struct {
// contains filtered or unexported fields
}
func NewPublicConfigMetrics ¶
func NewPublicConfigMetrics( registerer prometheus.Registerer, logger commontypes.Logger, publicConfig PublicConfig, ) *PublicConfigMetrics
func (*PublicConfigMetrics) Close ¶
func (pm *PublicConfigMetrics) Close()
type PublicConfigPrevFields ¶
type PublicConfigPrevFields struct {
PrevConfigDigest types.ConfigDigest
PrevSeqNr uint64
PrevHistoryDigest types.HistoryDigest
}
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]( skipInsaneForProductionChecks bool, change types.ContractConfig, offchainKeyring types.OffchainKeyring, onchainKeyring ocr3types.OnchainKeyring2[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