Documentation ¶
Index ¶
- func BatchIndexBlockByChunkID(blockID, chunkID flow.Identifier) func(batch *badger.WriteBatch) error
- func BatchIndexExecutionReceipts(blockID, receiptID flow.Identifier) func(batch *badger.WriteBatch) error
- func BatchIndexExecutionResult(blockID flow.Identifier, resultID flow.Identifier) func(batch *badger.WriteBatch) error
- func BatchIndexOwnExecutionReceipt(blockID flow.Identifier, receiptID flow.Identifier) func(batch *badger.WriteBatch) error
- func BatchIndexStateCommitment(blockID flow.Identifier, commit flow.StateCommitment) func(batch *badger.WriteBatch) error
- func BatchInsertChunkDataPack(c *flow.ChunkDataPack) func(batch *badger.WriteBatch) error
- func BatchInsertEvent(blockID flow.Identifier, event flow.Event) func(batch *badger.WriteBatch) error
- func BatchInsertExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(batch *badger.WriteBatch) error
- func BatchInsertExecutionResult(result *flow.ExecutionResult) func(batch *badger.WriteBatch) error
- func BatchInsertServiceEvent(blockID flow.Identifier, event flow.Event) func(batch *badger.WriteBatch) error
- func BatchInsertTransactionResult(blockID flow.Identifier, transactionResult *flow.TransactionResult) func(batch *badger.WriteBatch) error
- func Fail(err error) func(*badger.Txn) error
- func FindHeaders(filter func(header *flow.Header) bool, found *[]flow.Header) func(*badger.Txn) error
- func IndexBlockHeight(height uint64, blockID flow.Identifier) func(*badger.Txn) error
- func IndexBlockIDByChunkID(chunkID, blockID flow.Identifier) func(*badger.Txn) error
- func IndexBlockSeal(blockID flow.Identifier, sealID flow.Identifier) func(*badger.Txn) error
- func IndexClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID flow.Identifier) func(*badger.Txn) error
- func IndexCollectionBlock(collID flow.Identifier, blockID flow.Identifier) func(*badger.Txn) error
- func IndexCollectionByTransaction(txID flow.Identifier, collectionID flow.Identifier) func(*badger.Txn) error
- func IndexCollectionPayload(blockID flow.Identifier, txIDs []flow.Identifier) func(*badger.Txn) error
- func IndexCollectionReference(clusterBlockID, refID flow.Identifier) func(*badger.Txn) error
- func IndexExecutionReceipts(blockID, receiptID flow.Identifier) func(*badger.Txn) error
- func IndexExecutionResult(blockID flow.Identifier, resultID flow.Identifier) func(*badger.Txn) error
- func IndexOwnExecutionReceipt(blockID flow.Identifier, receiptID flow.Identifier) func(*badger.Txn) error
- func IndexPayloadGuarantees(blockID flow.Identifier, guarIDs []flow.Identifier) func(*badger.Txn) error
- func IndexPayloadReceipts(blockID flow.Identifier, receiptIDs []flow.Identifier) func(*badger.Txn) error
- func IndexPayloadResults(blockID flow.Identifier, resultIDs []flow.Identifier) func(*badger.Txn) error
- func IndexPayloadSeals(blockID flow.Identifier, sealIDs []flow.Identifier) func(*badger.Txn) error
- func IndexResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) func(*badger.Txn) error
- func IndexStateCommitment(blockID flow.Identifier, commit flow.StateCommitment) func(*badger.Txn) error
- func InitJobLatestIndex(queue string, index uint64) func(*badger.Txn) error
- func InitMax(tx *badger.Txn) error
- func InsertBlockChildren(blockID flow.Identifier, childrenIDs []flow.Identifier) func(*badger.Txn) error
- func InsertBlockValidity(blockID flow.Identifier, valid bool) func(*badger.Txn) error
- func InsertChunkDataPack(c *flow.ChunkDataPack) func(*badger.Txn) error
- func InsertChunkLocator(locator *chunks.Locator) func(*badger.Txn) error
- func InsertClusterFinalizedHeight(clusterID flow.ChainID, number uint64) func(*badger.Txn) error
- func InsertCollection(collection *flow.LightCollection) func(*badger.Txn) error
- func InsertEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(*badger.Txn) error
- func InsertEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(*badger.Txn) error
- func InsertEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(*badger.Txn) error
- func InsertEvent(blockID flow.Identifier, event flow.Event) func(*badger.Txn) error
- func InsertExecutedBlock(blockID flow.Identifier) func(*badger.Txn) error
- func InsertExecutionForkEvidence(conflictingSeals []*flow.IncorporatedResultSeal) func(*badger.Txn) error
- func InsertExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(*badger.Txn) error
- func InsertExecutionResult(result *flow.ExecutionResult) func(*badger.Txn) error
- func InsertExecutionStateInteractions(blockID flow.Identifier, interactions []*delta.Snapshot) func(*badger.Txn) error
- func InsertFinalizedHeight(height uint64) func(*badger.Txn) error
- func InsertGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error
- func InsertHeader(headerID flow.Identifier, header *flow.Header) func(*badger.Txn) error
- func InsertJobAtIndex(queue string, index uint64, entity flow.Identifier) func(*badger.Txn) error
- func InsertLastCompleteBlockHeight(height uint64) func(*badger.Txn) error
- func InsertMyDKGPrivateInfo(epochCounter uint64, info *dkg.DKGParticipantPriv) func(*badger.Txn) error
- func InsertProcessedIndex(jobName string, processed uint64) func(*badger.Txn) error
- func InsertResultApproval(approval *flow.ResultApproval) func(*badger.Txn) error
- func InsertRootHeight(height uint64) func(*badger.Txn) error
- func InsertRootQuorumCertificate(qc *flow.QuorumCertificate) func(txn *badger.Txn) error
- func InsertSeal(sealID flow.Identifier, seal *flow.Seal) func(*badger.Txn) error
- func InsertSealedHeight(height uint64) func(*badger.Txn) error
- func InsertServiceEvent(blockID flow.Identifier, event flow.Event) func(*badger.Txn) error
- func InsertStartedView(chainID flow.ChainID, view uint64) func(*badger.Txn) error
- func InsertTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(*badger.Txn) error
- func InsertTransactionResult(blockID flow.Identifier, transactionResult *flow.TransactionResult) func(*badger.Txn) error
- func InsertVotedView(chainID flow.ChainID, view uint64) func(*badger.Txn) error
- func LookupBlockHeight(height uint64, blockID *flow.Identifier) func(*badger.Txn) error
- func LookupBlockIDByChunkID(chunkID flow.Identifier, blockID *flow.Identifier) func(*badger.Txn) error
- func LookupBlockSeal(blockID flow.Identifier, sealID *flow.Identifier) func(*badger.Txn) error
- func LookupClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID *flow.Identifier) func(*badger.Txn) error
- func LookupCollectionBlock(collID flow.Identifier, blockID *flow.Identifier) func(*badger.Txn) error
- func LookupCollectionPayload(blockID flow.Identifier, txIDs *[]flow.Identifier) func(*badger.Txn) error
- func LookupCollectionReference(clusterBlockID flow.Identifier, refID *flow.Identifier) func(*badger.Txn) error
- func LookupEventsByBlockID(blockID flow.Identifier, events *[]flow.Event) func(*badger.Txn) error
- func LookupEventsByBlockIDEventType(blockID flow.Identifier, eventType flow.EventType, events *[]flow.Event) func(*badger.Txn) error
- func LookupExecutionReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(*badger.Txn) error
- func LookupExecutionResult(blockID flow.Identifier, resultID *flow.Identifier) func(*badger.Txn) error
- func LookupOwnExecutionReceipt(blockID flow.Identifier, receiptID *flow.Identifier) func(*badger.Txn) error
- func LookupPayloadGuarantees(blockID flow.Identifier, guarIDs *[]flow.Identifier) func(*badger.Txn) error
- func LookupPayloadReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(*badger.Txn) error
- func LookupPayloadResults(blockID flow.Identifier, resultIDs *[]flow.Identifier) func(*badger.Txn) error
- func LookupPayloadSeals(blockID flow.Identifier, sealIDs *[]flow.Identifier) func(*badger.Txn) error
- func LookupResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID *flow.Identifier) func(*badger.Txn) error
- func LookupServiceEventsByBlockID(blockID flow.Identifier, events *[]flow.Event) func(*badger.Txn) error
- func LookupStateCommitment(blockID flow.Identifier, commit *flow.StateCommitment) func(*badger.Txn) error
- func LookupTransactionResultsByBlockID(blockID flow.Identifier, txResults *[]flow.TransactionResult) func(*badger.Txn) error
- func RemoveChunkDataPack(chunkID flow.Identifier) func(*badger.Txn) error
- func RemoveCollection(collID flow.Identifier) func(*badger.Txn) error
- func RemoveExecutionForkEvidence() func(*badger.Txn) error
- func RetrieveBlockChildren(blockID flow.Identifier, childrenIDs *[]flow.Identifier) func(*badger.Txn) error
- func RetrieveBlockValidity(blockID flow.Identifier, valid *bool) func(*badger.Txn) error
- func RetrieveChunkDataPack(chunkID flow.Identifier, c *flow.ChunkDataPack) func(*badger.Txn) error
- func RetrieveChunkLocator(locatorID flow.Identifier, locator *chunks.Locator) func(*badger.Txn) error
- func RetrieveClusterFinalizedHeight(clusterID flow.ChainID, number *uint64) func(*badger.Txn) error
- func RetrieveCollection(collID flow.Identifier, collection *flow.LightCollection) func(*badger.Txn) error
- func RetrieveCollectionID(txID flow.Identifier, collectionID *flow.Identifier) func(*badger.Txn) error
- func RetrieveEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(*badger.Txn) error
- func RetrieveEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(*badger.Txn) error
- func RetrieveEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(*badger.Txn) error
- func RetrieveEvents(blockID flow.Identifier, transactionID flow.Identifier, events *[]flow.Event) func(*badger.Txn) error
- func RetrieveExecutedBlock(blockID *flow.Identifier) func(*badger.Txn) error
- func RetrieveExecutionForkEvidence(conflictingSeals *[]*flow.IncorporatedResultSeal) func(*badger.Txn) error
- func RetrieveExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(*badger.Txn) error
- func RetrieveExecutionResult(resultID flow.Identifier, result *flow.ExecutionResult) func(*badger.Txn) error
- func RetrieveExecutionStateInteractions(blockID flow.Identifier, interactions *[]*delta.Snapshot) func(*badger.Txn) error
- func RetrieveFinalizedHeight(height *uint64) func(*badger.Txn) error
- func RetrieveGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error
- func RetrieveHeader(blockID flow.Identifier, header *flow.Header) func(*badger.Txn) error
- func RetrieveJobAtIndex(queue string, index uint64, entity *flow.Identifier) func(*badger.Txn) error
- func RetrieveJobLatestIndex(queue string, index *uint64) func(*badger.Txn) error
- func RetrieveLastCompleteBlockHeight(height *uint64) func(*badger.Txn) error
- func RetrieveMyDKGPrivateInfo(epochCounter uint64, info *dkg.DKGParticipantPriv) func(*badger.Txn) error
- func RetrieveProcessedIndex(jobName string, processed *uint64) func(*badger.Txn) error
- func RetrieveResultApproval(approvalID flow.Identifier, approval *flow.ResultApproval) func(*badger.Txn) error
- func RetrieveRootHeight(height *uint64) func(*badger.Txn) error
- func RetrieveRootQuorumCertificate(qc *flow.QuorumCertificate) func(txn *badger.Txn) error
- func RetrieveSeal(sealID flow.Identifier, seal *flow.Seal) func(*badger.Txn) error
- func RetrieveSealedHeight(height *uint64) func(*badger.Txn) error
- func RetrieveStartedView(chainID flow.ChainID, view *uint64) func(*badger.Txn) error
- func RetrieveTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(*badger.Txn) error
- func RetrieveTransactionResult(blockID flow.Identifier, transactionID flow.Identifier, ...) func(*badger.Txn) error
- func RetrieveVotedView(chainID flow.ChainID, view *uint64) func(*badger.Txn) error
- func RetryOnConflict(action func(func(*badger.Txn) error) error, op func(tx *badger.Txn) error) error
- func RetryOnConflictTx(db *badger.DB, action func(*badger.DB, func(*transaction.Tx) error) error, ...) error
- func SetJobLatestIndex(queue string, index uint64) func(*badger.Txn) error
- func SetMax(tx storage.Transaction) error
- func SetProcessedIndex(jobName string, processed uint64) func(*badger.Txn) error
- func SkipDuplicates(op func(*badger.Txn) error) func(tx *badger.Txn) error
- func UpdateBlockChildren(blockID flow.Identifier, childrenIDs []flow.Identifier) func(*badger.Txn) error
- func UpdateClusterFinalizedHeight(clusterID flow.ChainID, number uint64) func(*badger.Txn) error
- func UpdateExecutedBlock(blockID flow.Identifier) func(*badger.Txn) error
- func UpdateFinalizedHeight(height uint64) func(*badger.Txn) error
- func UpdateLastCompleteBlockHeight(height uint64) func(*badger.Txn) error
- func UpdateSealedHeight(height uint64) func(*badger.Txn) error
- func UpdateStartedView(chainID flow.ChainID, view uint64) func(*badger.Txn) error
- func UpdateVotedView(chainID flow.ChainID, view uint64) func(*badger.Txn) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchIndexBlockByChunkID ¶ added in v0.15.0
func BatchIndexBlockByChunkID(blockID, chunkID flow.Identifier) func(batch *badger.WriteBatch) error
BatchIndexBlockByChunkID indexes blockID by chunkID into a batch
func BatchIndexExecutionReceipts ¶ added in v0.15.1
func BatchIndexExecutionReceipts(blockID, receiptID flow.Identifier) func(batch *badger.WriteBatch) error
BatchIndexExecutionReceipts inserts an execution receipt ID keyed by block ID and receipt ID into a batch
func BatchIndexExecutionResult ¶ added in v0.15.0
func BatchIndexExecutionResult(blockID flow.Identifier, resultID flow.Identifier) func(batch *badger.WriteBatch) error
BatchIndexExecutionResult inserts an execution result ID keyed by block ID into a batch
func BatchIndexOwnExecutionReceipt ¶ added in v0.15.1
func BatchIndexOwnExecutionReceipt(blockID flow.Identifier, receiptID flow.Identifier) func(batch *badger.WriteBatch) error
BatchIndexOwnExecutionReceipt inserts an execution receipt ID keyed by block ID into a batch
func BatchIndexStateCommitment ¶ added in v0.15.0
func BatchIndexStateCommitment(blockID flow.Identifier, commit flow.StateCommitment) func(batch *badger.WriteBatch) error
BatchIndexStateCommitment indexes a state commitment into a batch
State commitments are keyed by the block whose execution results in the state with the given commit.
func BatchInsertChunkDataPack ¶ added in v0.15.0
func BatchInsertChunkDataPack(c *flow.ChunkDataPack) func(batch *badger.WriteBatch) error
BatchInsertChunkDataPack upserts a chunk data pack keyed by chunk ID into a batch
func BatchInsertEvent ¶ added in v0.15.0
func BatchInsertEvent(blockID flow.Identifier, event flow.Event) func(batch *badger.WriteBatch) error
func BatchInsertExecutionReceiptMeta ¶ added in v0.15.1
func BatchInsertExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(batch *badger.WriteBatch) error
BatchInsertExecutionReceiptMeta inserts an execution receipt meta by ID.
func BatchInsertExecutionResult ¶ added in v0.15.0
func BatchInsertExecutionResult(result *flow.ExecutionResult) func(batch *badger.WriteBatch) error
UpsertExecutionResult inserts an execution result by ID.
func BatchInsertServiceEvent ¶ added in v0.15.0
func BatchInsertServiceEvent(blockID flow.Identifier, event flow.Event) func(batch *badger.WriteBatch) error
func BatchInsertTransactionResult ¶ added in v0.15.0
func BatchInsertTransactionResult(blockID flow.Identifier, transactionResult *flow.TransactionResult) func(batch *badger.WriteBatch) error
func FindHeaders ¶
func FindHeaders(filter func(header *flow.Header) bool, found *[]flow.Header) func(*badger.Txn) error
FindHeaders iterates through all headers, calling `filter` on each, and adding them to the `found` slice if `filter` returned true
func IndexBlockHeight ¶
func IndexBlockHeight(height uint64, blockID flow.Identifier) func(*badger.Txn) error
IndexBlockHeight indexes the height of a block. It should only be called on finalized blocks.
func IndexBlockIDByChunkID ¶ added in v0.15.0
func IndexBlockIDByChunkID(chunkID, blockID flow.Identifier) func(*badger.Txn) error
func IndexBlockSeal ¶
func IndexBlockSeal(blockID flow.Identifier, sealID flow.Identifier) func(*badger.Txn) error
func IndexClusterBlockHeight ¶
func IndexClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID flow.Identifier) func(*badger.Txn) error
IndexClusterBlockHeight inserts a block number to block ID mapping for the given cluster.
func IndexCollectionBlock ¶
func IndexCollectionBlock(collID flow.Identifier, blockID flow.Identifier) func(*badger.Txn) error
IndexCollectionBlock indexes a block by a collection within that block.
func IndexCollectionByTransaction ¶
func IndexCollectionByTransaction(txID flow.Identifier, collectionID flow.Identifier) func(*badger.Txn) error
IndexCollectionByTransaction inserts a collection id keyed by a transaction id
func IndexCollectionPayload ¶
func IndexCollectionPayload(blockID flow.Identifier, txIDs []flow.Identifier) func(*badger.Txn) error
IndexCollectionPayload indexes the transactions within the collection payload of a cluster block.
func IndexCollectionReference ¶
func IndexCollectionReference(clusterBlockID, refID flow.Identifier) func(*badger.Txn) error
IndexCollectionReference inserts the reference block ID for a cluster block payload (ie. collection) keyed by the cluster block ID
func IndexExecutionReceipts ¶ added in v0.15.0
func IndexExecutionReceipts(blockID, receiptID flow.Identifier) func(*badger.Txn) error
IndexExecutionReceipts inserts an execution receipt ID keyed by block ID and receipt ID. one block could have multiple receipts, even if they are from the same executor
func IndexExecutionResult ¶
func IndexExecutionResult(blockID flow.Identifier, resultID flow.Identifier) func(*badger.Txn) error
IndexExecutionResult inserts an execution result ID keyed by block ID
func IndexOwnExecutionReceipt ¶ added in v0.15.0
func IndexOwnExecutionReceipt(blockID flow.Identifier, receiptID flow.Identifier) func(*badger.Txn) error
IndexOwnExecutionReceipt inserts an execution receipt ID keyed by block ID
func IndexPayloadGuarantees ¶
func IndexPayloadGuarantees(blockID flow.Identifier, guarIDs []flow.Identifier) func(*badger.Txn) error
func IndexPayloadReceipts ¶ added in v0.14.0
func IndexPayloadReceipts(blockID flow.Identifier, receiptIDs []flow.Identifier) func(*badger.Txn) error
func IndexPayloadResults ¶ added in v0.16.0
func IndexPayloadResults(blockID flow.Identifier, resultIDs []flow.Identifier) func(*badger.Txn) error
func IndexPayloadSeals ¶
func IndexPayloadSeals(blockID flow.Identifier, sealIDs []flow.Identifier) func(*badger.Txn) error
func IndexResultApproval ¶ added in v0.14.0
func IndexResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) func(*badger.Txn) error
IndexResultApproval inserts a ResultApproval ID keyed by ExecutionResult ID and chunk index. If a value for this key exists, a storage.ErrAlreadyExists error is returned. This operation is only used by the ResultApprovals store, which is only used within a Verification node, where it is assumed that there is only one approval per chunk.
func IndexStateCommitment ¶
func IndexStateCommitment(blockID flow.Identifier, commit flow.StateCommitment) func(*badger.Txn) error
IndexStateCommitment indexes a state commitment.
State commitments are keyed by the block whose execution results in the state with the given commit.
func InitJobLatestIndex ¶ added in v0.15.0
func InitMax ¶
func InitMax(tx *badger.Txn) error
InitMax retrieves the maximum key length to have it internally in the package after restarting.
func InsertBlockChildren ¶
func InsertBlockChildren(blockID flow.Identifier, childrenIDs []flow.Identifier) func(*badger.Txn) error
InsertBlockChildren insert an index to lookup the direct child of a block by its ID
func InsertBlockValidity ¶
func InsertBlockValidity(blockID flow.Identifier, valid bool) func(*badger.Txn) error
InsertBlockValidity marks a block as valid or invalid, defined by the consensus algorithm.
func InsertChunkDataPack ¶
func InsertChunkDataPack(c *flow.ChunkDataPack) func(*badger.Txn) error
InsertChunkDataPack inserts a chunk data pack keyed by chunk ID.
func InsertChunkLocator ¶ added in v0.15.0
func InsertClusterFinalizedHeight ¶
InsertClusterFinalizedHeight inserts the finalized boundary for the given cluster.
func InsertCollection ¶
func InsertCollection(collection *flow.LightCollection) func(*badger.Txn) error
func InsertEpochCommit ¶
func InsertEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(*badger.Txn) error
func InsertEpochSetup ¶
func InsertEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(*badger.Txn) error
func InsertEpochStatus ¶
func InsertEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(*badger.Txn) error
func InsertEvent ¶
func InsertEvent(blockID flow.Identifier, event flow.Event) func(*badger.Txn) error
func InsertExecutedBlock ¶
func InsertExecutedBlock(blockID flow.Identifier) func(*badger.Txn) error
func InsertExecutionForkEvidence ¶ added in v0.13.0
func InsertExecutionForkEvidence(conflictingSeals []*flow.IncorporatedResultSeal) func(*badger.Txn) error
func InsertExecutionReceiptMeta ¶
func InsertExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(*badger.Txn) error
InsertExecutionReceiptMeta inserts an execution receipt meta by ID.
func InsertExecutionResult ¶
func InsertExecutionResult(result *flow.ExecutionResult) func(*badger.Txn) error
InsertExecutionResult inserts an execution result by ID.
func InsertExecutionStateInteractions ¶
func InsertExecutionStateInteractions(blockID flow.Identifier, interactions []*delta.Snapshot) func(*badger.Txn) error
func InsertFinalizedHeight ¶
func InsertGuarantee ¶
func InsertGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error
func InsertHeader ¶
func InsertHeader(headerID flow.Identifier, header *flow.Header) func(*badger.Txn) error
func InsertJobAtIndex ¶ added in v0.15.0
func InsertJobAtIndex(queue string, index uint64, entity flow.Identifier) func(*badger.Txn) error
InsertJobAtIndex insert an entity ID at the given index
func InsertMyDKGPrivateInfo ¶ added in v0.20.0
func InsertMyDKGPrivateInfo(epochCounter uint64, info *dkg.DKGParticipantPriv) func(*badger.Txn) error
func InsertProcessedIndex ¶ added in v0.15.0
func InsertResultApproval ¶ added in v0.14.0
func InsertResultApproval(approval *flow.ResultApproval) func(*badger.Txn) error
InsertResultApproval inserts a ResultApproval by ID.
func InsertRootHeight ¶
func InsertRootQuorumCertificate ¶ added in v0.15.0
func InsertRootQuorumCertificate(qc *flow.QuorumCertificate) func(txn *badger.Txn) error
InsertRootQuorumCertificate inserts the root quorum certificate for the local blockchain state. The root quorum certificate certifies the root block and is used to bootstrap HotStuff.
Only the root quorum certificate must be explicitly stored in this way! All other quorum certificates are implicitly included in the child of block they certify in the ParentSigs field.
func InsertSeal ¶
func InsertSeal(sealID flow.Identifier, seal *flow.Seal) func(*badger.Txn) error
func InsertSealedHeight ¶
func InsertServiceEvent ¶ added in v0.14.0
func InsertServiceEvent(blockID flow.Identifier, event flow.Event) func(*badger.Txn) error
func InsertStartedView ¶
InsertStartedView inserts a view into the database.
func InsertTransaction ¶
func InsertTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(*badger.Txn) error
InsertTransaction inserts a transaction keyed by transaction fingerprint.
func InsertTransactionResult ¶
func InsertTransactionResult(blockID flow.Identifier, transactionResult *flow.TransactionResult) func(*badger.Txn) error
func InsertVotedView ¶
InsertVotedView inserts a view into the database.
func LookupBlockHeight ¶
func LookupBlockHeight(height uint64, blockID *flow.Identifier) func(*badger.Txn) error
LookupBlockHeight retrieves finalized blocks by height.
func LookupBlockIDByChunkID ¶ added in v0.15.0
func LookupBlockIDByChunkID(chunkID flow.Identifier, blockID *flow.Identifier) func(*badger.Txn) error
LookupBlockIDByChunkID looks up a block by a collection within that block.
func LookupBlockSeal ¶
func LookupBlockSeal(blockID flow.Identifier, sealID *flow.Identifier) func(*badger.Txn) error
func LookupClusterBlockHeight ¶
func LookupClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID *flow.Identifier) func(*badger.Txn) error
LookupClusterBlockHeight retrieves a block ID by number for the given cluster
func LookupCollectionBlock ¶
func LookupCollectionBlock(collID flow.Identifier, blockID *flow.Identifier) func(*badger.Txn) error
LookupCollectionBlock looks up a block by a collection within that block.
func LookupCollectionPayload ¶
func LookupCollectionPayload(blockID flow.Identifier, txIDs *[]flow.Identifier) func(*badger.Txn) error
LookupCollection looks up the collection for a given cluster payload.
func LookupCollectionReference ¶
func LookupCollectionReference(clusterBlockID flow.Identifier, refID *flow.Identifier) func(*badger.Txn) error
LookupCollectionReference looks up the reference block ID for a cluster block payload (ie. collection) keyed by the cluster block ID.
func LookupEventsByBlockID ¶
func LookupEventsByBlockID(blockID flow.Identifier, events *[]flow.Event) func(*badger.Txn) error
func LookupExecutionReceipts ¶ added in v0.15.0
func LookupExecutionReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(*badger.Txn) error
LookupExecutionReceipts finds all execution receipts by block ID
func LookupExecutionResult ¶
func LookupExecutionResult(blockID flow.Identifier, resultID *flow.Identifier) func(*badger.Txn) error
LookupExecutionResult finds execution result ID by block
func LookupOwnExecutionReceipt ¶ added in v0.15.0
func LookupOwnExecutionReceipt(blockID flow.Identifier, receiptID *flow.Identifier) func(*badger.Txn) error
LookupOwnExecutionReceipt finds execution receipt ID by block
func LookupPayloadGuarantees ¶
func LookupPayloadGuarantees(blockID flow.Identifier, guarIDs *[]flow.Identifier) func(*badger.Txn) error
func LookupPayloadReceipts ¶ added in v0.14.0
func LookupPayloadReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(*badger.Txn) error
func LookupPayloadResults ¶ added in v0.16.0
func LookupPayloadResults(blockID flow.Identifier, resultIDs *[]flow.Identifier) func(*badger.Txn) error
func LookupPayloadSeals ¶
func LookupPayloadSeals(blockID flow.Identifier, sealIDs *[]flow.Identifier) func(*badger.Txn) error
func LookupResultApproval ¶ added in v0.14.0
func LookupResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID *flow.Identifier) func(*badger.Txn) error
LookupResultApproval finds a ResultApproval by result ID and chunk index.
func LookupServiceEventsByBlockID ¶ added in v0.14.0
func LookupServiceEventsByBlockID(blockID flow.Identifier, events *[]flow.Event) func(*badger.Txn) error
func LookupStateCommitment ¶
func LookupStateCommitment(blockID flow.Identifier, commit *flow.StateCommitment) func(*badger.Txn) error
LookupStateCommitment gets a state commitment keyed by block ID
State commitments are keyed by the block whose execution results in the state with the given commit.
func LookupTransactionResultsByBlockID ¶
func LookupTransactionResultsByBlockID(blockID flow.Identifier, txResults *[]flow.TransactionResult) func(*badger.Txn) error
func RemoveChunkDataPack ¶
func RemoveChunkDataPack(chunkID flow.Identifier) func(*badger.Txn) error
RemoveChunkDataPack removes the chunk data pack with the given chunk ID.
func RemoveCollection ¶
func RemoveCollection(collID flow.Identifier) func(*badger.Txn) error
func RemoveExecutionForkEvidence ¶ added in v0.13.0
func RemoveExecutionForkEvidence() func(*badger.Txn) error
func RetrieveBlockChildren ¶
func RetrieveBlockChildren(blockID flow.Identifier, childrenIDs *[]flow.Identifier) func(*badger.Txn) error
RetrieveBlockChildren the child block ID by parent block ID
func RetrieveBlockValidity ¶
func RetrieveBlockValidity(blockID flow.Identifier, valid *bool) func(*badger.Txn) error
RetrieveBlockValidity returns a block's validity wrt the consensus algorithm.
func RetrieveChunkDataPack ¶
func RetrieveChunkDataPack(chunkID flow.Identifier, c *flow.ChunkDataPack) func(*badger.Txn) error
RetrieveChunkDataPack retrieves a chunk data pack by chunk ID.
func RetrieveChunkLocator ¶ added in v0.15.0
func RetrieveChunkLocator(locatorID flow.Identifier, locator *chunks.Locator) func(*badger.Txn) error
func RetrieveClusterFinalizedHeight ¶
RetrieveClusterFinalizedHeight retrieves the finalized boundary for the given cluster.
func RetrieveCollection ¶
func RetrieveCollection(collID flow.Identifier, collection *flow.LightCollection) func(*badger.Txn) error
func RetrieveCollectionID ¶
func RetrieveCollectionID(txID flow.Identifier, collectionID *flow.Identifier) func(*badger.Txn) error
LookupCollectionID retrieves a collection id by transaction id
func RetrieveEpochCommit ¶
func RetrieveEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(*badger.Txn) error
func RetrieveEpochSetup ¶
func RetrieveEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(*badger.Txn) error
func RetrieveEpochStatus ¶
func RetrieveEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(*badger.Txn) error
func RetrieveEvents ¶
func RetrieveEvents(blockID flow.Identifier, transactionID flow.Identifier, events *[]flow.Event) func(*badger.Txn) error
func RetrieveExecutedBlock ¶
func RetrieveExecutedBlock(blockID *flow.Identifier) func(*badger.Txn) error
func RetrieveExecutionForkEvidence ¶ added in v0.13.0
func RetrieveExecutionForkEvidence(conflictingSeals *[]*flow.IncorporatedResultSeal) func(*badger.Txn) error
func RetrieveExecutionReceiptMeta ¶
func RetrieveExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(*badger.Txn) error
RetrieveExecutionReceipt retrieves a execution receipt meta by ID.
func RetrieveExecutionResult ¶
func RetrieveExecutionResult(resultID flow.Identifier, result *flow.ExecutionResult) func(*badger.Txn) error
RetrieveExecutionResult retrieves a transaction by fingerprint.
func RetrieveExecutionStateInteractions ¶
func RetrieveExecutionStateInteractions(blockID flow.Identifier, interactions *[]*delta.Snapshot) func(*badger.Txn) error
func RetrieveFinalizedHeight ¶
func RetrieveGuarantee ¶
func RetrieveGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(*badger.Txn) error
func RetrieveHeader ¶
func RetrieveHeader(blockID flow.Identifier, header *flow.Header) func(*badger.Txn) error
func RetrieveJobAtIndex ¶ added in v0.15.0
func RetrieveJobAtIndex(queue string, index uint64, entity *flow.Identifier) func(*badger.Txn) error
RetrieveJobAtIndex returns the entity at the given index
func RetrieveJobLatestIndex ¶ added in v0.15.0
func RetrieveMyDKGPrivateInfo ¶ added in v0.20.0
func RetrieveMyDKGPrivateInfo(epochCounter uint64, info *dkg.DKGParticipantPriv) func(*badger.Txn) error
func RetrieveProcessedIndex ¶ added in v0.15.0
RetrieveProcessedIndex returns the processed index for a job consumer
func RetrieveResultApproval ¶ added in v0.14.0
func RetrieveResultApproval(approvalID flow.Identifier, approval *flow.ResultApproval) func(*badger.Txn) error
RetrieveResultApproval retrieves an approval by ID.
func RetrieveRootHeight ¶
func RetrieveRootQuorumCertificate ¶ added in v0.15.0
func RetrieveRootQuorumCertificate(qc *flow.QuorumCertificate) func(txn *badger.Txn) error
func RetrieveSeal ¶
func RetrieveSeal(sealID flow.Identifier, seal *flow.Seal) func(*badger.Txn) error
func RetrieveSealedHeight ¶
func RetrieveStartedView ¶
RetrieveStartedView retrieves a view from the database.
func RetrieveTransaction ¶
func RetrieveTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(*badger.Txn) error
RetrieveTransaction retrieves a transaction by fingerprint.
func RetrieveTransactionResult ¶
func RetrieveTransactionResult(blockID flow.Identifier, transactionID flow.Identifier, transactionResult *flow.TransactionResult) func(*badger.Txn) error
func RetrieveVotedView ¶
RetrieveVotedView retrieves a view from the database.
func RetryOnConflict ¶
func RetryOnConflictTx ¶ added in v0.17.0
func RetryOnConflictTx(db *badger.DB, action func(*badger.DB, func(*transaction.Tx) error) error, op func(*transaction.Tx) error) error
func SetJobLatestIndex ¶ added in v0.15.0
func SetMax ¶
func SetMax(tx storage.Transaction) error
SetMax sets the value for the maximum key length used for efficient iteration.
func SetProcessedIndex ¶ added in v0.15.0
SetProcessedIndex updates the processed index for a job consumer with given index
func SkipDuplicates ¶
func UpdateBlockChildren ¶
func UpdateBlockChildren(blockID flow.Identifier, childrenIDs []flow.Identifier) func(*badger.Txn) error
UpdateBlockChildren updates the children for a block.
func UpdateClusterFinalizedHeight ¶
UpdateClusterFinalizedHeight updates the finalized boundary for the given cluster.
func UpdateExecutedBlock ¶
func UpdateExecutedBlock(blockID flow.Identifier) func(*badger.Txn) error
func UpdateFinalizedHeight ¶
func UpdateSealedHeight ¶
func UpdateStartedView ¶
UpdateStartedView updates the view in the database.
Types ¶
This section is empty.
Source Files ¶
- approvals.go
- children.go
- chunkDataPacks.go
- chunk_locators.go
- cluster.go
- collections.go
- commits.go
- common.go
- dkg_keys.go
- epoch.go
- events.go
- guarantees.go
- headers.go
- heights.go
- interactions.go
- jobs.go
- max.go
- modifiers.go
- prefix.go
- receipts.go
- results.go
- root_qc.go
- seals.go
- transaction_results.go
- transactions.go
- views.go