snapshot_format

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBlockHeaderFromSnapshotWithExecutionData

func ReadBlockHeaderFromSnapshotWithExecutionData(r io.Reader, cfg *clparams.BeaconChainConfig) (*cltypes.SignedBeaconBlockHeader, uint64, libcommon.Hash, error)

ReadBlockHeaderFromSnapshotWithExecutionData reads the beacon block header and the EL block number and block hash.

func WriteBlockForSnapshot

func WriteBlockForSnapshot(w io.Writer, block *cltypes.SignedBeaconBlock, reusable []byte) ([]byte, error)

WriteBlockForSnapshot writes a block to the given writer in the format expected by the snapshot. buf is just a reusable buffer. if it had to grow it will be returned back as grown.

Types

type ExecutionBlockReaderByNumber

type ExecutionBlockReaderByNumber interface {
	Transactions(number uint64, hash libcommon.Hash) (*solid.TransactionsSSZ, error)
	Withdrawals(number uint64, hash libcommon.Hash) (*solid.ListSSZ[*cltypes.Withdrawal], error)
	SetBeaconChainConfig(beaconCfg *clparams.BeaconChainConfig)
}

type MockBlockReader

type MockBlockReader struct {
	Block *cltypes.Eth1Block
}

func (*MockBlockReader) SetBeaconChainConfig

func (t *MockBlockReader) SetBeaconChainConfig(*clparams.BeaconChainConfig)

func (*MockBlockReader) Transactions

func (t *MockBlockReader) Transactions(number uint64, hash libcommon.Hash) (*solid.TransactionsSSZ, error)

func (*MockBlockReader) Withdrawals

func (t *MockBlockReader) Withdrawals(number uint64, hash libcommon.Hash) (*solid.ListSSZ[*cltypes.Withdrawal], error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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