Versions in this module Expand all Collapse all v0 v0.0.1 Jun 21, 2024 Changes in this version + const ChainFreezerBodiesTable + const ChainFreezerDifficultyTable + const ChainFreezerHashTable + const ChainFreezerHeaderTable + const ChainFreezerReceiptTable + const HashScheme + const PathScheme + const StateSyncFinished + const StateSyncRunning + const StateSyncUnknown + const WasmKeyLen + var BestUpdateKey = []byte("update-") + var BloomBitsIndexPrefix = []byte("iB") + var BloomTrieIndexPrefix = []byte("bltIndex-") + var BloomTriePrefix = []byte("bltRoot-") + var BloomTrieTablePrefix = []byte("blt-") + var ChainFreezerName = "chain" + var ChtIndexTablePrefix = []byte("chtIndexV2-") + var ChtPrefix = []byte("chtRootV2-") + var ChtTablePrefix = []byte("cht-") + var CliqueSnapshotPrefix = []byte("clique-") + var CodePrefix = []byte("c") + var FixedCommitteeRootKey = []byte("fixedRoot-") + var PreimagePrefix = []byte("secure-key-") + var SnapshotAccountPrefix = []byte("a") + var SnapshotRootKey = []byte("SnapshotRoot") + var SnapshotStoragePrefix = []byte("o") + var StateFreezerName = "state" + var SyncCommitteeKey = []byte("committee-") + 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) + 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) + func DeleteCanonicalHash(db ethdb.KeyValueWriter, number uint64) + func DeleteCode(db ethdb.KeyValueWriter, hash common.Hash) + func DeleteHeader(db ethdb.KeyValueWriter, hash common.Hash, number uint64) + 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) + 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 DeleteStateID(db ethdb.KeyValueWriter, root common.Hash) + 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) + func DeleteTrieJournal(db ethdb.KeyValueWriter) + 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) + func ExistsAccountTrieNode(db ethdb.KeyValueReader, path []byte) bool + func ExistsStorageTrieNode(db ethdb.KeyValueReader, accountHash common.Hash, path []byte) bool + func FindCommonAncestor(db ethdb.Reader, a, b *types.Header) *types.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 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 InspectFreezerTable(ancient string, freezerName string, tableName string, start, end int64) error + func IsAccountTrieNode(key []byte) bool + func IsActivatedAsmKey(key []byte) (bool, common.Hash) + func IsActivatedModuleKey(key []byte) (bool, common.Hash) + func IsCodeKey(key []byte) (bool, []byte) + func IsLegacyTrieNode(key []byte, val []byte) bool + func IsStorageTrieNode(key []byte) bool + func IterateStorageSnapshots(db ethdb.Iteratee, accountHash common.Hash) ethdb.Iterator + func NewDatabase(db ethdb.KeyValueStore) ethdb.Database + func NewDatabaseWithFreezer(db ethdb.KeyValueStore, ancient string, namespace string, readonly bool) (ethdb.Database, error) + 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, ...) (ethdb.Database, error) + func NewTable(db ethdb.Database, prefix string) ethdb.Database + func Open(o OpenOptions) (ethdb.Database, error) + func ParseStateScheme(provided string, disk ethdb.Database) (string, error) + func PopUncleanShutdownMarker(db ethdb.KeyValueStore) + func PreexistingDatabase(path string) string + 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 ReadAllBadBlocks(db ethdb.Reader) []*types.Block + func ReadAllCanonicalHashes(db ethdb.Iteratee, from uint64, to uint64, limit int) ([]uint64, []common.Hash) + func ReadAllHashes(db ethdb.Iteratee, number uint64) []common.Hash + func ReadBadBlock(db ethdb.Reader, hash common.Hash) *types.Block + func ReadBlock(db ethdb.Reader, hash common.Hash, number uint64) *types.Block + 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 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 ReadChainMetadata(db ethdb.KeyValueStore) [][]string + func ReadCode(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadCodeWithPrefix(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadDatabaseVersion(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) *types.Header + func ReadHeadHeaderHash(db ethdb.KeyValueReader) common.Hash + func ReadHeader(db ethdb.Reader, hash common.Hash, number uint64) *types.Header + func ReadHeaderNumber(db ethdb.KeyValueReader, hash common.Hash) *uint64 + func ReadHeaderRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue + func ReadHeaderRange(db ethdb.Reader, number uint64, count uint64) []rlp.RawValue + func ReadLastPivotNumber(db ethdb.KeyValueReader) *uint64 + func ReadLegacyTrieNode(db ethdb.KeyValueReader, hash common.Hash) []byte + func ReadLogs(db ethdb.Reader, hash common.Hash, number uint64) [][]*types.Log + func ReadPersistentStateID(db ethdb.KeyValueReader) uint64 + func ReadPreimage(db ethdb.KeyValueReader, hash common.Hash) []byte + 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, time uint64, ...) types.Receipts + func ReadReceiptsRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue + func ReadSkeletonHeader(db ethdb.KeyValueReader, number uint64) *types.Header + func ReadSkeletonSyncStatus(db ethdb.KeyValueReader) []byte + func ReadSnapSyncStatusFlag(db ethdb.KeyValueReader) uint8 + 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 ReadStateAccountHistory(db ethdb.AncientReaderOp, id uint64) []byte + func ReadStateAccountIndex(db ethdb.AncientReaderOp, id uint64) []byte + func ReadStateHistory(db ethdb.AncientReaderOp, id uint64) ([]byte, []byte, []byte, []byte, []byte, error) + func ReadStateHistoryMeta(db ethdb.AncientReaderOp, id uint64) []byte + func ReadStateHistoryMetaList(db ethdb.AncientReaderOp, start uint64, count uint64) ([][]byte, error) + func ReadStateID(db ethdb.KeyValueReader, root common.Hash) *uint64 + func ReadStateScheme(db ethdb.Reader) string + func ReadStateStorageHistory(db ethdb.AncientReaderOp, id uint64) []byte + func ReadStateStorageIndex(db ethdb.AncientReaderOp, id uint64) []byte + 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 ReadTrieJournal(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) *uint64 + func ResolveAccountTrieNodeKey(key []byte) (bool, []byte) + func ResolveStorageTrieNode(key []byte) (bool, common.Hash, []byte) + func UnindexTransactions(db ethdb.Database, from uint64, to uint64, interrupt chan struct{}, ...) + func UpdateUncleanShutdownMarker(db ethdb.KeyValueStore) + func WrapDatabaseWithWasm(db ethdb.Database, wasm ethdb.KeyValueStore, cacheTag uint32) ethdb.Database + func WriteAccountSnapshot(db ethdb.KeyValueWriter, hash common.Hash, entry []byte) + func WriteAccountTrieNode(db ethdb.KeyValueWriter, path []byte, node []byte) + func WriteActivation(db ethdb.KeyValueWriter, moduleHash common.Hash, asm, module []byte) + func WriteAncientBlocks(db ethdb.AncientWriter, blocks []*types.Block, receipts []types.Receipts, ...) (int64, error) + func WriteBadBlock(db ethdb.KeyValueStore, block *types.Block) + func WriteBlock(db ethdb.KeyValueWriter, block *types.Block) + func WriteBloomBits(db ethdb.KeyValueWriter, bit uint, section uint64, head common.Hash, ...) + func WriteBody(db ethdb.KeyValueWriter, hash common.Hash, number uint64, body *types.Body) + func WriteBodyRLP(db ethdb.KeyValueWriter, hash common.Hash, number uint64, rlp rlp.RawValue) + func WriteCanonicalHash(db ethdb.KeyValueWriter, hash common.Hash, number uint64) + func WriteChainConfig(db ethdb.KeyValueWriter, hash common.Hash, cfg *params.ChainConfig) + func WriteCode(db ethdb.KeyValueWriter, hash common.Hash, code []byte) + func WriteDatabaseVersion(db ethdb.KeyValueWriter, version 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) + func WriteHeadFastBlockHash(db ethdb.KeyValueWriter, hash common.Hash) + func WriteHeadHeaderHash(db ethdb.KeyValueWriter, hash common.Hash) + func WriteHeader(db ethdb.KeyValueWriter, header *types.Header) + func WriteHeaderNumber(db ethdb.KeyValueWriter, hash common.Hash, number uint64) + func WriteLastPivotNumber(db ethdb.KeyValueWriter, pivot uint64) + func WriteLegacyTrieNode(db ethdb.KeyValueWriter, hash common.Hash, node []byte) + func WritePersistentStateID(db ethdb.KeyValueWriter, number uint64) + func WritePreimages(db ethdb.KeyValueWriter, preimages map[common.Hash][]byte) + func WriteReceipts(db ethdb.KeyValueWriter, hash common.Hash, number uint64, ...) + func WriteSkeletonHeader(db ethdb.KeyValueWriter, header *types.Header) + func WriteSkeletonSyncStatus(db ethdb.KeyValueWriter, status []byte) + func WriteSnapSyncStatusFlag(db ethdb.KeyValueWriter, flag uint8) + 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 WriteStateHistory(db ethdb.AncientWriter, id uint64, meta []byte, accountIndex []byte, ...) + func WriteStateID(db ethdb.KeyValueWriter, root common.Hash, id uint64) + 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) + func WriteTransitionStatus(db ethdb.KeyValueWriter, data []byte) + func WriteTrieJournal(db ethdb.KeyValueWriter, journal []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) + type FileLock interface + TryLock func() (bool, error) + TryRLock func() (bool, error) + Unlock func() error + func NewFileLock(_ string) FileLock + func NewFileLock(fileName string) FileLock + type Freezer struct + func NewChainFreezer(datadir string, namespace string, readonly bool) (*Freezer, error) + func NewFreezer(datadir string, namespace string, readonly bool, maxTableSize uint32, ...) (*Freezer, error) + func (f *Freezer) Ancient(kind string, number uint64) ([]byte, error) + func (f *Freezer) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error) + func (f *Freezer) AncientSize(kind string) (uint64, error) + func (f *Freezer) Ancients() (uint64, error) + func (f *Freezer) Close() error + func (f *Freezer) HasAncient(kind string, number uint64) (bool, error) + func (f *Freezer) MigrateTable(kind string, convert convertLegacyFn) error + func (f *Freezer) ModifyAncients(fn func(ethdb.AncientWriteOp) error) (writeSize int64, err error) + func (f *Freezer) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error) + func (f *Freezer) Sync() error + func (f *Freezer) Tail() (uint64, error) + func (f *Freezer) TruncateHead(items uint64) (uint64, error) + func (f *Freezer) TruncateTail(tail uint64) (uint64, 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 + Ephemeral bool + Handles int + Namespace string + PebbleExtraOptions *pebble.ExtraOptions + ReadOnly bool + Type string + type ResettableFreezer struct + func NewResettableFreezer(datadir string, namespace string, readonly bool, maxTableSize uint32, ...) (*ResettableFreezer, error) + func NewStateFreezer(ancientDir string, readOnly bool) (*ResettableFreezer, error) + func (f *ResettableFreezer) Ancient(kind string, number uint64) ([]byte, error) + func (f *ResettableFreezer) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error) + func (f *ResettableFreezer) AncientSize(kind string) (uint64, error) + func (f *ResettableFreezer) Ancients() (uint64, error) + func (f *ResettableFreezer) Close() error + func (f *ResettableFreezer) HasAncient(kind string, number uint64) (bool, error) + func (f *ResettableFreezer) MigrateTable(kind string, convert convertLegacyFn) error + func (f *ResettableFreezer) ModifyAncients(fn func(ethdb.AncientWriteOp) error) (writeSize int64, err error) + func (f *ResettableFreezer) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error) + func (f *ResettableFreezer) Reset() error + func (f *ResettableFreezer) Sync() error + func (f *ResettableFreezer) Tail() (uint64, error) + func (f *ResettableFreezer) TruncateHead(items uint64) (uint64, error) + func (f *ResettableFreezer) TruncateTail(tail uint64) (uint64, error) + type WasmKey = [WasmKeyLen]byte + func ActivatedAsmKey(moduleHash common.Hash) WasmKey + func ActivatedModuleKey(moduleHash common.Hash) WasmKey