Documentation ¶
Index ¶
- Constants
- func Aggregate(signedMsg *qbft.SignedMessage, s spectypes.MessageSignature) error
- func MsgTypeToString(mt spectypes.MsgType) string
- func RoleTypeFromString(rt string) spectypes.BeaconRole
- func ToMessageID(b []byte) spectypes.MessageID
- func ValidatePartialSigMsg(signedMsg *specssv.SignedPartialSignatureMessage, ...) error
- type Encoder
- type Operator
- type OperatorID
- type RoleType
- type StatusCode
- type SyncMessage
- type SyncMsgType
- type SyncParams
Constants ¶
const EntryNotFoundError = "EntryNotFoundError"
EntryNotFoundError is the error message for when an entry is not found
const (
SSVSyncMsgType spectypes.MsgType = 4
)
SSVSyncMsgType extension for spec msg type
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶ added in v0.3.0
func Aggregate(signedMsg *qbft.SignedMessage, s spectypes.MessageSignature) error
Aggregate is a utility that helps to ensure sorted signers
func MsgTypeToString ¶ added in v0.3.0
MsgTypeToString extension for spec msg type. convert spec msg type to string
func RoleTypeFromString ¶
func RoleTypeFromString(rt string) spectypes.BeaconRole
RoleTypeFromString returns RoleType from string
func ToMessageID ¶ added in v0.3.0
ToMessageID extension for spec msg id, returns spec messageID
func ValidatePartialSigMsg ¶ added in v0.3.0
func ValidatePartialSigMsg(signedMsg *specssv.SignedPartialSignatureMessage, committee []*spectypes.Operator, slot spec.Slot) error
ValidatePartialSigMsg validates the signed partial signature message | NOTE: using this code and not from spec until duty runner is implemented
Types ¶
type Encoder ¶
type Encoder interface { // Encode encodes the message Encode() ([]byte, error) // Decode decodes the message Decode(data []byte) error }
Encoder encodes or decodes the message
type Operator ¶
type Operator struct { OperatorID spectypes.OperatorID PubKey []byte }
Operator represents an SSV operator node
func (*Operator) GetID ¶
func (n *Operator) GetID() spectypes.OperatorID
GetID returns the node's ID
func (*Operator) GetPublicKey ¶
GetPublicKey returns the public key with which the node is identified with
type OperatorID ¶
type OperatorID uint64
OperatorID is a unique ID for the node, used to create shares and verify msgs
type RoleType ¶
type RoleType int
RoleType type of the validator role for a specific duty
List of roles
type StatusCode ¶
type StatusCode uint32
StatusCode is the response status code
const ( // StatusUnknown represents an unknown state StatusUnknown StatusCode = iota // StatusSuccess means the request went successfully StatusSuccess // StatusNotFound means the desired objects were not found StatusNotFound // StatusError means that the node experienced some general error StatusError // StatusBadRequest means the request was bad StatusBadRequest // StatusInternalError means that the node experienced an internal error StatusInternalError // StatusBackoff means we exceeded rate limits for the protocol StatusBackoff )
func (*StatusCode) String ¶
func (sc *StatusCode) String() string
type SyncMessage ¶
type SyncMessage struct { // Protocol is the protocol of the message // TODO: remove after v0 Protocol SyncMsgType // Params holds request parameters Params *SyncParams // Data holds the results Data []*specqbft.SignedMessage // Status is the status code of the operation Status StatusCode }
SyncMessage is the message being passed in sync operations
func (*SyncMessage) Decode ¶
func (sm *SyncMessage) Decode(data []byte) error
Decode decodes the message
func (*SyncMessage) Encode ¶
func (sm *SyncMessage) Encode() ([]byte, error)
Encode encodes the message
func (*SyncMessage) UpdateResults ¶
func (sm *SyncMessage) UpdateResults(err error, results ...*specqbft.SignedMessage)
UpdateResults updates the given sync message with results or potential error
type SyncMsgType ¶
type SyncMsgType int32
SyncMsgType represent the type of sync messages TODO: remove after v0
const ( // LastDecidedType is the last decided message type LastDecidedType SyncMsgType = iota // LastChangeRoundType is the last change round message type LastChangeRoundType // DecidedHistoryType is the decided history message type DecidedHistoryType )