package
5.6.3-darwinv2-rc0+incompatible
Repository: https://github.com/scroll-tech/go-ethereum.git
Documentation: pkg.go.dev
# Functions
DeleteAccountSnapshot removes the snapshot entry of an account trie leaf.
DeleteBadBlocks deletes all the bad blocks from the database.
DeleteBatchChunkRanges removes the block ranges of all chunks associated with a specific batch from the database.
DeleteBlock removes all block data associated with a hash.
DeleteBlockWithoutNumber removes all block data associated with a hash, except the hash to number mapping.
DeleteBloombits removes all compressed bloom bits vector belonging to the given section range and bit index.
DeleteBody removes all block body data associated with a hash.
DeleteCanonicalHash removes the number to hash canonical mapping.
DeleteCode deletes the specified contract code from the database.
DeleteHeader removes all block header data associated with a hash.
DeleteHeaderNumber removes hash->number mapping.
DeleteReceipts removes all receipt data associated with a block hash.
DeleteSnapshotDisabled deletes the flag keeping the snapshot maintenance disabled.
DeleteSnapshotGenerator deletes the serialized snapshot generator saved at the last shutdown.
DeleteSnapshotJournal deletes the serialized in-memory diff layers saved at the last shutdown.
DeleteSnapshotRecoveryNumber deletes the block number of the last persisted snapshot layer.
DeleteSnapshotRoot deletes the hash of the block whose state is contained in the persisted snapshot.
DeleteSnapshotSyncStatus deletes the serialized sync status saved at the last shutdown.
DeleteStorageSnapshot removes the snapshot entry of an storage trie leaf.
DeleteTd removes all block total difficulty data associated with a hash.
DeleteTrieNode deletes the specified trie node from the database.
DeleteTxLookupEntries removes all transaction lookups for a given block.
DeleteTxLookupEntry removes all transaction data associated with a hash.
FindCommonAncestor returns the last common ancestor of two block headers.
FirstQueueIndexNotInL2BlockKey = firstQueueIndexNotInL2BlockPrefix + L2 block hash.
HasBody verifies the existence of a block body corresponding to the hash.
HasHeader verifies the existence of a block header corresponding to the hash.
HasReceipts verifies the existence of all the transaction receipts belonging to a block.
IndexTransactions creates txlookup indices of the specified block range.
InitDatabaseFromFreezer reinitializes an empty database from a previous batch of frozen ancient blocks.
InspectDatabase traverses the entire database and checks the size of all different categories of data.
IsCodeKey reports whether the given byte slice is the key of contract code, if so return the raw code hash as well.
IterateL1MessagesFrom creates an L1MessageIterator that iterates over all L1 message in the database starting at the provided enqueue index.
IterateSkippedTransactionsFrom creates a SkippedTransactionIterator that iterates over all skipped transaction hashes in the database starting at the provided index.
IterateStorageSnapshots returns an iterator for walking the entire storage space of a specific account.
L1MessageKey = l1MessagePrefix + queueIndex (uint64 big endian).
NewDatabase creates a high level database on top of a given key-value data store without a freezer moving immutable chain segments into cold storage.
NewDatabaseWithFreezer creates a high level database on top of a given key- value data store with a freezer moving immutable chain segments into cold storage.
NewFreezerTable opens the given path as a freezer table.
NewLevelDBDatabase creates a persistent key-value database without a freezer moving immutable chain segments into cold storage.
NewLevelDBDatabaseWithFreezer creates a persistent key-value database with a freezer moving immutable chain segments into cold storage.
NewMemoryDatabase creates an ephemeral in-memory key-value database without a freezer moving immutable chain segments into cold storage.
NewMemoryDatabaseWithCap creates an ephemeral in-memory key-value database with an initial starting capacity, but without a freezer moving immutable chain segments into cold storage.
NewTable returns a database object that prefixes all keys with a given string.
PopUncleanShutdownMarker removes the last unclean shutdown marker.
PushUncleanShutdownMarker appends a new unclean shutdown marker and returns the previous data - a list of timestamps - a count of how many old unclean-shutdowns have been discarded.
ReadAccountSnapshot retrieves the snapshot entry of an account trie leaf.
ReadAllBadBlocks retrieves all the bad blocks in the database.
ReadAllCanonicalHashes retrieves all canonical number and hash mappings at the certain chain range.
ReadAllHashes retrieves all the hashes assigned to blocks at a certain heights, both canonical and reorged forks included.
ReadAllHashes retrieves all the hashes assigned to blocks at a certain heights, both canonical and reorged forks included.
ReadBadBlock retrieves the bad block with the corresponding block hash.
ReadBatchChunkRanges retrieves the block ranges of all chunks associated with a specific batch from the database.
ReadBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body.
ReadBlockRowConsumption retrieves the RowConsumption corresponding to the block hash.
ReadBlockRowConsumption retrieves the RowConsumption in its raw RLP database encoding.
ReadBloomBits retrieves the compressed bloom bit vector belonging to the given section and bit index from the.
ReadBody retrieves the block body corresponding to the hash.
ReadBodyRLP retrieves the block body (transactions and uncles) in RLP encoding.
ReadCanonicalBodyRLP retrieves the block body (transactions and uncles) for the canonical block at number, in RLP encoding.
ReadCanonicalHash retrieves the hash assigned to a canonical block number.
ReadChainConfig retrieves the consensus settings based on the given genesis hash.
ReadCode retrieves the contract code of the provided code hash.
ReadCodeWithPrefix retrieves the contract code of the provided code hash.
ReadCommittedBatchMeta fetches the CommittedBatchMeta for a specific batch from the database.
ReadDatabaseVersion retrieves the version number of the database.
ReadFastTrieProgress retrieves the number of tries nodes fast synced to allow reporting correct numbers across restarts.
ReadFastTxLookupLimit retrieves the tx lookup limit used in fast sync.
ReadFinalizedBatchMeta fetches the metadata of a finalized batch from the database.
ReadFinalizedL2BlockNumber fetches the highest finalized L2 block number from the database.
ReadFirstQueueIndexNotInL2Block retrieves the queue index of the first message that is NOT included in the ledger up to and including the provided L2 block.
ReadHeadBlock returns the current canonical head block.
ReadHeadBlockHash retrieves the hash of the current canonical head block.
ReadHeader retrieves the block header corresponding to the hash.
ReadHeaderNumber returns the header number assigned to a hash.
ReadHeaderRLP retrieves a block header in its raw RLP database encoding.
ReadHeadFastBlockHash retrieves the hash of the current fast-sync head block.
ReadHeadHeader returns the current canonical head header.
ReadHeadHeaderHash retrieves the hash of the current canonical head header.
ReadHighestSyncedQueueIndex retrieves the highest synced L1 message queue index.
ReadL1Message retrieves the L1 message corresponding to the enqueue index.
ReadL1MessageRLP retrieves an L1 message in its raw RLP database encoding.
ReadL1MessagesFrom retrieves up to `maxCount` L1 messages starting at `startIndex`.
ReadLastFinalizedBatchIndex fetches the last finalized batch index from the database.
ReadLastPivotNumber retrieves the number of the last pivot block.
ReadLogs retrieves the logs for all transactions in a block.
ReadNumSkippedTransactions retrieves the number of skipped transactions.
ReadPreimage retrieves a single preimage of the provided hash.
ReadRawReceipts retrieves all the transaction receipts belonging to a block.
ReadReceipt retrieves a specific transaction receipt from the database, along with its added positional metadata.
ReadReceipts retrieves all the transaction receipts belonging to a block, including its correspoinding metadata fields.
ReadReceiptsRLP retrieves all the transaction receipts belonging to a block in RLP encoding.
ReadRollupEventSyncedL1BlockNumber fetches the highest synced L1 block number associated with rollup events from the database.
ReadSkippedTransaction retrieves a skipped transaction by its hash, along with its skipped reason.
ReadSkippedTransactionHash retrieves the hash of a skipped transaction by its index.
ReadSnapshotDisabled retrieves if the snapshot maintenance is disabled.
ReadSnapshotGenerator retrieves the serialized snapshot generator saved at the last shutdown.
ReadSnapshotJournal retrieves the serialized in-memory diff layers saved at the last shutdown.
ReadSnapshotRecoveryNumber retrieves the block number of the last persisted snapshot layer.
ReadSnapshotRoot retrieves the root of the block whose state is contained in the persisted snapshot.
ReadSnapshotSyncStatus retrieves the serialized sync status saved at shutdown.
ReadStorageSnapshot retrieves the snapshot entry of an storage trie leaf.
ReadSyncedL1BlockNumber retrieves the highest synced L1 block number.
ReadTd retrieves a block's total difficulty corresponding to the hash.
ReadTdRLP retrieves a block's total difficulty corresponding to the hash in RLP encoding.
ReadTransaction retrieves a specific transaction from the database, along with its added positional metadata.
ReadTrieNode retrieves the trie node of the provided hash.
ReadTxIndexTail retrieves the number of oldest indexed block whose transaction indices has been indexed.
ReadTxLookupEntry retrieves the positional metadata associated with a transaction hash to allow retrieving the transaction or receipt by hash.
Use the updated "L1" prefix on all new networks to avoid overlap with txLookupPrefix.
SkippedTransactionHashKey = skippedTransactionHashPrefix + index (uint64 big endian).
SkippedTransactionKey = skippedTransactionPrefix + tx hash.
UnindexTransactions removes txlookup indices of the specified block range.
WriteAccountSnapshot stores the snapshot entry of an account trie leaf.
WriteAncientBlock writes entire block data into ancient store and returns the total written size.
WriteBadBlock serializes the bad block into the database.
WriteBatchChunkRanges writes the block ranges for each chunk within a batch to the database.
WriteBlock serializes a block into the database, header and body separately.
WriteBlockRowConsumption writes a RowConsumption of the block to the database.
WriteBloomBits stores the compressed bloom bits vector belonging to the given section and bit index.
WriteBody stores a block body into the database.
WriteBodyRLP stores an RLP encoded block body into the database.
WriteCanonicalHash stores the hash assigned to a canonical block number.
WriteChainConfig writes the chain config settings to the database.
WriteCode writes the provided contract code database.
WriteCommittedBatchMeta stores the CommittedBatchMeta for a specific batch in the database.
WriteDatabaseVersion stores the version number of the database.
WriteFastTrieProgress stores the fast sync trie process counter to support retrieving it across restarts.
WriteFastTxLookupLimit stores the txlookup limit used in fast sync into database.
WriteFinalizedBatchMeta stores the metadata of a finalized batch in the database.
WriteFinalizedL2BlockNumber stores the highest finalized L2 block number in the database.
WriteFirstQueueIndexNotInL2Block writes the queue index of the first message that is NOT included in the ledger up to and including the provided L2 block.
WriteHeadBlockHash stores the head block's hash.
WriteHeader stores a block header into the database and also stores the hash- to-number mapping.
WriteHeaderNumber stores the hash->number mapping.
WriteHeadFastBlockHash stores the hash of the current fast-sync head block.
WriteHeadHeaderHash stores the hash of the current canonical head header.
WriteHighestSyncedQueueIndex writes the highest synced L1 message queue index to the database.
WriteL1Message writes an L1 message to the database.
WriteL1Messages writes an array of L1 messages to the database.
WriteLastFinalizedBatchIndex stores the last finalized batch index in the database.
WriteLastPivotNumber stores the number of the last pivot block.
WritePreimages writes the provided set of preimages to the database.
WriteReceipts stores all the transaction receipts belonging to a block.
WriteRollupEventSyncedL1BlockNumber stores the latest synced L1 block number related to rollup events in the database.
WriteSkippedTransaction writes a skipped transaction to the database and also updates the count and lookup index.
WriteSnapshotDisabled stores the snapshot pause flag.
WriteSnapshotGenerator stores the serialized snapshot generator to save at shutdown.
WriteSnapshotJournal stores the serialized in-memory diff layers to save at shutdown.
WriteSnapshotRecoveryNumber stores the block number of the last persisted snapshot layer.
WriteSnapshotRoot stores the root of the block whose state is contained in the persisted snapshot.
WriteSnapshotSyncStatus stores the serialized sync status to save at shutdown.
WriteStorageSnapshot stores the snapshot entry of an storage trie leaf.
WriteSyncedL1BlockNumber writes the highest synced L1 block number to the database.
WriteTd stores the total difficulty of a block into the database.
WriteTrieNode writes the provided trie node database.
WriteTxIndexTail stores the number of oldest indexed block into database.
WriteTxLookupEntries is identical to WriteTxLookupEntry, but it works on a list of hashes.
WriteTxLookupEntriesByBlock stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.
# Variables
BloomBitsIndexPrefix is the data table of a chain indexer to track its progress.
CodePrefix + code hash -> account code.
FreezerNoSnappy configures whether compression is disabled for the ancient-tables.
PreimagePrefix + hash -> preimage.
SnapshotAccountPrefix + account hash -> account trie value.
SnapshotRootKey tracks the hash of the last snapshot.
SnapshotStoragePrefix + account hash + storage hash -> storage trie value.
# Structs
ChunkBlockRange represents the range of blocks within a chunk.
CommittedBatchMeta holds metadata for committed batches.
FinalizedBatchMeta holds metadata for finalized batches.
L1MessageIterator is a wrapper around ethdb.Iterator that allows us to iterate over L1 messages in the database.
LegacyTxLookupEntry is the legacy TxLookupEntry definition with some unnecessary fields.
No description provided by the author
SkippedTransaction stores the transaction object, along with the skip reason and block context.
SkippedTransactionIterator is a wrapper around ethdb.Iterator that allows us to iterate over skipped transaction hashes in the database.
SkippedTransactionV2 stores the SkippedTransaction object along with serialized traces.