Versions in this module Expand all Collapse all v1 v1.10.3 Dec 16, 2024 v1.10.2 Dec 15, 2024 Changes in this version + const ChainFreezerBodiesTable + const ChainFreezerDifficultyTable + const ChainFreezerHashTable + const ChainFreezerHeaderTable + const ChainFreezerReceiptTable + const HashScheme + const NAByte + const PathScheme + const PebbleEnabled + const SpentByte + const UnspentByte + var BloomBitsIndexPrefix = []byte("iB") + var BloomTrieIndexPrefix = []byte("bltIndex-") + var BloomTriePrefix = []byte("bltRoot-") + var BloomTrieTablePrefix = []byte("blt-") + var ChtIndexTablePrefix = []byte("chtIndexV2-") + var ChtPrefix = []byte("chtRootV2-") + var ChtTablePrefix = []byte("cht-") + var CliqueSnapshotPrefix = []byte("clique-") + var CodePrefix = []byte("c") + var MsgNoShardStateFromDB = "failed to read shard state from DB" + var PreimagePrefix = []byte("secure-key-") + var SnapshotAccountPrefix = []byte("a") + var SnapshotRootKey = []byte("SnapshotRoot") + var SnapshotStoragePrefix = []byte("o") + var ValidatorCodePrefix = []byte("vc") + func DeleteAccountSnapshot(db ethdb.KeyValueWriter, hash common.Hash) + func DeleteAccountTrieNode(db ethdb.KeyValueWriter, path []byte) + func DeleteBadBlocks(db ethdb.KeyValueWriter) + func DeleteBlock(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func DeleteBlockWithoutNumber(db ethdb.KeyValueWriter, hash common.Hash, number uint64) + func DeleteBloombits(db ethdb.Database, bit uint, from uint64, to uint64) + func DeleteBody(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func DeleteCXReceiptsProofSpent(db DatabaseDeleter, shardID uint32, number uint64) error + func DeleteCanonicalHash(db ethdb.KeyValueWriter, number uint64) error + func DeleteCode(db ethdb.KeyValueWriter, hash common.Hash) + func DeleteCrossLinkShardBlock(db DatabaseDeleter, shardID uint32, blockNum uint64) error + func DeleteCxLookupEntry(db DatabaseDeleter, hash common.Hash) error + func DeleteHeader(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func DeleteHeaderNumber(db ethdb.KeyValueWriter, hash common.Hash) + func DeleteLegacyTrieNode(db ethdb.KeyValueWriter, hash common.Hash) + func DeleteReceipts(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func DeleteSkeletonHeader(db ethdb.KeyValueWriter, number uint64) + func DeleteSkeletonSyncStatus(db ethdb.KeyValueWriter) + func DeleteSnapshotDisabled(db ethdb.KeyValueWriter) + func DeleteSnapshotGenerator(db ethdb.KeyValueWriter) + func DeleteSnapshotJournal(db ethdb.KeyValueWriter) + func DeleteSnapshotRecoveryNumber(db ethdb.KeyValueWriter) + func DeleteSnapshotRoot(db ethdb.KeyValueWriter) + func DeleteStorageSnapshot(db ethdb.KeyValueWriter, accountHash, storageHash common.Hash) + func DeleteStorageTrieNode(db ethdb.KeyValueWriter, accountHash common.Hash, path []byte) + func DeleteTd(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func DeleteTrieNode(db ethdb.KeyValueWriter, owner common.Hash, path []byte, hash common.Hash, ...) + func DeleteTxLookupEntries(db ethdb.KeyValueWriter, hashes []common.Hash) + func DeleteTxLookupEntry(db ethdb.KeyValueWriter, hash common.Hash) error + func DeleteValidatorCode(db ethdb.KeyValueWriter, hash common.Hash) + func DeleteValidatorSnapshot(db DatabaseDeleter, addr common.Address, epoch *big.Int) error + func DeleteValidatorStats(db DatabaseDeleter, addr common.Address) error + func FindCommonAncestor(db ethdb.Reader, a, b *block.Header) *block.Header + func HasAccountTrieNode(db ethdb.KeyValueReader, path []byte, hash common.Hash) bool + func HasBody(db ethdb.Reader, hash common.Hash, number uint64) bool + func HasCode(db ethdb.KeyValueReader, hash common.Hash) bool + func HasCodeWithPrefix(db ethdb.KeyValueReader, hash common.Hash) bool + func HasHeader(db ethdb.Reader, hash common.Hash, number uint64) bool + func HasLegacyTrieNode(db ethdb.KeyValueReader, hash common.Hash) bool + func HasReceipts(db ethdb.Reader, hash common.Hash, number uint64) bool + func HasStorageTrieNode(db ethdb.KeyValueReader, accountHash common.Hash, path []byte, ...) bool + func HasTrieNode(db ethdb.KeyValueReader, owner common.Hash, path []byte, hash common.Hash, ...) bool + func HasValidatorCode(db ethdb.KeyValueReader, hash common.Hash) bool + func HasValidatorCodeWithPrefix(db ethdb.KeyValueReader, hash common.Hash) bool + func IndexTransactions(db ethdb.Database, from uint64, to uint64, interrupt chan struct{}) + func InitDatabaseFromFreezer(db ethdb.Database) + func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error + func IsCodeKey(key []byte) (bool, []byte) + func IsValidatorCodeKey(key []byte) (bool, []byte) + func IterateStorageSnapshots(db ethdb.Iteratee, accountHash common.Hash) ethdb.Iterator + func IteratorBlocks(iterator DatabaseIterator, cb func(blockNum uint64, hash common.Hash) bool) (minKey []byte, maxKey []byte) + func IteratorCXReceipt(iterator DatabaseIterator, ...) + func IteratorCXReceiptsProofSpent(iterator DatabaseIterator, ...) + func IteratorDelegatorDelegations(iterator DatabaseIterator, ...) + func IteratorValidatorSnapshot(iterator DatabaseIterator, cb func(addr common.Address, epoch *big.Int) bool) (minKey []byte, maxKey []byte) + func IteratorValidatorStats(iterator DatabaseIterator, ...) + func NewDatabase(db ethdb.KeyValueStore) ethdb.Database + func NewKeyLengthIterator(it ethdb.Iterator, keyLen int) ethdb.Iterator + func NewLevelDBDatabase(file string, cache int, handles int, namespace string, readonly bool) (ethdb.Database, error) + func NewMemoryDatabase() ethdb.Database + func NewMemoryDatabaseWithCap(size int) ethdb.Database + func NewPebbleDBDatabase(file string, cache int, handles int, namespace string, readonly bool) (ethdb.Database, error) + func NewTable(db ethdb.Database, prefix string) ethdb.Database + func PopUncleanShutdownMarker(db ethdb.KeyValueStore) + func PushUncleanShutdownMarker(db ethdb.KeyValueStore) ([]uint64, uint64, error) + func ReadAccountSnapshot(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadAccountTrieNode(db ethdb.KeyValueReader, path []byte) ([]byte, common.Hash) + func ReadAllCanonicalHashes(db ethdb.Iteratee, from uint64, to uint64, limit int) ([]uint64, []common.Hash) + func ReadAllHashes(db ethdb.Iteratee, number uint64) []common.Hash + func ReadBlock(db ethdb.Reader, hash common.Hash, number uint64) *types.Block + func ReadBlockCommitSig(db DatabaseReader, blockNum uint64) ([]byte, error) + func ReadBlockRewardAccumulator(db DatabaseReader, number uint64) (*big.Int, error) + func ReadBloomBits(db ethdb.KeyValueReader, bit uint, section uint64, head common.Hash) ([]byte, error) + func ReadBody(db ethdb.Reader, hash common.Hash, number uint64) *types.Body + func ReadBodyRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue + func ReadCXReceipt(db ethdb.Reader, hash common.Hash) (*types.CXReceipt, common.Hash, uint64, uint64) + func ReadCXReceipts(db DatabaseReader, shardID uint32, number uint64, hash common.Hash) (types.CXReceipts, error) + func ReadCXReceiptsProofSpent(db DatabaseReader, shardID uint32, number uint64) (byte, error) + func ReadCanonicalBodyRLP(db ethdb.Reader, number uint64) rlp.RawValue + func ReadCanonicalHash(db ethdb.Reader, number uint64) common.Hash + func ReadChainConfig(db ethdb.KeyValueReader, hash common.Hash) *params.ChainConfig + func ReadCode(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadCodeWithPrefix(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadCrossLinkShardBlock(db DatabaseReader, shardID uint32, blockNum uint64) ([]byte, error) + func ReadCxLookupEntry(db DatabaseReader, hash common.Hash) (common.Hash, uint64, uint64) + func ReadDatabaseVersion(db ethdb.KeyValueReader) *uint64 + func ReadDelegationsByDelegator(db DatabaseReader, delegator common.Address) (staking.DelegationIndexes, error) + func ReadEpochBlockNumber(db DatabaseReader, epoch *big.Int) (*big.Int, error) + func ReadEpochVdfBlockNum(db DatabaseReader, epoch *big.Int) ([]byte, error) + func ReadEpochVrfBlockNums(db DatabaseReader, epoch *big.Int) ([]byte, error) + func ReadFastTxLookupLimit(db ethdb.KeyValueReader) *uint64 + func ReadFinalizedBlockHash(db ethdb.KeyValueReader) common.Hash + func ReadGenesisStateSpec(db ethdb.KeyValueReader, blockhash common.Hash) []byte + func ReadHeadBlock(db ethdb.Reader) *types.Block + func ReadHeadBlockHash(db ethdb.KeyValueReader) common.Hash + func ReadHeadFastBlockHash(db ethdb.KeyValueReader) common.Hash + func ReadHeadHeader(db ethdb.Reader) *block.Header + func ReadHeadHeaderHash(db ethdb.KeyValueReader) common.Hash + func ReadHeader(db ethdb.Reader, hash common.Hash, number uint64) *block.Header + func ReadHeaderNumber(db ethdb.KeyValueReader, hash common.Hash) *uint64 + func ReadHeaderRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue + func ReadLastPivotNumber(db ethdb.KeyValueReader) *uint64 + func ReadLeaderRotationMeta(db DatabaseReader) (pubKeyBytes []byte, epoch, count, shifts uint64, err error) + func ReadLegacyTrieNode(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadLogs(db ethdb.Reader, hash common.Hash, number uint64, config *params.ChainConfig) [][]*types.Log + func ReadPendingCrossLinks(db DatabaseReader) ([]byte, error) + func ReadPreImageEndBlock(db ethdb.KeyValueReader) (uint64, error) + func ReadPreImageStartBlock(db ethdb.KeyValueReader) (uint64, error) + func ReadPreimage(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadPreimageImportBlock(db ethdb.KeyValueReader) (uint64, error) + func ReadRawReceipts(db ethdb.Reader, hash common.Hash, number uint64) types.Receipts + func ReadReceipt(db ethdb.Reader, hash common.Hash, config *params.ChainConfig) (*types.Receipt, common.Hash, uint64, uint64) + func ReadReceipts(db ethdb.Reader, hash common.Hash, number uint64, config *params.ChainConfig) types.Receipts + func ReadReceiptsRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue + func ReadShardLastCrossLink(db DatabaseReader, shardID uint32) ([]byte, error) + func ReadShardState(db DatabaseReader, epoch *big.Int) (*shard.State, error) + func ReadSkeletonHeader(db ethdb.KeyValueReader, number uint64) *types.Header + func ReadSkeletonSyncStatus(db ethdb.KeyValueReader) []byte + func ReadSnapshotDisabled(db ethdb.KeyValueReader) bool + func ReadSnapshotGenerator(db ethdb.KeyValueReader) []byte + func ReadSnapshotJournal(db ethdb.KeyValueReader) []byte + func ReadSnapshotRecoveryNumber(db ethdb.KeyValueReader) *uint64 + func ReadSnapshotRoot(db ethdb.KeyValueReader) common.Hash + func ReadSnapshotSyncStatus(db ethdb.KeyValueReader) []byte + func ReadStakingTransaction(db ethdb.Reader, hash common.Hash) (*staking.StakingTransaction, common.Hash, uint64, uint64) + func ReadStorageSnapshot(db ethdb.KeyValueReader, accountHash, storageHash common.Hash) []byte + func ReadStorageTrieNode(db ethdb.KeyValueReader, accountHash common.Hash, path []byte) ([]byte, common.Hash) + func ReadTd(db ethdb.Reader, hash common.Hash, number uint64) *big.Int + func ReadTdRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue + func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, common.Hash, uint64, uint64) + func ReadTransitionStatus(db ethdb.KeyValueReader) []byte + func ReadTrieNode(db ethdb.KeyValueReader, owner common.Hash, path []byte, hash common.Hash, ...) []byte + func ReadTxIndexTail(db ethdb.KeyValueReader) *uint64 + func ReadTxLookupEntry(db ethdb.Reader, hash common.Hash) (common.Hash, uint64, uint64) + func ReadValidatorCode(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadValidatorCodeWithPrefix(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadValidatorList(db DatabaseReader) ([]common.Address, error) + func ReadValidatorSnapshot(db DatabaseReader, addr common.Address, epoch *big.Int) (*staking.ValidatorSnapshot, error) + func ReadValidatorStats(db DatabaseReader, addr common.Address) (*staking.ValidatorStats, error) + func UnindexTransactions(db ethdb.Database, from uint64, to uint64, interrupt chan struct{}) + func UpdateUncleanShutdownMarker(db ethdb.KeyValueStore) + func WriteAccountSnapshot(db ethdb.KeyValueWriter, hash common.Hash, entry []byte) + func WriteAccountTrieNode(db ethdb.KeyValueWriter, path []byte, node []byte) + func WriteBadBlock(db ethdb.KeyValueStore, block *types.Block) + func WriteBlock(db ethdb.KeyValueWriter, block *types.Block) error + func WriteBlockCommitSig(db DatabaseWriter, blockNum uint64, sigAndBitmap []byte) error + func WriteBlockRewardAccumulator(db DatabaseWriter, newAccum *big.Int, number uint64) error + func WriteBlockStxLookUpEntries(db DatabaseWriter, block *types.Block) error + func WriteBlockTxLookUpEntries(db DatabaseWriter, block *types.Block) error + func WriteBloomBits(db ethdb.KeyValueWriter, bit uint, section uint64, head common.Hash, ...) error + func WriteBody(db ethdb.KeyValueWriter, hash common.Hash, number uint64, body *types.Body) error + func WriteBodyRLP(db ethdb.KeyValueWriter, hash common.Hash, number uint64, rlp rlp.RawValue) error + func WriteCXReceipts(db DatabaseWriter, shardID uint32, number uint64, hash common.Hash, ...) error + func WriteCXReceiptsProofSpent(dbw DatabaseWriter, cxp *types.CXReceiptsProof) error + func WriteCanonicalHash(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func WriteChainConfig(db ethdb.KeyValueWriter, hash common.Hash, cfg *params.ChainConfig) + func WriteCode(db ethdb.KeyValueWriter, hash common.Hash, code []byte) + func WriteCrossLinkShardBlock(db DatabaseWriter, shardID uint32, blockNum uint64, data []byte) error + func WriteCxLookupEntries(db DatabaseWriter, block *types.Block) error + func WriteDatabaseVersion(db ethdb.KeyValueWriter, version uint64) + func WriteDelegationsByDelegator(db DatabaseWriter, delegator common.Address, indexes staking.DelegationIndexes) error + func WriteEpochBlockNumber(db DatabaseWriter, epoch, blockNum *big.Int) error + func WriteEpochVdfBlockNum(db DatabaseWriter, epoch *big.Int, data []byte) error + func WriteEpochVrfBlockNums(db DatabaseWriter, epoch *big.Int, data []byte) error + func WriteFastTxLookupLimit(db ethdb.KeyValueWriter, number uint64) + func WriteFinalizedBlockHash(db ethdb.KeyValueWriter, hash common.Hash) + func WriteGenesisStateSpec(db ethdb.KeyValueWriter, blockhash common.Hash, data []byte) + func WriteHeadBlockHash(db ethdb.KeyValueWriter, hash common.Hash) error + func WriteHeadFastBlockHash(db ethdb.KeyValueWriter, hash common.Hash) error + func WriteHeadHeaderHash(db ethdb.KeyValueWriter, hash common.Hash) error + func WriteHeader(db ethdb.KeyValueWriter, header *block.Header) error + func WriteHeaderNumber(db ethdb.KeyValueWriter, hash common.Hash, number uint64) error + func WriteLastPivotNumber(db ethdb.KeyValueWriter, pivot uint64) error + func WriteLeaderRotationMeta(db DatabaseWriter, leader []byte, epoch uint64, count, shifts uint64) error + func WriteLegacyTrieNode(db ethdb.KeyValueWriter, hash common.Hash, node []byte) + func WritePendingCrossLinks(db DatabaseWriter, bytes []byte) error + func WritePendingSlashingCandidates(db DatabaseWriter, bytes []byte) error + func WritePreImageStartEndBlock(db ethdb.KeyValueStore, start uint64, end uint64) (uint64, uint64, error) + func WritePreimageImportBlock(db ethdb.KeyValueWriter, number uint64) error + func WritePreimages(db ethdb.KeyValueWriter, preimages map[common.Hash][]byte) error + func WriteReceipts(db ethdb.KeyValueWriter, hash common.Hash, number uint64, ...) error + func WriteShardLastCrossLink(db DatabaseWriter, shardID uint32, data []byte) error + func WriteShardStateBytes(db DatabaseWriter, epoch *big.Int, data []byte) error + func WriteSkeletonHeader(db ethdb.KeyValueWriter, header *types.Header) + func WriteSkeletonSyncStatus(db ethdb.KeyValueWriter, status []byte) + func WriteSnapdbInfo(db DatabaseWriter, info *SnapdbInfo) error + func WriteSnapshotDisabled(db ethdb.KeyValueWriter) + func WriteSnapshotGenerator(db ethdb.KeyValueWriter, generator []byte) + func WriteSnapshotJournal(db ethdb.KeyValueWriter, journal []byte) + func WriteSnapshotRecoveryNumber(db ethdb.KeyValueWriter, number uint64) + func WriteSnapshotRoot(db ethdb.KeyValueWriter, root common.Hash) + func WriteSnapshotSyncStatus(db ethdb.KeyValueWriter, status []byte) + func WriteStorageSnapshot(db ethdb.KeyValueWriter, accountHash, storageHash common.Hash, entry []byte) + func WriteStorageTrieNode(db ethdb.KeyValueWriter, accountHash common.Hash, path []byte, node []byte) + func WriteTd(db ethdb.KeyValueWriter, hash common.Hash, number uint64, td *big.Int) error + func WriteTransitionStatus(db ethdb.KeyValueWriter, data []byte) + func WriteTrieNode(db ethdb.KeyValueWriter, owner common.Hash, path []byte, hash common.Hash, ...) + func WriteTxIndexTail(db ethdb.KeyValueWriter, number uint64) + func WriteTxLookupEntries(db ethdb.KeyValueWriter, number uint64, hashes []common.Hash) + func WriteTxLookupEntriesByBlock(db ethdb.KeyValueWriter, block *types.Block) + func WriteValidatorCode(db ethdb.KeyValueWriter, hash common.Hash, code []byte) + func WriteValidatorList(db DatabaseWriter, addrs []common.Address) error + func WriteValidatorSnapshot(batch DatabaseWriter, v *staking.ValidatorWrapper, epoch *big.Int) error + func WriteValidatorStats(batch DatabaseWriter, addr common.Address, stats *staking.ValidatorStats) error + type DatabaseDeleter interface + Delete func(key []byte) error + Put func(key []byte, value []byte) error + type DatabaseIterator interface + NewIterator func(prefix []byte, start []byte) ethdb.Iterator + type DatabaseReader interface + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + type DatabaseWriter interface + Delete func(key []byte) error + Put func(key []byte, value []byte) error + type KeyLengthIterator struct + func (it *KeyLengthIterator) Next() bool + type LegacyTxLookupEntry struct + BlockHash common.Hash + BlockIndex uint64 + Index uint64 + type NumberHash struct + Hash common.Hash + Number uint64 + func ReadAllHashesInRange(db ethdb.Iteratee, first, last uint64) []*NumberHash + type OpenOptions struct + AncientsDirectory string + Cache int + Directory string + Handles int + Namespace string + ReadOnly bool + Type string + type SnapdbInfo struct + AccountCount uint64 + BlockHeader *block.Header + DumpedSize uint64 + IndexerDataDumped bool + LastAccountKey hexutil.Bytes + LastAccountStateKey hexutil.Bytes + NetworkType nodeconfig.NetworkType + OffchainDataDumped bool + StateDataDumped bool + func ReadSnapdbInfo(db DatabaseReader) *SnapdbInfo + type TxLookupEntry struct + BlockHash common.Hash + BlockIndex uint64 + Index uint64