stages

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SyncMetrics = map[SyncStage]metrics.Gauge{}

Functions

func GetStageProgress

func GetStageProgress(db kv.Getter, stage SyncStage) (uint64, error)

GetStageProgress retrieves saved progress of given sync stage from the database

func GetStagePruneProgress

func GetStagePruneProgress(db kv.Getter, stage SyncStage) (uint64, error)

GetStagePruneProgress retrieves saved progress of given sync stage from the database

func SaveStageProgress

func SaveStageProgress(db kv.Putter, stage SyncStage, progress uint64) error

func SaveStagePruneProgress

func SaveStagePruneProgress(db kv.Putter, stage SyncStage, progress uint64) error

func UpdateMetrics

func UpdateMetrics(tx kv.Tx) error

UpdateMetrics - need update metrics manually because current "metrics" package doesn't support labels need to fix it in future

Types

type SyncStage

type SyncStage string

SyncStage represents the stages of syncronisation in the Mode.StagedSync mode It is used to persist the information about the stage state into the database. It should not be empty and should be unique.

var (
	Snapshots       SyncStage = "OtterSync"       // Snapshots
	Headers         SyncStage = "Headers"         // Headers are downloaded, their Proof-Of-Work validity and chaining is verified
	BorHeimdall     SyncStage = "BorHeimdall"     // Downloading data from heimdall corresponding to the downloaded headers (validator sets and sync events)
	PolygonSync     SyncStage = "PolygonSync"     // Use polygon sync component to sync headers, bodies and heimdall data
	CumulativeIndex SyncStage = "CumulativeIndex" // Calculate how much gas has been used up to each block.
	BlockHashes     SyncStage = "BlockHashes"     // Headers Number are written, fills blockHash => number bucket
	Bodies          SyncStage = "Bodies"          // Block bodies are downloaded, TxHash and UncleHash are getting verified
	Senders         SyncStage = "Senders"         // "From" recovered from signatures, bodies re-written
	Execution       SyncStage = "Execution"       // Executing each block w/o building a trie
	CustomTrace     SyncStage = "CustomTrace"     // Executing each block w/o building a trie
	Translation     SyncStage = "Translation"     // Translation each marked for translation contract (from EVM to TEVM)
	VerkleTrie      SyncStage = "VerkleTrie"
	TxLookup        SyncStage = "TxLookup" // Generating transactions lookup index
	Finish          SyncStage = "Finish"   // Nominal stage after all other stages

	MiningCreateBlock SyncStage = "MiningCreateBlock"
	MiningBorHeimdall SyncStage = "MiningBorHeimdall"
	MiningExecution   SyncStage = "MiningExecution"
	MiningFinish      SyncStage = "MiningFinish"
	// Beacon chain stages
	BeaconHistoryReconstruction SyncStage = "BeaconHistoryReconstruction" // BeaconHistoryReconstruction reconstruct missing history.
	BeaconBlocks                SyncStage = "BeaconBlocks"                // BeaconBlocks are downloaded, no verification
	BeaconState                 SyncStage = "BeaconState"                 // Beacon blocks are sent to the state transition function
	BeaconIndexes               SyncStage = "BeaconIndexes"               // Fills up Beacon indexes

)

Jump to

Keyboard shortcuts

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