package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev

# Functions

DeleteBlock removes all block data associated with a hash.
DeleteBody removes all block body data associated with a hash.
DeleteCanonicalHash removes the number to hash canonical mapping.
DeleteCrossLinkShardBlock deletes the blockHash given shardID and blockNum.
DeleteCxLookupEntry removes all transaction data associated with a hash.
DeleteCXReceiptsProofSpent removes unspent indicator of a given blockHash.
DeleteHeader removes all block header data associated with a hash.
DeleteReceipts removes all receipt data associated with a block hash.
DeleteTd removes all block total difficulty data associated with a hash.
DeleteTxLookupEntry removes all transaction data associated with a hash.
DeleteValidatorSnapshot removes the validator's snapshot by its address.
DeleteValidatorStats ..
FindCommonAncestor returns the last common ancestor of two block headers.
HasBody verifies the existence of a block body corresponding to the hash.
HasHeader verifies the existence of a block header corresponding to the hash.
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
No description provided by the author
ReadBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body.
ReadBlockCommitSig retrieves the signature signed on a block.
ReadBlockRewardAccumulator ..
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.
ReadCanonicalHash retrieves the hash assigned to a canonical block number.
ReadChainConfig retrieves the consensus settings based on the given genesis hash.
ReadCrossLinkShardBlock retrieves the blockHash given shardID and blockNum.
ReadCxLookupEntry retrieves the positional metadata associated with a transaction hash to allow retrieving cross shard receipt by hash in destination shard not the original transaction in source shard return nil if not found.
ReadCXReceipt retrieves a specific transaction from the database, along with its added positional metadata.
ReadCXReceipts retrieves all the transactions of receipts given destination shardID, number and blockHash.
ReadCXReceiptsProofSpent check whether a CXReceiptsProof is unspent.
ReadDatabaseVersion retrieves the version number of the database.
ReadDelegationsByDelegator retrieves the list of validators delegated by a delegator Returns empty results instead of error if there is not data found.
ReadEpochBlockNumber retrieves the epoch block number for the given epoch, or nil if the given epoch is not found in the database.
ReadEpochVdfBlockNum retrieves the VDF block number for the given epoch.
ReadEpochVrfBlockNums retrieves the VRF block numbers for the given epoch.
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.
ReadHeadHeaderHash retrieves the hash of the current canonical head header.
ReadPendingCrossLinks retrieves last pending crosslinks.
ReadPreimage retrieves a single preimage of the provided hash.
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.
ReadShardLastCrossLink read the last cross link of a shard.
ReadShardState retrieves shard state of a specific epoch.
ReadSnapdbInfo return the SnapdbInfo of the db.
ReadStakingTransaction retrieves a specific staking transaction from the database, along with its added positional metadata.
ReadTd retrieves a block's total difficulty corresponding to the hash.
ReadTransaction 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.
ReadValidatorList retrieves all staking validators by its address.
ReadValidatorSnapshot retrieves validator's snapshot by its address.
ReadValidatorStats retrieves validator's stats by its address,.
WriteBlock serializes a block into the database, header and body separately.
WriteBlockCommitSig ..
WriteBlockRewardAccumulator ..
WriteBlockStxLookUpEntries writes all look up entries of block's staking transactions.
WriteBlockTxLookUpEntries writes all look up entries of block's transactions.
WriteBloomBits stores the compressed bloom bits vector belonging to the given section and bit index.
WriteBody storea 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.
WriteCrossLinkShardBlock stores the blockHash given shardID and blockNum.
WriteCxLookupEntries stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.
WriteCXReceipts stores all the transaction receipts given destination shardID, blockNumber and blockHash.
WriteCXReceiptsProofSpent write CXReceiptsProof as spent into database.
WriteDatabaseVersion stores the version number of the database.
WriteDelegationsByDelegator stores the list of validators delegated by a delegator.
WriteEpochBlockNumber stores the given epoch-number-to-epoch-block-number in the database.
WriteEpochVdfBlockNum stores the VDF block number for the given epoch.
WriteEpochVrfBlockNums stores the VRF block numbers for the given epoch.
WriteHeadBlockHash stores the head block's hash.
WriteHeader stores a block header into the database and also stores the hash- to-number mapping.
WriteHeadFastBlockHash stores the hash of the current fast-sync head block.
WriteHeadHeaderHash stores the hash of the current canonical head header.
WritePendingCrossLinks stores last pending crosslinks into database.
WritePendingSlashingCandidates stores last pending slashing candidates into database.
WritePreimages writes the provided set of preimages to the database.
WriteReceipts stores all the transaction receipts belonging to a block.
WriteShardLastCrossLink stores the last cross link of a shard.
WriteShardStateBytes stores sharding state into database.
WriteSnapdbInfo write the SnapdbInfo into db.
WriteTd stores the total difficulty of a block into the database.
WriteValidatorList stores all staking validators by its address.
WriteValidatorSnapshot stores validator's snapshot by its address.
WriteValidatorStats stores validator's stats by its address.

# Constants

not exist.
Indicate whether the receipts corresponding to a blockHash is spent or not.
Indicate whether the receipts corresponding to a blockHash is spent or not.

# Variables

BloomBitsIndexPrefix is the data table of a chain indexer to track its progress.
MsgNoShardStateFromDB error message for shard state reading failure.

# Structs

SnapdbInfo only used by cmd/astra/dumpdb.go.
TxLookupEntry is a positional metadata to help looking up the data content of a transaction or receipt given only its hash.

# Interfaces

DatabaseDeleter wraps the Delete method of a backing data store.
No description provided by the author
DatabaseReader wraps the Has and Get method of a backing data store.
DatabaseWriter wraps the Put method of a backing data store.