Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInitializer ¶
type APIInitializer struct {
// contains filtered or unexported fields
}
APIInitializer manages initializing the genesis state and block to prepare the beacon node for syncing. The genesis state is retrieved from the remote beacon node api, using the debug state retrieval endpoint.
func NewAPIInitializer ¶
func NewAPIInitializer(beaconNodeHost string) (*APIInitializer, error)
NewAPIInitializer creates an APIInitializer, handling the set up of a beacon node api client using the provided host string.
func (*APIInitializer) Initialize ¶
Initialize downloads origin state and block for checkpoint sync and initializes database records to prepare the node to begin syncing from that point.
type FileInitializer ¶
type FileInitializer struct {
// contains filtered or unexported fields
}
FileInitializer initializes a beacon-node database genesis state and block using ssz-encoded state data stored in files on the local filesystem.
func NewFileInitializer ¶
func NewFileInitializer(statePath string) (*FileInitializer, error)
NewFileInitializer validates the given path information and creates an Initializer which will use the provided state and block files to prepare the node for checkpoint sync.
func (*FileInitializer) Initialize ¶
Initialize is called in the BeaconNode db startup code if an Initializer is present. Initialize prepares the beacondb using the provided genesis state.
type Initializer ¶
Initializer describes a type that is able to obtain the checkpoint sync data (BeaconState and SignedBeaconBlock) in some way and perform database setup to prepare the beacon node for syncing from the given checkpoint. See FileInitializer and APIInitializer.