v0

package
v0.2.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

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

func GenUserAgentWithOperatorID(oid string) string

GenUserAgentWithOperatorID returns user agent string (<app-name>:<version>:<type>:<operator-id>) based on the given operator id

func New

func New() forks.Fork

New returns an instance of ForkV0

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

func (v0 *ForkV0) DecidedTopic() string

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

func (f *ForkV0) DecorateNode(node *enode.LocalNode, args map[string]interface{}) error

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

func (v0 *ForkV0) GetTopicBaseName(topicName string) string

GetTopicBaseName return the base topic name of the topic, w/o ssv prefix

func (*ForkV0) GetTopicFullName added in v0.2.0

func (v0 *ForkV0) GetTopicFullName(baseName string) string

GetTopicFullName returns the topic full name, including prefix

func (*ForkV0) MsgID added in v0.2.0

func (v0 *ForkV0) MsgID() forks.MsgIDFunc

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) Subnets added in v0.2.0

func (v0 *ForkV0) Subnets() int64

Subnets returns the subnets count for this fork

func (*ForkV0) ValidatorTopicID

func (v0 *ForkV0) ValidatorTopicID(pkByts []byte) []string

ValidatorTopicID - genesis version 0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL