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