Documentation ¶
Index ¶
- Constants
- Variables
- type EventListener
- type GetAggregatedCheckpointMessagesArgs
- type RpcServer
- func (s *RpcServer) EnableMetrics(registry *prometheus.Registry) error
- func (s *RpcServer) GetAggregatedCheckpointMessages(args *GetAggregatedCheckpointMessagesArgs, reply *messages.CheckpointMessages) error
- func (s *RpcServer) GetRegistryCoordinatorAddress(_ *struct{}, reply *string) error
- func (s *RpcServer) NotifyOperatorInitialization(operatorId eigentypes.OperatorId, reply *bool) error
- func (s *RpcServer) ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse, ...) error
- func (s *RpcServer) ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage, ...) error
- func (s *RpcServer) ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage, ...) error
- func (s *RpcServer) Start() error
- type SelectiveRpcListener
- func (l *SelectiveRpcListener) IncOperatorInitializations(operatorId [32]byte)
- func (l *SelectiveRpcListener) IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool)
- func (l *SelectiveRpcListener) IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool)
- func (l *SelectiveRpcListener) IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool)
- func (l *SelectiveRpcListener) IncTotalSignedCheckpointTaskResponse()
- func (l *SelectiveRpcListener) IncTotalSignedOperatorSetUpdateMessage()
- func (l *SelectiveRpcListener) IncTotalSignedStateRootUpdateMessage()
- func (l *SelectiveRpcListener) ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string)
Constants ¶
View Source
const ( OperatorSetUpdateMessageLabel = "operator_set_update_message" StateRootUpdateMessageLabel = "state_root_update_message" CheckpointTaskResponseLabel = "checkpoint_task_response" )
View Source
const MaxCheckpointRange uint64 = 60 * 60 * 2 // 2 hours
Variables ¶
View Source
var ( TaskNotFoundError400 = errors.New("400. Task not found") OperatorNotPartOfTaskQuorum400 = errors.New("400. Operator not part of quorum") OperatorNotFoundError400 = errors.New("400. Operator not found") TaskResponseDigestNotFoundError500 = errors.New("500. Failed to get task response digest") MessageDigestNotFoundError500 = errors.New("500. Failed to get message digest") OperatorSetUpdateBlockNotFoundError500 = errors.New("500. Failed to get operator set update block") UnknownErrorWhileVerifyingSignature400 = errors.New("400. Failed to verify signature") InvalidSignatureError400 = errors.New("400. Invalid signature") CallToGetCheckSignaturesIndicesFailed500 = errors.New("500. Failed to get check signatures indices") MessageExpiredError500 = errors.New("500. Message expired") UnknownError400 = errors.New("400. Unknown error") )
Functions ¶
This section is empty.
Types ¶
type EventListener ¶
type EventListener interface { IncOperatorInitializations(operatorId [32]byte) IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool) IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool) IncTotalSignedCheckpointTaskResponse() IncTotalSignedStateRootUpdateMessage() IncTotalSignedOperatorSetUpdateMessage() ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string) }
func MakeRpcServerMetrics ¶
func MakeRpcServerMetrics(registry *prometheus.Registry) (EventListener, error)
type GetAggregatedCheckpointMessagesArgs ¶
type GetAggregatedCheckpointMessagesArgs struct {
FromTimestamp, ToTimestamp uint64
}
func (*GetAggregatedCheckpointMessagesArgs) IsValid ¶
func (args *GetAggregatedCheckpointMessagesArgs) IsValid() error
type RpcServer ¶
type RpcServer struct {
// contains filtered or unexported fields
}
func NewRpcServer ¶
func NewRpcServer(serverIpPortAddr string, app aggregator.RpcAggregatorer, logger logging.Logger) *RpcServer
func (*RpcServer) EnableMetrics ¶
func (s *RpcServer) EnableMetrics(registry *prometheus.Registry) error
func (*RpcServer) GetAggregatedCheckpointMessages ¶
func (s *RpcServer) GetAggregatedCheckpointMessages(args *GetAggregatedCheckpointMessagesArgs, reply *messages.CheckpointMessages) error
func (*RpcServer) GetRegistryCoordinatorAddress ¶
func (*RpcServer) NotifyOperatorInitialization ¶
func (s *RpcServer) NotifyOperatorInitialization(operatorId eigentypes.OperatorId, reply *bool) error
func (*RpcServer) ProcessSignedCheckpointTaskResponse ¶
func (s *RpcServer) ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse, reply *bool) error
rpc endpoint which is called by operator reply doesn't need to be checked. If there are no errors, the task response is accepted rpc framework forces a reply type to exist, so we put bool as a placeholder
func (*RpcServer) ProcessSignedOperatorSetUpdateMessage ¶
func (s *RpcServer) ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage, reply *bool) error
func (*RpcServer) ProcessSignedStateRootUpdateMessage ¶
func (s *RpcServer) ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage, reply *bool) error
type SelectiveRpcListener ¶
type SelectiveRpcListener struct { IncOperatorInitializationsCb func(operatorId [32]byte) IncSignedCheckpointTaskResponseCb func(operatorId [32]byte, errored, notFound bool) IncSignedStateRootUpdateMessageCb func(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) IncSignedOperatorSetUpdateMessageCb func(operatorId [32]byte, errored bool) IncTotalSignedCheckpointTaskResponseCb func() IncTotalSignedStateRootUpdateMessageCb func() IncTotalSignedOperatorSetUpdateMessageCb func() ObserveLastMessageReceivedTimeCb func(operatorId [32]byte, messageType string) }
func (*SelectiveRpcListener) IncOperatorInitializations ¶
func (l *SelectiveRpcListener) IncOperatorInitializations(operatorId [32]byte)
func (*SelectiveRpcListener) IncSignedCheckpointTaskResponse ¶
func (l *SelectiveRpcListener) IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool)
func (*SelectiveRpcListener) IncSignedOperatorSetUpdateMessage ¶
func (l *SelectiveRpcListener) IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool)
func (*SelectiveRpcListener) IncSignedStateRootUpdateMessage ¶
func (l *SelectiveRpcListener) IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool)
func (*SelectiveRpcListener) IncTotalSignedCheckpointTaskResponse ¶
func (l *SelectiveRpcListener) IncTotalSignedCheckpointTaskResponse()
func (*SelectiveRpcListener) IncTotalSignedOperatorSetUpdateMessage ¶
func (l *SelectiveRpcListener) IncTotalSignedOperatorSetUpdateMessage()
func (*SelectiveRpcListener) IncTotalSignedStateRootUpdateMessage ¶
func (l *SelectiveRpcListener) IncTotalSignedStateRootUpdateMessage()
func (*SelectiveRpcListener) ObserveLastMessageReceivedTime ¶
func (l *SelectiveRpcListener) ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string)
Click to show internal directories.
Click to hide internal directories.