history

package
v1.15.10 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: GPL-3.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrunePoints = map[common.Hash]*PrunePoint{

	params.MainnetGenesisHash: {
		BlockNumber: 15537393,
		BlockHash:   common.HexToHash("0x55b11b918355b1ef9c5db810302ebad0bf2544255b530cdce90674d5887bb286"),
	},

	params.SepoliaGenesisHash: {
		BlockNumber: 1450409,
		BlockHash:   common.HexToHash("0x229f6b18ca1552f1d5146deceb5387333f40dc6275aebee3f2c5c4ece07d02db"),
	},
}

PrunePoints the pre-defined history pruning cutoff blocks for known networks. They point to the first post-merge block. Any pruning should truncate *up to* but excluding given block.

Functions

This section is empty.

Types

type HistoryMode

type HistoryMode uint32

HistoryMode configures history pruning.

const (
	// KeepAll (default) means that all chain history down to genesis block will be kept.
	KeepAll HistoryMode = iota

	// KeepPostMerge sets the history pruning point to the merge activation block.
	KeepPostMerge
)

func (HistoryMode) IsValid

func (m HistoryMode) IsValid() bool

func (HistoryMode) MarshalText

func (m HistoryMode) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (HistoryMode) String

func (m HistoryMode) String() string

func (*HistoryMode) UnmarshalText

func (m *HistoryMode) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type PrunePoint

type PrunePoint struct {
	BlockNumber uint64
	BlockHash   common.Hash
}

type PrunedHistoryError

type PrunedHistoryError struct{}

PrunedHistoryError is returned by APIs when the requested history is pruned.

func (*PrunedHistoryError) Error

func (e *PrunedHistoryError) Error() string

func (*PrunedHistoryError) ErrorCode

func (e *PrunedHistoryError) ErrorCode() int

Jump to

Keyboard shortcuts

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