db

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBPGX *pgxpool.Conn

DB is a pointer to the explorer-database

View Source
var EmbedPgsqlSchema embed.FS
View Source
var EmbedSqliteSchema embed.FS
View Source
var ReaderDb *sqlx.DB
View Source
var WriterDb *sqlx.DB

Functions

func ApplyEmbeddedDbSchema

func ApplyEmbeddedDbSchema(version int64) error

func DeletePendingFunctionSignatures added in v1.8.0

func DeletePendingFunctionSignatures(sigBytes []types.TxSignatureBytes, tx *sqlx.Tx) error

func DeleteUnfinalizedBefore

func DeleteUnfinalizedBefore(slot uint64, tx *sqlx.Tx) error

func DeleteValidatorNames

func DeleteValidatorNames(validatorNames []uint64, tx *sqlx.Tx) error

func EngineQuery

func EngineQuery(queryMap map[dbtypes.DBEngineType]string) string

func GetBlob

func GetBlob(commitment []byte, withData bool) *dbtypes.Blob

func GetBlockByRoot added in v1.7.0

func GetBlockByRoot(root []byte) *dbtypes.Block

func GetBlockOrphanedRefs

func GetBlockOrphanedRefs(blockRoots [][]byte) []*dbtypes.BlockOrphanedRef

func GetBlocks

func GetBlocks(firstBlock uint64, limit uint32, withOrphaned bool) []*dbtypes.Block

func GetBlocksByParentRoot

func GetBlocksByParentRoot(parentRoot []byte) []*dbtypes.Block

func GetBlocksForSlots

func GetBlocksForSlots(firstSlot uint64, lastSlot uint64, withOrphaned bool) []*dbtypes.Block

func GetEpochs

func GetEpochs(firstEpoch uint64, limit uint32) []*dbtypes.Epoch

func GetExplorerState

func GetExplorerState(key string, returnValue interface{}) (interface{}, error)

func GetFilteredBlocks

func GetFilteredBlocks(filter *dbtypes.BlockFilter, firstSlot uint64, offset uint64, limit uint32) []*dbtypes.AssignedBlock

func GetHighestRootBeforeSlot

func GetHighestRootBeforeSlot(slot uint64, withOrphaned bool) []byte

func GetLatestBlobAssignment added in v1.7.0

func GetLatestBlobAssignment(commitment []byte) *dbtypes.BlobAssignment

func GetOrphanedBlock

func GetOrphanedBlock(root []byte) *dbtypes.OrphanedBlock

func GetPendingFunctionSignatures added in v1.8.0

func GetPendingFunctionSignatures(limit uint64) []*dbtypes.TxPendingFunctionSignature

func GetSlotAssignment

func GetSlotAssignment(slot uint64) *dbtypes.SlotAssignment

func GetSlotAssignmentsForSlots

func GetSlotAssignmentsForSlots(firstSlot uint64, lastSlot uint64) []*dbtypes.SlotAssignment

func GetSyncAssignmentsForPeriod

func GetSyncAssignmentsForPeriod(period uint64) []uint64

func GetTxFunctionSignaturesByBytes added in v1.8.0

func GetTxFunctionSignaturesByBytes(sigBytes []types.TxSignatureBytes) []*dbtypes.TxFunctionSignature

func GetUnfinalizedBlock

func GetUnfinalizedBlock(root []byte) *dbtypes.UnfinalizedBlock

func GetUnfinalizedBlocks

func GetUnfinalizedBlocks() []*dbtypes.UnfinalizedBlock

func GetUnfinalizedEpoch

func GetUnfinalizedEpoch(epoch uint64) *dbtypes.Epoch

func GetUnknownFunctionSignatures added in v1.8.0

func GetUnknownFunctionSignatures(sigBytes []types.TxSignatureBytes) []*dbtypes.TxUnknownFunctionSignature

func GetValidatorNames

func GetValidatorNames(minIdx uint64, maxIdx uint64, tx *sqlx.Tx) []*dbtypes.ValidatorName

func InsertBlob

func InsertBlob(blob *dbtypes.Blob, tx *sqlx.Tx) error

func InsertBlobAssignment added in v1.7.0

func InsertBlobAssignment(blobAssignment *dbtypes.BlobAssignment, tx *sqlx.Tx) error

func InsertBlock

func InsertBlock(block *dbtypes.Block, tx *sqlx.Tx) error

func InsertEpoch

func InsertEpoch(epoch *dbtypes.Epoch, tx *sqlx.Tx) error

func InsertOrphanedBlock

func InsertOrphanedBlock(block *dbtypes.OrphanedBlock, tx *sqlx.Tx) error

func InsertPendingFunctionSignatures added in v1.8.0

func InsertPendingFunctionSignatures(txPendingSigs []*dbtypes.TxPendingFunctionSignature, tx *sqlx.Tx) error

func InsertSlotAssignments

func InsertSlotAssignments(slotAssignments []*dbtypes.SlotAssignment, tx *sqlx.Tx) error

func InsertSyncAssignments

func InsertSyncAssignments(syncAssignments []*dbtypes.SyncAssignment, tx *sqlx.Tx) error

func InsertTxFunctionSignature added in v1.8.0

func InsertTxFunctionSignature(txFuncSig *dbtypes.TxFunctionSignature, tx *sqlx.Tx) error

func InsertUnfinalizedBlock

func InsertUnfinalizedBlock(block *dbtypes.UnfinalizedBlock, tx *sqlx.Tx) error

func InsertUnfinalizedEpoch

func InsertUnfinalizedEpoch(epoch *dbtypes.Epoch, tx *sqlx.Tx) error

func InsertUnknownFunctionSignatures added in v1.8.0

func InsertUnknownFunctionSignatures(txUnknownSigs []*dbtypes.TxUnknownFunctionSignature, tx *sqlx.Tx) error

func InsertValidatorNames

func InsertValidatorNames(validatorNames []*dbtypes.ValidatorName, tx *sqlx.Tx) error

func IsEpochSynchronized

func IsEpochSynchronized(epoch uint64) bool

func IsSyncCommitteeSynchronized

func IsSyncCommitteeSynchronized(period uint64) bool

func MustCloseDB

func MustCloseDB()

func MustInitDB

func MustInitDB()

func SetExplorerState

func SetExplorerState(key string, value interface{}, tx *sqlx.Tx) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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