package
0.0.0-20250119000602-809120120630
Repository: https://github.com/n42blockchain/n42.git
Documentation: pkg.go.dev
# Functions
AppendReceipts stores all the transaction receipts belonging to a block.
No description provided by the author
No description provided by the author
No description provided by the author
DeleteDeposit removes Deposit data associated with an address.
DeleteHeaderNumber removes hash->number mapping.
DeleteTxLookupEntry removes all transaction data associated with a hash.
No description provided by the author
FirstKey - candidate on move to kv.Tx interface.
No description provided by the author
GetAccountReward.
GetDeposit.
No description provided by the author
HasBlock - is more efficient than ReadBlock because doesn't read transactions.
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.
IsCanonicalHash determines whether a header with the given hash is on the canonical chain.
IsDeposit is deposit account.
LastKey - candidate on move to kv.Tx interface.
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
PutAccountReward.
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
No description provided by the author
ReadBodyByNumber - returns canonical block body.
No description provided by the author
ReadBodyRAW retrieves the block body (transactions and uncles) in encoding.
No description provided by the author
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
No description provided by the author
No description provided by the author
ReadHeadBlockHash retrieves the hash of the current canonical head block.
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.
ReadHeaderRAW retrieves a block header in its raw database encoding.
No description provided by the author
ReadHeadHeaderHash retrieves the hash of the current canonical head header.
ReadRawReceipts retrieves all the transaction receipts belonging to a block.
No description provided by the author
ReadReceipts retrieves all the transaction receipts belonging to a block, including its corresponding metadata fields.
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
ReadTd retrieves a block's total difficulty corresponding to the hash.
No description provided by the author
ReadTransaction retrieves a specific transaction from the database, along with its added positional metadata.
ReadTransactionByHash retrieves a specific transaction from the database, along with its added positional metadata.
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
SecondKey - useful if table always has zero-key (for example genesis block).
No description provided by the author
TruncateBlocks - delete block >= blockFrom does decrement sequences of kv.EthTx and kv.NonCanonicalTxs doesn't delete Receipts, Senders, Canonical markers, TotalDifficulty.
TruncateCanonicalHash removes all the number to hash canonical mapping from block number N.
TruncateReceipts removes all receipt for given block number or newer.
TruncateTd removes all block total difficulty from block number N.
WriteBlock serializes a block into the database, header and body separately.
No description provided by the author
WriteBodyForStorage stores an 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.
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.
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
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.
No description provided by the author
WriteTxLookupEntries stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.
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.