db

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 18 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

Functions

func ApplyEmbeddedDbSchema

func ApplyEmbeddedDbSchema(version int64) error

func DeletePendingFunctionSignatures

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 GetDepositTxs

func GetDepositTxs(firstIndex uint64, limit uint32) []*dbtypes.DepositTx

func GetDepositTxsFiltered

func GetDepositTxsFiltered(offset uint64, limit uint32, finalizedBlock uint64, filter *dbtypes.DepositTxFilter) ([]*dbtypes.DepositTx, uint64, error)

func GetDepositsFiltered

func GetDepositsFiltered(offset uint64, limit uint32, finalizedBlock uint64, filter *dbtypes.DepositFilter) ([]*dbtypes.Deposit, uint64, error)

func GetEpochs

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

func GetExplorerState

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

func GetFilteredSlots

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

func GetHighestMevBlockSlotByRelay

func GetHighestMevBlockSlotByRelay(relayId uint8) (uint64, error)

func GetHighestRootBeforeSlot

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

func GetLatestBlobAssignment

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

func GetMevBlockByBlockHash

func GetMevBlockByBlockHash(blockHash []byte) *dbtypes.MevBlock

func GetMevBlocksFiltered

func GetMevBlocksFiltered(offset uint64, limit uint32, filter *dbtypes.MevBlockFilter) ([]*dbtypes.MevBlock, uint64, error)

func GetOrphanedBlock

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

func GetPendingFunctionSignatures

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

func GetSlashingForValidator

func GetSlashingForValidator(validator uint64) *dbtypes.Slashing

func GetSlashingsFiltered

func GetSlashingsFiltered(offset uint64, limit uint32, finalizedBlock uint64, filter *dbtypes.SlashingFilter) ([]*dbtypes.Slashing, uint64, error)

func GetSlotAssignment

func GetSlotAssignment(slot uint64) *dbtypes.SlotAssignment

func GetSlotAssignmentsForSlots

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

func GetSlotByRoot

func GetSlotByRoot(root []byte) *dbtypes.Slot

func GetSlotStatus

func GetSlotStatus(blockRoots [][]byte) []*dbtypes.BlockStatus

func GetSlots

func GetSlots(firstSlot uint64, limit uint32, withMissing bool, withOrphaned bool) []*dbtypes.AssignedSlot

func GetSlotsByBlockHash

func GetSlotsByBlockHash(blockHash []byte) []*dbtypes.Slot

func GetSlotsByParentRoot

func GetSlotsByParentRoot(parentRoot []byte) []*dbtypes.Slot

func GetSlotsRange

func GetSlotsRange(firstSlot uint64, lastSlot uint64, withMissing bool, withOrphaned bool) []*dbtypes.AssignedSlot

func GetSyncAssignmentsForPeriod

func GetSyncAssignmentsForPeriod(period uint64) []uint64

func GetTxFunctionSignaturesByBytes

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

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

func GetValidatorNames

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

func GetVoluntaryExitForValidator

func GetVoluntaryExitForValidator(validator uint64) *dbtypes.VoluntaryExit

func GetVoluntaryExitsFiltered

func GetVoluntaryExitsFiltered(offset uint64, limit uint32, finalizedBlock uint64, filter *dbtypes.VoluntaryExitFilter) ([]*dbtypes.VoluntaryExit, uint64, error)

func InsertBlob

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

func InsertBlobAssignment

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

func InsertDepositTxs

func InsertDepositTxs(depositTxs []*dbtypes.DepositTx, tx *sqlx.Tx) error

func InsertDeposits

func InsertDeposits(deposits []*dbtypes.Deposit, tx *sqlx.Tx) error

func InsertEpoch

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

func InsertMevBlocks

func InsertMevBlocks(mevBlocks []*dbtypes.MevBlock, tx *sqlx.Tx) error

func InsertMissingSlot

func InsertMissingSlot(block *dbtypes.SlotHeader, tx *sqlx.Tx) error

func InsertOrphanedBlock

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

func InsertPendingFunctionSignatures

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

func InsertSlashings

func InsertSlashings(slashings []*dbtypes.Slashing, tx *sqlx.Tx) error

func InsertSlot

func InsertSlot(slot *dbtypes.Slot, 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

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

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

func InsertValidatorNames

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

func InsertVoluntaryExits

func InsertVoluntaryExits(voluntaryExits []*dbtypes.VoluntaryExit, 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 RunDBTransaction

func RunDBTransaction(handler func(tx *sqlx.Tx) error) error

func SetExplorerState

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

func UpdateMevBlockByEpoch

func UpdateMevBlockByEpoch(epoch uint64, canonicalHashes [][]byte, 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