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 beacon node using checkpoint sync, retrieving the checkpoint state and root from the remote beacon node api.
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 to use checkpoint sync, using ssz-encoded block and state data stored in files on the local filesystem.
func NewFileInitializer ¶
func NewFileInitializer(blockPath string, 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 does what is needed to prepare the beacon node database for syncing from the weak subjectivity checkpoint.
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.