beacon

package
v4.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetWeakSubjectivityResponse

type GetWeakSubjectivityResponse struct {
	Data *WeakSubjectivityData `json:"data"`
}

type Server

type Server struct {
	SyncChecker           sync.Checker
	HeadFetcher           blockchain.HeadFetcher
	TimeFetcher           blockchain.TimeFetcher
	OptimisticModeFetcher blockchain.OptimisticModeFetcher
	CanonicalHistory      *stategen.CanonicalHistory
	BeaconDB              beacondb.ReadOnlyDatabase
}

func (*Server) GetWeakSubjectivity

func (s *Server) GetWeakSubjectivity(w http.ResponseWriter, r *http.Request)

GetWeakSubjectivity computes the starting epoch of the current weak subjectivity period, and then also determines the best block root and state root to use for a Checkpoint Sync starting from that point.

type WeakSubjectivityData

type WeakSubjectivityData struct {
	WsCheckpoint *shared.Checkpoint `json:"ws_checkpoint"`
	StateRoot    string             `json:"state_root"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL