# Functions
No description provided by the author
No description provided by the author
DeleteAccountSnapshot removes the snapshot entry of an account trie leaf.
DeleteAllHeadsHashes writes the heads hashes of the blockchain.
DeleteAllPbBodyKeys delete the pendingHeaderBody keys to the db.
DeleteBadHashesList removes badHashesList from the database.
DeleteBestPendingHeader deletes the pending header stored for the header hash.
DeleteBestPhKey delete the bestPhKey of the blockchain.
DeleteWorkObjectWithoutNumber removes all block data associated with a hash, except the hash to number mapping.
DeleteBloom removes all bloom data associated with a block.
DeleteBloombits removes all compressed bloom bits vector belonging to the given section range and bit index.
DeleteCanonicalHash removes the number to hash canonical mapping.
DeleteCode deletes the specified contract code from the database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeleteHeader removes all block header data associated with a hash.
DeleteHeaderNumber removes hash->number mapping.
DeleteInboundEtxs deletes the inbound etxs from the database.
DeleteInterlinkHashes removes interlinkHashes data associated with a block.
DeleteManifest removes manifest data associated with a block.
No description provided by the author
DeletePbCacheBody removes all block body data associated with a hash.
DeletePendingEtxs removes all pending ETX data associated with a block.
DeletePendingEtxsRollup removes all pending ETX rollup data associated with a block.
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.
No description provided by the author
DeleteStorageSnapshot removes the snapshot entry of an storage trie leaf.
DeleteTermini writes the heads hashes of the blockchain.
No description provided by the author
DeleteTrieNode deletes the specified trie node from the database.
No description provided by the author
DeleteTxLookupEntries removes all transaction lookups for a given block.
DeleteTxLookupEntry removes all transaction data associated with a hash.
No description provided by the author
No description provided by the author
No description provided by the author
DeleteWorkObject deletes the work object stored for the header hash.
DeleteWorkObjectBody deletes the work object body stored for the header hash.
DeleteWorkObjectHeader deletes the work object header stored for the header hash.
FindCommonAncestor returns the last common ancestor of two block headers.
No description provided by the author
No description provided by the author
HasBody verifies the existence of a block body corresponding to the hash.
HasHeader verifies the existence of a block header corresponding to the hash.
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.
No description provided by the author
IterateStorageSnapshots returns an iterator for walking the entire storage space of a specific account.
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.
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.
NewPebbleDBDatabase creates a persistent key-value database without a freezer moving immutable chain segments into cold storage.
NewTable returns a database object that prefixes all keys with a given string.
Open opens both a disk-based key-value database such as leveldb or pebble, but also integrates it with a freezer database -- if the AncientDir option has been set on the provided OpenOptions.
ReadAccountSnapshot retrieves the snapshot entry of an account trie leaf.
ReadAllHashes retrieves all the hashes assigned to blocks at a certain heights, both canonical and reorged forks included.
No description provided by the author
ReadBadHashesList retreives the bad hashes corresponding to the recent fork.
ReadBestPendingHeader retreive's the pending header stored in hash.
ReadBloom retreives the bloom corresponding to a given block.
ReadBloomBits retrieves the compressed bloom bit vector belonging to the given section and bit index from the.
ReadBloomProto retrieves the bloom for the given block, in bytes.
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.
No description provided by the author
No description provided by the author
No description provided by the author
ReadDatabaseVersion retrieves the version number of the database.
No description provided by the author
No description provided by the author
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.
ReadHeadHeaderHash retrieves the hash of the current canonical head header.
ReadHeadsHashes retreive's the heads hashes of the blockchain.
ReadInboundEtxs reads the inbound etxs from the database.
ReadInterlinkHashes retreives the interlinkhashes corresponding to a given block.
No description provided by the author
No description provided by the author
ReadManifest retreives the manifest corresponding to a given block.
No description provided by the author
No description provided by the author
No description provided by the author
ReadPbBodyKeys retreive's the phBodyKeys of the worker.
ReadPbCacheBody retrieves the block body corresponding to the hash.
ReadPendingEtxs retreives the pending ETXs corresponding to a given block.
ReadPendingEtxsProto retrieves the set of pending ETXs for the given block, in Proto encoding.
ReadPendingEtxsRollup retreives the pending ETXs rollup corresponding to a given block.
ReadPreimage retrieves a single preimage of the provided hash.
No description provided by the author
No description provided by the author
ReadRawReceipts retrieves all the transaction receipts belonging to a block.
ReadReceipts retrieves all the transaction receipts belonging to a block, including its correspoinding metadata fields.
ReadReceiptsProto retrieves all the transaction receipts belonging to a block in Proto encoding.
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.
No description provided by the author
ReadStorageSnapshot retrieves the snapshot entry of an storage trie leaf.
No description provided by the author
ReadHeadsHashes retreive's the heads hashes of the blockchain.
No description provided by the author
ReadTransaction retrieves a specific transaction from the database, along with its added positional metadata.
ReadTrieNode retrieves the trie node of the provided hash.
No description provided by the author
ReadTxLookupEntry retrieves the positional metadata associated with a transaction hash to allow retrieving the transaction or receipt by hash.
No description provided by the author
ReadUtxoToBlockHeight reads the block height at which a UTXO was created This is not meant to be used in consensus.
ReadWorkObject retreive's the work object stored in hash.
ReadWorkObjectBody retreive's the work object body stored in hash.
No description provided by the author
ReadWorkObjectHeader retreive's the work object header stored in hash.
No description provided by the author
ReadWorkObjectWithWorkShares retreive's the work object stored in hash.
No description provided by the author
No description provided by the author
No description provided by the author
This can be optimized via VLQ encoding as btcd has done this key is 36 bytes long and can probably be reduced to 32 bytes.
No description provided by the author
WriteAccountSnapshot stores the snapshot entry of an account trie leaf.
No description provided by the author
No description provided by the author
WriteBadHashesList stores the bad hashes corresponding to the recent fork.
WriteBestPendingHeader writes the pending header of the terminus hash.
WriteBestPhKey writes the bestPhKey of the blockchain.
WriteBloom stores the bloom corresponding to a given block.
WriteBloomBits stores the compressed bloom bits vector belonging to the given section and bit index.
WriteBloomProto stores the bloom corresponding to a given block, in proto bug encoding.
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WriteDatabaseVersion stores the version number of the database.
No description provided by the author
No description provided by the author
WriteHeadBlockHash stores the head block's hash.
WriteHeaderNumber stores the hash->number mapping.
WriteHeadHeaderHash stores the hash of the current canonical head header.
WriteHeadsHashes writes the heads hashes of the blockchain.
WriteInboundEtxs stores the inbound etxs for a given dom block hashes.
WriteInterlinkHashes stores the interlink hashes corresponding to a given block.
No description provided by the author
WriteManifest stores the manifest corresponding to a given block.
No description provided by the author
No description provided by the author
No description provided by the author
WritePbBodyKeys writes the workers pendingHeaderBody keys to the db.
WritePbCacheBody stores a block body into the database.
WritePendingEtxs stores the pending ETXs corresponding to a given block.
WritePendingEtxsProto stores the pending ETXs corresponding to a given block, in Proto encoding.
WritePendingEtxsRollup stores the pending ETXs rollup corresponding to a given block.
WritePreimages writes the provided set of preimages to the database.
No description provided by the author
No description provided by the author
WriteReceipts stores all the transaction receipts belonging to a block.
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.
No description provided by the author
WriteStorageSnapshot stores the snapshot entry of an storage trie leaf.
No description provided by the author
WriteTermini writes the heads hashes of the blockchain.
No description provided by the author
WriteTrieNode writes the provided trie node database.
No description provided by the author
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.
No description provided by the author
No description provided by the author
WriteWorkObject writes the work object of the terminus hash.
WriteWorkObjectBody writes the work object body of the terminus hash.
WriteWorkObjectHeader writes the work object header of the terminus hash.
# Constants
len(CoinbaseLockupPrefix) + 2*common.AddressLength + 1 + 4.
Pebble is unsuported on 32bit architecture.
# Variables
addressLockupsPrefix + address -> []types.Lockup.
addressUtxosPrefix + address -> []types.UtxoEntry.
BloomBitsIndexPrefix is the data table of a chain indexer to track its progress.
No description provided by the author
bloomBitsPrefix + bit (uint16 big endian) + section (uint64 big endian) + hash -> bloom bits.
CodePrefix + code hash -> account code.
coinbaseLockupPrefix + ownerContract + beneficiaryMiner + lockupByte + epoch -> lockup.
No description provided by the author
FreezerNoSnappy configures whether compression is disabled for the ancient-tables.
No description provided by the author
SnapshotAccountPrefix + account hash -> account trie value.
SnapshotStoragePrefix + account hash + storage hash -> storage trie value.
No description provided by the author
No description provided by the author
outpointPrefix + hash -> types.Outpoint.
# Structs
No description provided by the author
LegacyTxLookupEntry is the legacy TxLookupEntry definition with some unnecessary fields.
OpenOptions contains the options to apply when opening a database.
No description provided by the author
No description provided by the author