beacon_indicies

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBlockRootToParentRootsIndex

func AddBlockRootToParentRootsIndex(tx kv.RwTx, parentRoot, blockRoot libcommon.Hash) error

func MarkRootCanonical

func MarkRootCanonical(ctx context.Context, tx kv.RwTx, slot uint64, blockRoot libcommon.Hash) error

func PruneBlockRoots

func PruneBlockRoots(ctx context.Context, tx kv.RwTx, fromSlot, toSlot uint64) error

func PruneBlocks

func PruneBlocks(ctx context.Context, tx kv.RwTx, to uint64) error

func PruneSignedHeaders

func PruneSignedHeaders(tx kv.RwTx, from uint64) error

func RangeBlockRoots

func RangeBlockRoots(ctx context.Context, tx kv.Tx, fromSlot, toSlot uint64, fn func(slot uint64, beaconBlockRoot libcommon.Hash) bool) error

func ReadBeaconBlockRootsInSlotRange

func ReadBeaconBlockRootsInSlotRange(ctx context.Context, tx kv.Tx, fromSlot, count uint64) ([]libcommon.Hash, []uint64, error)

func ReadBlockRootByStateRoot

func ReadBlockRootByStateRoot(tx kv.Tx, stateRoot libcommon.Hash) (libcommon.Hash, error)

func ReadBlockRootsByParentRoot

func ReadBlockRootsByParentRoot(tx kv.Tx, parentRoot libcommon.Hash) ([]libcommon.Hash, error)

func ReadBlockSlotByBlockRoot

func ReadBlockSlotByBlockRoot(tx kv.Tx, blockRoot libcommon.Hash) (*uint64, error)

func ReadCanonicalBlockRoot

func ReadCanonicalBlockRoot(tx kv.Tx, slot uint64) (libcommon.Hash, error)

func ReadExecutionBlockHash

func ReadExecutionBlockHash(tx kv.Tx, blockRoot libcommon.Hash) (libcommon.Hash, error)

func ReadExecutionBlockNumber

func ReadExecutionBlockNumber(tx kv.Tx, blockRoot libcommon.Hash) (*uint64, error)

func ReadHighestFinalized

func ReadHighestFinalized(tx kv.Tx) (uint64, error)

func ReadLastBeaconSnapshot

func ReadLastBeaconSnapshot(tx kv.Tx) (uint64, error)

func ReadParentBlockRoot

func ReadParentBlockRoot(ctx context.Context, tx kv.Tx, blockRoot libcommon.Hash) (libcommon.Hash, error)

func ReadSignedHeaderByBlockRoot

func ReadSignedHeaderByBlockRoot(ctx context.Context, tx kv.Tx, blockRoot libcommon.Hash) (*cltypes.SignedBeaconBlockHeader, bool, error)

func ReadStateRootByBlockRoot

func ReadStateRootByBlockRoot(ctx context.Context, tx kv.Tx, blockRoot libcommon.Hash) (libcommon.Hash, error)

func TruncateCanonicalChain

func TruncateCanonicalChain(ctx context.Context, tx kv.RwTx, slot uint64) error

func WriteBeaconBlock

func WriteBeaconBlock(ctx context.Context, tx kv.RwTx, block *cltypes.SignedBeaconBlock) error

func WriteBeaconBlockAndIndicies

func WriteBeaconBlockAndIndicies(ctx context.Context, tx kv.RwTx, block *cltypes.SignedBeaconBlock, canonical bool) error

func WriteBeaconBlockHeader

func WriteBeaconBlockHeader(ctx context.Context, tx kv.RwTx, signedHeader *cltypes.SignedBeaconBlockHeader) error

func WriteBeaconBlockHeaderAndIndicies

func WriteBeaconBlockHeaderAndIndicies(ctx context.Context, tx kv.RwTx, signedHeader *cltypes.SignedBeaconBlockHeader, forceCanonical bool) error

func WriteExecutionBlockHash

func WriteExecutionBlockHash(tx kv.RwTx, blockRoot, blockHash libcommon.Hash) error

func WriteExecutionBlockNumber

func WriteExecutionBlockNumber(tx kv.RwTx, blockRoot libcommon.Hash, blockNumber uint64) error

func WriteHeaderSlot

func WriteHeaderSlot(tx kv.RwTx, blockRoot libcommon.Hash, slot uint64) error

WriteHeaderSlot writes the slot associated with a block root.

func WriteHighestFinalized

func WriteHighestFinalized(tx kv.RwTx, slot uint64) error

func WriteLastBeaconSnapshot

func WriteLastBeaconSnapshot(tx kv.RwTx, slot uint64) error

func WriteParentBlockRoot

func WriteParentBlockRoot(ctx context.Context, tx kv.RwTx, blockRoot, parentRoot libcommon.Hash) error

func WriteStateRoot

func WriteStateRoot(tx kv.RwTx, blockRoot libcommon.Hash, stateRoot libcommon.Hash) error

WriteStateRoot writes the slot associated with a block root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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