Documentation ¶
Index ¶
- Constants
- func New() forks.Fork
- type ForkV2
- func (v2 *ForkV2) AddOptions(opts []libp2p.Option) []libp2p.Option
- func (v2 *ForkV2) DecidedTopic() string
- func (v2 *ForkV2) DecodeNetworkMsg(data []byte) (*message.SSVMessage, error)
- func (f *ForkV2) DecorateNode(node *enode.LocalNode, args map[string]interface{}) error
- func (v2 *ForkV2) EncodeNetworkMsg(msg *message.SSVMessage) ([]byte, error)
- func (v2 *ForkV2) GetTopicBaseName(topicName string) string
- func (v2 *ForkV2) GetTopicFullName(baseName string) string
- func (v2 *ForkV2) MsgID() forks.MsgIDFunc
- func (v2 *ForkV2) ProtocolID(prot p2pprotocol.SyncProtocol) (protocol.ID, int)
- func (v2 *ForkV2) Subnets() int
- func (v2 *ForkV2) ValidatorSubnet(validatorPKHex string) int
- func (v2 *ForkV2) ValidatorTopicID(pkByts []byte) []string
Constants ¶
View Source
const (
// UnknownSubnet is used when a validator public key is invalid
UnknownSubnet = "unknown"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ForkV2 ¶
type ForkV2 struct { }
ForkV2 is the genesis version 0 implementation
func (*ForkV2) AddOptions ¶
func (v2 *ForkV2) AddOptions(opts []libp2p.Option) []libp2p.Option
AddOptions implementation
func (*ForkV2) DecidedTopic ¶
DecidedTopic returns decided topic name for v1
func (*ForkV2) DecodeNetworkMsg ¶
func (v2 *ForkV2) DecodeNetworkMsg(data []byte) (*message.SSVMessage, error)
DecodeNetworkMsg decodes network message
func (*ForkV2) DecorateNode ¶
DecorateNode will enrich the local node record with more entries, according to current fork
func (*ForkV2) EncodeNetworkMsg ¶
func (v2 *ForkV2) EncodeNetworkMsg(msg *message.SSVMessage) ([]byte, error)
EncodeNetworkMsg encodes network message
func (*ForkV2) GetTopicBaseName ¶
GetTopicBaseName return the base topic name of the topic, w/o ssv prefix
func (*ForkV2) GetTopicFullName ¶
GetTopicFullName returns the topic full name, including prefix
func (*ForkV2) ProtocolID ¶
func (v2 *ForkV2) ProtocolID(prot p2pprotocol.SyncProtocol) (protocol.ID, int)
ProtocolID returns the protocol id of the given protocol, and the amount of peers for distribution
func (*ForkV2) ValidatorSubnet ¶
ValidatorSubnet returns the subnet for the given validator
func (*ForkV2) ValidatorTopicID ¶
ValidatorTopicID returns the topic to use for the given validator
Click to show internal directories.
Click to hide internal directories.