Documentation ¶
Index ¶
- func GenUserAgent(sk *rsa.PrivateKey) string
- func GenUserAgentWithOperatorID(oid string) string
- func New() forks.Fork
- type ForkV0
- func (v0 *ForkV0) AddOptions(opts []libp2p.Option) []libp2p.Option
- func (v0 *ForkV0) DecidedTopic() string
- func (v0 *ForkV0) DecodeNetworkMsg(data []byte) (*message.SSVMessage, error)
- func (f *ForkV0) DecorateNode(node *enode.LocalNode, args map[string]interface{}) error
- func (v0 *ForkV0) EncodeNetworkMsg(msg *message.SSVMessage) ([]byte, error)
- func (v0 *ForkV0) GetTopicBaseName(topicName string) string
- func (v0 *ForkV0) GetTopicFullName(baseName string) string
- func (v0 *ForkV0) MsgID() forks.MsgIDFunc
- func (v0 *ForkV0) ProtocolID(prot p2pprotocol.SyncProtocol) (protocol.ID, int)
- func (v0 *ForkV0) Subnets() int64
- func (v0 *ForkV0) ValidatorTopicID(pkByts []byte) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenUserAgent ¶ added in v0.2.0
func GenUserAgent(sk *rsa.PrivateKey) string
GenUserAgent creates user agent string (<app-name>:<version>:<type>:<operator-id>)
func GenUserAgentWithOperatorID ¶ added in v0.2.0
GenUserAgentWithOperatorID returns user agent string (<app-name>:<version>:<type>:<operator-id>) based on the given operator id
Types ¶
type ForkV0 ¶
type ForkV0 struct { }
ForkV0 is the genesis version 0 implementation
func (*ForkV0) AddOptions ¶ added in v0.2.0
func (v0 *ForkV0) AddOptions(opts []libp2p.Option) []libp2p.Option
AddOptions implementation
func (*ForkV0) DecidedTopic ¶ added in v0.2.0
DecidedTopic implements forks.Fork, for v0 there is no decided topic
func (*ForkV0) DecodeNetworkMsg ¶
func (v0 *ForkV0) DecodeNetworkMsg(data []byte) (*message.SSVMessage, error)
DecodeNetworkMsg decodes network message and converts it to v1
func (*ForkV0) DecorateNode ¶ added in v0.2.0
DecorateNode decorates the given node's record with version specific fields
func (*ForkV0) EncodeNetworkMsg ¶
func (v0 *ForkV0) EncodeNetworkMsg(msg *message.SSVMessage) ([]byte, error)
EncodeNetworkMsg converts the message to v0 and encodes it
func (*ForkV0) GetTopicBaseName ¶ added in v0.2.0
GetTopicBaseName return the base topic name of the topic, w/o ssv prefix
func (*ForkV0) GetTopicFullName ¶ added in v0.2.0
GetTopicFullName returns the topic full name, including prefix
func (*ForkV0) MsgID ¶ added in v0.2.0
MsgID in v0 is nil as we use the default msg_id function by libp2p
func (*ForkV0) ProtocolID ¶ added in v0.2.0
func (v0 *ForkV0) ProtocolID(prot p2pprotocol.SyncProtocol) (protocol.ID, int)
ProtocolID returns the protocol id of the given protocol, and the amount of peers for distribution
func (*ForkV0) ValidatorTopicID ¶
ValidatorTopicID - genesis version 0