Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconApp ¶
type BeaconApp struct {
// contains filtered or unexported fields
}
BeaconApp contains all the high level states and workflow for P2P module
func NewBeaconApp ¶
NewBeaconApp creates a new instance of BeaconApp
func (*BeaconApp) GetHostNode ¶
GetHostNode gets the host node
func (*BeaconApp) WaitForConnections ¶
WaitForConnections waits until beacon app is connected
type ChainConfig ¶ added in v0.2.4
type ChainConfig struct {
GenesisTime uint64
BootstrapPeers []string
NetworkID string
InitialValidators InitialValidatorList
}
ChainConfig is the JSON encoded information about the network.
type Config ¶
type Config struct {
RPCProto string
RPCAddress string
DataDirectory string
NetworkConfig *config.Config
Resync bool
IsIntegrationTest bool
InitialSyncConnections int
ListeningAddress string
MinPeerCountToWait int
HeartBeatInterval time.Duration
TimeOutInterval time.Duration
MaxPeers int
// These options are filled in through the chain file.
GenesisTime uint64
InitialValidatorList []beacon.InitialValidatorEntry
DiscoveryOptions p2p.DiscoveryOptions
}
Config is the config of an BeaconApp
func GenerateConfigFromChainConfig ¶ added in v0.2.4
func GenerateConfigFromChainConfig(chainConfig ChainConfig) (*Config, error)
GenerateConfigFromChainConfig generates a new config from the passed in network config which should be loaded from a JSON file.
type InitialValidatorInformation ¶ added in v0.2.4
type InitialValidatorInformation struct {
PubKey string
ProofOfPossession string
WithdrawalShard uint32
WithdrawalCredentials string
DepositSize uint64
ID uint32
}
InitialValidatorInformation is the encoded information from the JSON file of an initial validator.
type InitialValidatorList ¶ added in v0.2.4
type InitialValidatorList struct {
NumValidators int
Validators []InitialValidatorInformation
}
InitialValidatorList is a list of initial validators and the number of validators
Click to show internal directories.
Click to hide internal directories.