Documentation ¶
Index ¶
- Constants
- func SignStateRootUpdateMessage(blsKeypair *bls.KeyPair, ...) (*bls.Signature, error)
- type Attestor
- type Attestorer
- type BlockPredicate
- type EventListener
- type Notifier
- type SelectiveEventListener
- func (l *SelectiveEventListener) ObserveInitializationInitialBlockNumber(rollupId uint32, blockNumber uint64)
- func (l *SelectiveEventListener) ObserveLastBlockReceived(rollupId uint32, blockNumber uint64)
- func (l *SelectiveEventListener) ObserveLastBlockReceivedTimestamp(rollupId uint32, timestamp uint64)
- func (l *SelectiveEventListener) OnBlockMismatch(rollupId uint32)
- func (l *SelectiveEventListener) OnBlockReceived(rollupId uint32)
- func (l *SelectiveEventListener) OnMissedMQBlock(rollupId uint32)
Constants ¶
View Source
const ( MQ_WAIT_TIMEOUT = 30 * time.Second MQ_REBROADCAST_TIMEOUT = 15 * time.Second )
View Source
const AttestorSubsystem = "attestor"
View Source
const OperatorNamespace = "sffl_operator"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attestor ¶
type Attestor struct {
// contains filtered or unexported fields
}
Attestor subscribes for RPCs block updates Also subscribes for MQ blocks from Consumer Each block from RPC waits for MQ_WAIT_TIMEOUT for MQ block In case same block doesn't arrive from MQ block is signed and sent If it arrives it is compared and then sent to Aggregator
func NewAttestor ¶
func NewAttestor(config *optypes.NodeConfig, blsKeypair *bls.KeyPair, operatorId eigentypes.OperatorId, registry *prometheus.Registry, logger sdklogging.Logger) (*Attestor, error)
func (*Attestor) EnableMetrics ¶
func (attestor *Attestor) EnableMetrics(registry *prometheus.Registry) error
func (*Attestor) GetSignedRootC ¶
func (attestor *Attestor) GetSignedRootC() <-chan messages.SignedStateRootUpdateMessage
type Attestorer ¶
type Attestorer interface { core.Metricable Start(ctx context.Context) error Close() error GetSignedRootC() <-chan messages.SignedStateRootUpdateMessage }
type BlockPredicate ¶
type EventListener ¶
type EventListener interface { OnMissedMQBlock(rollupId uint32) OnBlockMismatch(rollupId uint32) OnBlockReceived(rollupId uint32) ObserveLastBlockReceived(rollupId uint32, blockNumber uint64) ObserveLastBlockReceivedTimestamp(rollupId uint32, timestamp uint64) ObserveInitializationInitialBlockNumber(rollupId uint32, blockNumber uint64) }
func MakeAttestorMetrics ¶
func MakeAttestorMetrics(registry *prometheus.Registry) (EventListener, error)
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier Broadcasts block from some rollup to subscribers
func NewNotifier ¶
func NewNotifier() Notifier
type SelectiveEventListener ¶
type SelectiveEventListener struct { OnMissedMQBlockCb func(rollupId uint32) OnBlockMismatchCb func(rollupId uint32) OnBlockReceivedCb func(rollupId uint32) ObserveLastBlockReceivedCb func(rollupId uint32, blockNumber uint64) ObserveLastBlockReceivedTimestampCb func(rollupId uint32, timestamp uint64) ObserveInitializationInitialBlockNumberCb func(rollupId uint32, blockNumber uint64) }
func (*SelectiveEventListener) ObserveInitializationInitialBlockNumber ¶
func (l *SelectiveEventListener) ObserveInitializationInitialBlockNumber(rollupId uint32, blockNumber uint64)
func (*SelectiveEventListener) ObserveLastBlockReceived ¶
func (l *SelectiveEventListener) ObserveLastBlockReceived(rollupId uint32, blockNumber uint64)
func (*SelectiveEventListener) ObserveLastBlockReceivedTimestamp ¶
func (l *SelectiveEventListener) ObserveLastBlockReceivedTimestamp(rollupId uint32, timestamp uint64)
func (*SelectiveEventListener) OnBlockMismatch ¶
func (l *SelectiveEventListener) OnBlockMismatch(rollupId uint32)
func (*SelectiveEventListener) OnBlockReceived ¶
func (l *SelectiveEventListener) OnBlockReceived(rollupId uint32)
func (*SelectiveEventListener) OnMissedMQBlock ¶
func (l *SelectiveEventListener) OnMissedMQBlock(rollupId uint32)
Click to show internal directories.
Click to hide internal directories.