package
3.0.0-alpha5+incompatible
Repository: https://github.com/erigontech/erigon.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeleteBody removes all block body data associated with a hash.
DeleteHeader - dangerous, use PruneBlocks/TruncateBlocks methods.
No description provided by the author
DeleteTxLookupEntry removes all transaction data associated with a hash.
No description provided by the author
No description provided by the author
HasBlock - is more efficient than ReadBlock because doesn't read transactions.
HasBorReceipts verifies the existence of all block receipt belonging to a block.
No description provided by the author
No description provided by the author
No description provided by the author
IsPosBlock returns true if the block number comes after POS transition or is the last POW block.
PruneBlocks - delete [1, to) old blocks after moving it to snapshots.
PruneTable has `limit` parameter to avoid too large data deletes per one sync cycle - better delete by small portions to reduce db.FreeList size.
No description provided by the author
No description provided by the author
No description provided by the author
ReadBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body.
No description provided by the author
No description provided by the author
No description provided by the author
ReadBodyRLP retrieves the block body (transactions and uncles) in RLP encoding.
No description provided by the author
ReadBorTransactionForBlock retrieves a specific bor (fake) transaction associated with a block, along with its added positional metadata.
No description provided by the author
ReadCanonicalHash retrieves the hash assigned to a canonical block number.
ReadChainConfig retrieves the consensus settings based on the given genesis hash.
No description provided by the author
ReadCurrentHeader reads the current canonical head header.
ReadCurrentHeaderHavingBody reads the current canonical head header for which its block body is known.
No description provided by the author
No description provided by the author
No description provided by the author
ReadForkchoiceFinalized retrieves finalizedBlockHash from the last Engine API forkChoiceUpdated.
ReadForkchoiceHead retrieves headBlockHash from the last Engine API forkChoiceUpdated.
ReadForkchoiceSafe retrieves safeBlockHash from the last Engine API forkChoiceUpdated.
No description provided by the author
ReadHeadBlockHash retrieves the hash of the current canonical head header for which its block body is known.
ReadHeader retrieves the block header corresponding to the hash.
No description provided by the author
No description provided by the author
ReadHeaderNumber returns the header number assigned to a hash.
ReadHeaderRLP retrieves a block header in its raw RLP database encoding.
No description provided by the author
ReadHeadHeaderHash retrieves the hash of the current canonical head header.
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 corresponding metadata fields.
No description provided by the author
Deprecated: use readBodyForStorage.
ReadTd retrieves a block's total difficulty corresponding to the 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
No description provided by the author
No description provided by the author
ResetSequence - allow set arbitrary value to sequence (for example to decrement it to exact value).
Transitioned returns true if the block number comes after POS transition or is the last POW block.
TruncateBlocks - delete block >= blockFrom does decrement sequences of kv.EthTx doesn't delete Receipts, Senders, Canonical markers, TotalDifficulty.
No description provided by the author
TruncateCanonicalHash removes all the number to hash canonical mapping from block number N Mark chain as bad feature: - BadBlock must be not available by hash - but available by hash+num - if read num from kv.BadHeaderNumber table - prune blocks: must delete Canonical/NonCanonical/BadBlocks also.
TruncateReceipts removes all receipt for given block number or newer - used for Unwind.
TruncateTd removes all block total difficulty from block number N.
No description provided by the author
WriteBlock serializes a block into the database, header and body separately.
No description provided by the author
WriteBodyForStorage 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.
No description provided by the author
No description provided by the author
WriteForkchoiceFinalized stores finalizedBlockHash from the last Engine API forkChoiceUpdated.
WriteForkchoiceHead stores headBlockHash from the last Engine API forkChoiceUpdated.
WriteForkchoiceSafe stores safeBlockHash from the last Engine API forkChoiceUpdated.
No description provided by the author
WriteHeadBlockHash stores the hash of the current canonical head header for which its block body is known.
WriteHeader stores a block header into the database and also stores the hash- to-number mapping.
WriteHeaderNumber stores the hash->number mapping.
No description provided by the author
WriteHeadHeaderHash stores the hash of the current canonical head header.
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
WriteReceipts stores all the transaction receipts belonging to a block.
No description provided by the author
WriteTd stores the total difficulty of a block into the database.
Write transactions to the database and use txnID as first identifier.
WriteTxLookupEntries 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
# Structs
TxLookupEntry is a positional metadata to help looking up the data content of a transaction or receipt given only its hash.