Documentation ¶
Index ¶
- func BatchIndexLightTransactionResult(blockID flow.Identifier, txIndex uint32, ...) func(batch storage.BatchWriter) error
- func BatchIndexTransactionResult(blockID flow.Identifier, txIndex uint32, ...) func(storage.BatchWriter) error
- func BatchRemoveTransactionResultsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
- func BatchUpdate(db *pebble.DB, fn func(tx pebble.Writer) error) error
- func BlockExists(blockID flow.Identifier, blockExists *bool) func(pebble.Reader) error
- func CheckEpochEmergencyFallbackTriggered(triggered *bool) func(pebble.Reader) error
- func EnsurePublicDB(db *pebble.DB) error
- func EnsureSecretDB(db *pebble.DB) error
- func FindHeaders(filter func(header *flow.Header) bool, found *[]flow.Header) func(pebble.Reader) error
- func GetBlockIDsByStatus(blockIDs *[]flow.Identifier, targetUploadStatus bool) func(pebble.Reader) error
- func GetComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted *bool) func(pebble.Reader) error
- func HasChunkLocator(locatorID flow.Identifier, exist *bool) func(pebble.Reader) error
- func IndexBlockHeight(height uint64, blockID flow.Identifier) func(pebble.Writer) error
- func IndexClusterBlockByReferenceHeight(refHeight uint64, clusterBlockID flow.Identifier) func(pebble.Writer) error
- func IndexClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID flow.Identifier) func(pebble.Writer) error
- func IndexCollectionBlock(collID flow.Identifier, blockID flow.Identifier) func(pebble.Writer) error
- func IndexCollectionByTransaction(txID flow.Identifier, collectionID flow.Identifier) func(pebble.Writer) error
- func IndexCollectionPayload(blockID flow.Identifier, txIDs []flow.Identifier) func(pebble.Writer) error
- func IndexExecutionReceipts(blockID, receiptID flow.Identifier) func(pebble.Writer) error
- func IndexExecutionResult(blockID flow.Identifier, resultID flow.Identifier) func(pebble.Writer) error
- func IndexFinalizedSealByBlockID(sealedBlockID flow.Identifier, sealID flow.Identifier) func(pebble.Writer) error
- func IndexLatestSealAtBlock(blockID flow.Identifier, sealID flow.Identifier) func(pebble.Writer) error
- func IndexOwnExecutionReceipt(blockID flow.Identifier, receiptID flow.Identifier) func(pebble.Writer) error
- func IndexPayloadGuarantees(blockID flow.Identifier, guarIDs []flow.Identifier) func(pebble.Writer) error
- func IndexPayloadReceipts(blockID flow.Identifier, receiptIDs []flow.Identifier) func(pebble.Writer) error
- func IndexPayloadResults(blockID flow.Identifier, resultIDs []flow.Identifier) func(pebble.Writer) error
- func IndexPayloadSeals(blockID flow.Identifier, sealIDs []flow.Identifier) func(pebble.Writer) error
- func IndexReferenceBlockByClusterBlock(clusterBlockID, refID flow.Identifier) func(pebble.Writer) error
- func IndexResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) func(pebble.Writer) error
- func IndexStateCommitment(blockID flow.Identifier, commit flow.StateCommitment) func(pebble.Writer) error
- func IndexVersionBeaconByHeight(beacon *flow.SealedVersionBeacon) func(pebble.Writer) error
- func InitJobLatestIndex(queue string, index uint64) func(pebble.Writer) error
- func InsertBlockChildren(blockID flow.Identifier, childrenIDs flow.IdentifierList) func(pebble.Writer) error
- func InsertChunkDataPack(sc *storage.StoredChunkDataPack) func(w pebble.Writer) error
- func InsertChunkLocator(locator *chunks.Locator) func(pebble.Writer) error
- func InsertClusterFinalizedHeight(clusterID flow.ChainID, number uint64) func(pebble.Writer) error
- func InsertCollection(collection *flow.LightCollection) func(pebble.Writer) error
- func InsertComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted bool) func(pebble.Writer) error
- func InsertDKGEndStateForEpoch(epochCounter uint64, endState flow.DKGEndState) func(pebble.Writer) error
- func InsertDKGStartedForEpoch(epochCounter uint64) func(pebble.Writer) error
- func InsertEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(pebble.Writer) error
- func InsertEpochCommitSafetyThreshold(threshold uint64) func(pebble.Writer) error
- func InsertEpochFirstHeight(epoch, height uint64) func(pebble.Writer) error
- func InsertEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(pebble.Writer) error
- func InsertEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(pebble.Writer) error
- func InsertEvent(blockID flow.Identifier, event flow.Event) func(pebble.Writer) error
- func InsertExecutedBlock(blockID flow.Identifier) func(pebble.Writer) error
- func InsertExecutionForkEvidence(conflictingSeals []*flow.IncorporatedResultSeal) func(pebble.Writer) error
- func InsertExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(pebble.Writer) error
- func InsertExecutionResult(result *flow.ExecutionResult) func(pebble.Writer) error
- func InsertExecutionStateInteractions(blockID flow.Identifier, executionSnapshots []*snapshot.ExecutionSnapshot) func(pebble.Writer) error
- func InsertFinalizedHeight(height uint64) func(pebble.Writer) error
- func InsertGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(pebble.Writer) error
- func InsertHeader(headerID flow.Identifier, header *flow.Header) func(pebble.Writer) error
- func InsertJobAtIndex(queue string, index uint64, entity flow.Identifier) func(pebble.Writer) error
- func InsertLastCompleteBlockHeight(height uint64) func(pebble.Writer) error
- func InsertLastCompleteBlockHeightIfNotExists(height uint64) func(pebble.Writer) error
- func InsertLightTransactionResult(blockID flow.Identifier, transactionResult *flow.LightTransactionResult) func(pebble.Writer) error
- func InsertLivenessData(chainID flow.ChainID, livenessData *hotstuff.LivenessData) func(pebble.Writer) error
- func InsertMyBeaconPrivateKey(epochCounter uint64, info *encodable.RandomBeaconPrivKey) func(pebble.Writer) error
- func InsertProcessedIndex(jobName string, processed uint64) func(pebble.Writer) error
- func InsertProtocolVersion(version uint) func(pebble.Writer) error
- func InsertPublicDBMarker(db *pebble.DB) error
- func InsertQuorumCertificate(qc *flow.QuorumCertificate) func(pebble.Writer) error
- func InsertResultApproval(approval *flow.ResultApproval) func(pebble.Writer) error
- func InsertRootHeight(height uint64) func(pebble.Writer) error
- func InsertSafetyData(chainID flow.ChainID, safetyData *hotstuff.SafetyData) func(pebble.Writer) error
- func InsertSeal(sealID flow.Identifier, seal *flow.Seal) func(pebble.Writer) error
- func InsertSealedHeight(height uint64) func(pebble.Writer) error
- func InsertSealedRootHeight(height uint64) func(pebble.Writer) error
- func InsertSecretDBMarker(db *pebble.DB) error
- func InsertServiceEvent(blockID flow.Identifier, event flow.Event) func(pebble.Writer) error
- func InsertSporkID(sporkID flow.Identifier) func(pebble.Writer) error
- func InsertSporkRootBlockHeight(height uint64) func(pebble.Writer) error
- func InsertTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(pebble.Writer) error
- func InsertTransactionResult(blockID flow.Identifier, transactionResult *flow.TransactionResult) func(pebble.Writer) error
- func LookupBlockHeight(height uint64, blockID *flow.Identifier) func(pebble.Reader) error
- func LookupBySealedBlockID(sealedBlockID flow.Identifier, sealID *flow.Identifier) func(pebble.Reader) error
- func LookupClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID *flow.Identifier) func(pebble.Reader) error
- func LookupClusterBlocksByReferenceHeightRange(start, end uint64, clusterBlockIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupCollectionBlock(collID flow.Identifier, blockID *flow.Identifier) func(pebble.Reader) error
- func LookupCollectionPayload(blockID flow.Identifier, txIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupEventsByBlockID(blockID flow.Identifier, events *[]flow.Event) func(pebble.Reader) error
- func LookupEventsByBlockIDEventType(blockID flow.Identifier, eventType flow.EventType, events *[]flow.Event) func(pebble.Reader) error
- func LookupExecutionReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupExecutionResult(blockID flow.Identifier, resultID *flow.Identifier) func(pebble.Reader) error
- func LookupLastVersionBeaconByHeight(maxHeight uint64, versionBeacon *flow.SealedVersionBeacon) func(pebble.Reader) error
- func LookupLatestSealAtBlock(blockID flow.Identifier, sealID *flow.Identifier) func(pebble.Reader) error
- func LookupLightTransactionResultsByBlockIDUsingIndex(blockID flow.Identifier, txResults *[]flow.LightTransactionResult) func(pebble.Reader) error
- func LookupOwnExecutionReceipt(blockID flow.Identifier, receiptID *flow.Identifier) func(pebble.Reader) error
- func LookupPayloadGuarantees(blockID flow.Identifier, guarIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupPayloadReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupPayloadResults(blockID flow.Identifier, resultIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupPayloadSeals(blockID flow.Identifier, sealIDs *[]flow.Identifier) func(pebble.Reader) error
- func LookupReferenceBlockByClusterBlock(clusterBlockID flow.Identifier, refID *flow.Identifier) func(pebble.Reader) error
- func LookupResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID *flow.Identifier) func(pebble.Reader) error
- func LookupServiceEventsByBlockID(blockID flow.Identifier, events *[]flow.Event) func(pebble.Reader) error
- func LookupStateCommitment(blockID flow.Identifier, commit *flow.StateCommitment) func(pebble.Reader) error
- func LookupTransactionResultsByBlockIDUsingIndex(blockID flow.Identifier, txResults *[]flow.TransactionResult) func(pebble.Reader) error
- func NewBatchWriter(batch storage.BatchWriter) pebble.Writer
- func PersistBlocklist(blocklist map[flow.Identifier]struct{}) func(pebble.Writer) error
- func PurgeBlocklist() func(pebble.Writer) error
- func RemoveChunkDataPack(chunkID flow.Identifier) func(w pebble.Writer) error
- func RemoveCollection(collID flow.Identifier) func(pebble.Writer) error
- func RemoveComputationResultUploadStatus(blockID flow.Identifier) func(pebble.Writer) error
- func RemoveEventsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
- func RemoveExecutionForkEvidence() func(pebble.Writer) error
- func RemoveExecutionResultIndex(blockID flow.Identifier) func(pebble.Writer) error
- func RemoveOwnExecutionReceipt(blockID flow.Identifier) func(pebble.Writer) error
- func RemoveServiceEventsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
- func RemoveStateCommitment(blockID flow.Identifier) func(pebble.Writer) error
- func RemoveTransactionResultsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
- func RetrieveBlockChildren(blockID flow.Identifier, childrenIDs *flow.IdentifierList) func(pebble.Reader) error
- func RetrieveBlocklist(blocklist *map[flow.Identifier]struct{}) func(pebble.Reader) error
- func RetrieveChunkDataPack(chunkID flow.Identifier, sc *storage.StoredChunkDataPack) func(r pebble.Reader) error
- func RetrieveChunkLocator(locatorID flow.Identifier, locator *chunks.Locator) func(pebble.Reader) error
- func RetrieveClusterFinalizedHeight(clusterID flow.ChainID, number *uint64) func(pebble.Reader) error
- func RetrieveCollection(collID flow.Identifier, collection *flow.LightCollection) func(pebble.Reader) error
- func RetrieveCollectionID(txID flow.Identifier, collectionID *flow.Identifier) func(pebble.Reader) error
- func RetrieveDKGEndStateForEpoch(epochCounter uint64, endState *flow.DKGEndState) func(pebble.Reader) error
- func RetrieveDKGStartedForEpoch(epochCounter uint64, started *bool) func(pebble.Reader) error
- func RetrieveEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(pebble.Reader) error
- func RetrieveEpochCommitSafetyThreshold(threshold *uint64) func(pebble.Reader) error
- func RetrieveEpochEmergencyFallbackTriggeredBlockID(blockID *flow.Identifier) func(pebble.Reader) error
- func RetrieveEpochFirstHeight(epoch uint64, height *uint64) func(pebble.Reader) error
- func RetrieveEpochLastHeight(epoch uint64, height *uint64) func(pebble.Reader) error
- func RetrieveEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(pebble.Reader) error
- func RetrieveEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(pebble.Reader) error
- func RetrieveEvents(blockID flow.Identifier, transactionID flow.Identifier, events *[]flow.Event) func(pebble.Reader) error
- func RetrieveExecutedBlock(blockID *flow.Identifier) func(pebble.Reader) error
- func RetrieveExecutionForkEvidence(conflictingSeals *[]*flow.IncorporatedResultSeal) func(pebble.Reader) error
- func RetrieveExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(pebble.Reader) error
- func RetrieveExecutionResult(resultID flow.Identifier, result *flow.ExecutionResult) func(pebble.Reader) error
- func RetrieveExecutionStateInteractions(blockID flow.Identifier, executionSnapshots *[]*snapshot.ExecutionSnapshot) func(pebble.Reader) error
- func RetrieveFinalizedHeight(height *uint64) func(pebble.Reader) error
- func RetrieveGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(pebble.Reader) error
- func RetrieveHeader(blockID flow.Identifier, header *flow.Header) func(pebble.Reader) error
- func RetrieveJobAtIndex(queue string, index uint64, entity *flow.Identifier) func(pebble.Reader) error
- func RetrieveJobLatestIndex(queue string, index *uint64) func(pebble.Reader) error
- func RetrieveLastCompleteBlockHeight(height *uint64) func(pebble.Reader) error
- func RetrieveLightTransactionResult(blockID flow.Identifier, transactionID flow.Identifier, ...) func(pebble.Reader) error
- func RetrieveLightTransactionResultByIndex(blockID flow.Identifier, txIndex uint32, ...) func(pebble.Reader) error
- func RetrieveLivenessData(chainID flow.ChainID, livenessData *hotstuff.LivenessData) func(pebble.Reader) error
- func RetrieveMyBeaconPrivateKey(epochCounter uint64, info *encodable.RandomBeaconPrivKey) func(pebble.Reader) error
- func RetrieveProcessedIndex(jobName string, processed *uint64) func(pebble.Reader) error
- func RetrieveProtocolVersion(version *uint) func(pebble.Reader) error
- func RetrieveQuorumCertificate(blockID flow.Identifier, qc *flow.QuorumCertificate) func(pebble.Reader) error
- func RetrieveResultApproval(approvalID flow.Identifier, approval *flow.ResultApproval) func(pebble.Reader) error
- func RetrieveRootHeight(height *uint64) func(pebble.Reader) error
- func RetrieveSafetyData(chainID flow.ChainID, safetyData *hotstuff.SafetyData) func(pebble.Reader) error
- func RetrieveSeal(sealID flow.Identifier, seal *flow.Seal) func(pebble.Reader) error
- func RetrieveSealedHeight(height *uint64) func(pebble.Reader) error
- func RetrieveSealedRootHeight(height *uint64) func(pebble.Reader) error
- func RetrieveSporkID(sporkID *flow.Identifier) func(pebble.Reader) error
- func RetrieveSporkRootBlockHeight(height *uint64) func(pebble.Reader) error
- func RetrieveTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(pebble.Reader) error
- func RetrieveTransactionResult(blockID flow.Identifier, transactionID flow.Identifier, ...) func(pebble.Reader) error
- func RetrieveTransactionResultByIndex(blockID flow.Identifier, txIndex uint32, ...) func(pebble.Reader) error
- func SetEpochEmergencyFallbackTriggered(blockID flow.Identifier) func(txn pebble.Writer) error
- func SetJobLatestIndex(queue string, index uint64) func(pebble.Writer) error
- func SetProcessedIndex(jobName string, processed uint64) func(pebble.Writer) error
- func UpdateBlockChildren(blockID flow.Identifier, childrenIDs flow.IdentifierList) func(pebble.Writer) error
- func UpdateClusterFinalizedHeight(clusterID flow.ChainID, number uint64) func(pebble.Writer) error
- func UpdateComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted bool) func(pebble.Writer) error
- func UpdateFinalizedHeight(height uint64) func(pebble.Writer) error
- func UpdateLastCompleteBlockHeight(height uint64) func(pebble.Writer) error
- func UpdateLivenessData(chainID flow.ChainID, livenessData *hotstuff.LivenessData) func(pebble.Writer) error
- func UpdateSafetyData(chainID flow.ChainID, safetyData *hotstuff.SafetyData) func(pebble.Writer) error
- func UpdateSealedHeight(height uint64) func(pebble.Writer) error
- func UpsertComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted bool) func(pebble.Writer) error
- func WithReaderBatchWriter(db *pebble.DB, fn func(storage.PebbleReaderBatchWriter) error) error
- type ReaderBatchWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchIndexLightTransactionResult ¶
func BatchIndexLightTransactionResult(blockID flow.Identifier, txIndex uint32, transactionResult *flow.LightTransactionResult) func(batch storage.BatchWriter) error
func BatchIndexTransactionResult ¶
func BatchIndexTransactionResult(blockID flow.Identifier, txIndex uint32, transactionResult *flow.TransactionResult) func(storage.BatchWriter) error
func BatchRemoveTransactionResultsByBlockID ¶
func BatchRemoveTransactionResultsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
BatchRemoveTransactionResultsByBlockID removes transaction results for the given blockID in a provided batch. No errors are expected during normal operation, but it may return generic error if pebble fails to process request
func BlockExists ¶
BlockExists checks whether the block exists in the database. No errors are expected during normal operation.
func CheckEpochEmergencyFallbackTriggered ¶
CheckEpochEmergencyFallbackTriggered retrieves the value of the flag indicating whether epoch emergency fallback has been triggered. If the key is not set, this results in triggered being set to false.
func EnsurePublicDB ¶
func EnsureSecretDB ¶
func FindHeaders ¶
func FindHeaders(filter func(header *flow.Header) bool, found *[]flow.Header) func(pebble.Reader) error
FindHeaders iterates through all headers, calling `filter` on each, and adding them to the `found` slice if `filter` returned true
func GetBlockIDsByStatus ¶
func GetBlockIDsByStatus(blockIDs *[]flow.Identifier, targetUploadStatus bool) func(pebble.Reader) error
GetBlockIDsByStatus returns all IDs of stored ComputationResult instances.
func GetComputationResultUploadStatus ¶
func GetComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted *bool) func(pebble.Reader) error
GetComputationResult returns stored ComputationResult instance with given ID.
func HasChunkLocator ¶
func IndexBlockHeight ¶
IndexBlockHeight indexes the height of a block. It should only be called on finalized blocks.
func IndexClusterBlockByReferenceHeight ¶
func IndexClusterBlockByReferenceHeight(refHeight uint64, clusterBlockID flow.Identifier) func(pebble.Writer) error
IndexClusterBlockByReferenceHeight indexes a cluster block ID by its reference block height. The cluster block ID is included in the key for more efficient traversal. Only finalized cluster blocks should be included in this index. The key looks like: <prefix 0:1><ref_height 1:9><cluster_block_id 9:41>
func IndexClusterBlockHeight ¶
func IndexClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID flow.Identifier) func(pebble.Writer) 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(pebble.Writer) error
IndexCollectionBlock indexes a block by a collection within that block.
func IndexCollectionByTransaction ¶
func IndexCollectionByTransaction(txID flow.Identifier, collectionID flow.Identifier) func(pebble.Writer) error
IndexCollectionByTransaction inserts a collection id keyed by a transaction id
func IndexCollectionPayload ¶
func IndexCollectionPayload(blockID flow.Identifier, txIDs []flow.Identifier) func(pebble.Writer) error
IndexCollectionPayload indexes the transactions within the collection payload of a cluster block.
func IndexExecutionReceipts ¶
func IndexExecutionReceipts(blockID, receiptID flow.Identifier) func(pebble.Writer) 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(pebble.Writer) error
IndexExecutionResult inserts an execution result ID keyed by block ID
func IndexFinalizedSealByBlockID ¶
func IndexFinalizedSealByBlockID(sealedBlockID flow.Identifier, sealID flow.Identifier) func(pebble.Writer) error
IndexFinalizedSealByBlockID indexes the _finalized_ seal by the sealed block ID. Example: A <- B <- C(SealA) when block C is finalized, we create the index `A.ID->SealA.ID`
func IndexLatestSealAtBlock ¶
func IndexLatestSealAtBlock(blockID flow.Identifier, sealID flow.Identifier) func(pebble.Writer) error
IndexLatestSealAtBlock persists the highest seal that was included in the fork up to (and including) blockID. In most cases, it is the highest seal included in this block's payload. However, if there are no seals in this block, sealID should reference the highest seal in blockID's ancestor.
func IndexOwnExecutionReceipt ¶
func IndexOwnExecutionReceipt(blockID flow.Identifier, receiptID flow.Identifier) func(pebble.Writer) error
IndexOwnExecutionReceipt inserts an execution receipt ID keyed by block ID
func IndexPayloadGuarantees ¶
func IndexPayloadGuarantees(blockID flow.Identifier, guarIDs []flow.Identifier) func(pebble.Writer) error
func IndexPayloadReceipts ¶
func IndexPayloadReceipts(blockID flow.Identifier, receiptIDs []flow.Identifier) func(pebble.Writer) error
func IndexPayloadResults ¶
func IndexPayloadResults(blockID flow.Identifier, resultIDs []flow.Identifier) func(pebble.Writer) error
func IndexPayloadSeals ¶
func IndexPayloadSeals(blockID flow.Identifier, sealIDs []flow.Identifier) func(pebble.Writer) error
func IndexReferenceBlockByClusterBlock ¶
func IndexReferenceBlockByClusterBlock(clusterBlockID, refID flow.Identifier) func(pebble.Writer) error
IndexReferenceBlockByClusterBlock inserts the reference block ID for the given cluster block ID. While each cluster block specifies a reference block in its payload, we maintain this additional lookup for performance reasons.
func IndexResultApproval ¶
func IndexResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) func(pebble.Writer) 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(pebble.Writer) error
IndexStateCommitment indexes a state commitment.
State commitments are keyed by the block whose execution results in the state with the given commit.
func IndexVersionBeaconByHeight ¶
func IndexVersionBeaconByHeight( beacon *flow.SealedVersionBeacon, ) func(pebble.Writer) error
IndexVersionBeaconByHeight stores a sealed version beacon indexed by flow.SealedVersionBeacon.SealHeight.
No errors are expected during normal operation.
func InitJobLatestIndex ¶
func InsertBlockChildren ¶
func InsertBlockChildren(blockID flow.Identifier, childrenIDs flow.IdentifierList) func(pebble.Writer) error
InsertBlockChildren insert an index to lookup the direct child of a block by its ID
func InsertChunkDataPack ¶
func InsertChunkDataPack(sc *storage.StoredChunkDataPack) func(w pebble.Writer) error
InsertChunkDataPack inserts a chunk data pack keyed by chunk ID. any error are exceptions
func InsertChunkLocator ¶
func InsertClusterFinalizedHeight ¶
InsertClusterFinalizedHeight inserts the finalized boundary for the given cluster.
func InsertCollection ¶
func InsertCollection(collection *flow.LightCollection) func(pebble.Writer) error
func InsertComputationResultUploadStatus ¶
func InsertComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted bool) func(pebble.Writer) error
InsertComputationResult addes given instance of ComputationResult into local BadgerDB.
func InsertDKGEndStateForEpoch ¶
func InsertDKGEndStateForEpoch(epochCounter uint64, endState flow.DKGEndState) func(pebble.Writer) error
InsertDKGEndStateForEpoch stores the DKG end state for the epoch. Error returns: storage.ErrAlreadyExists
func InsertDKGStartedForEpoch ¶
InsertDKGStartedForEpoch stores a flag indicating that the DKG has been started for the given epoch. Returns: storage.ErrAlreadyExists Error returns: storage.ErrAlreadyExists
func InsertEpochCommit ¶
func InsertEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(pebble.Writer) error
func InsertEpochCommitSafetyThreshold ¶
InsertEpochCommitSafetyThreshold inserts the epoch commit safety threshold for the present spork. A single database and protocol state instance spans at most one spork, and a spork has exactly one protocol version for its duration, so this is inserted exactly once, when bootstrapping the state.
func InsertEpochFirstHeight ¶
InsertEpochFirstHeight inserts the height of the first block in the given epoch. The first block of an epoch E is the finalized block with view >= E.FirstView. Although we don't store the final height of an epoch, it can be inferred from this index. Returns storage.ErrAlreadyExists if the height has already been indexed.
func InsertEpochSetup ¶
func InsertEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(pebble.Writer) error
func InsertEpochStatus ¶
func InsertEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(pebble.Writer) error
func InsertEvent ¶
func InsertExecutedBlock ¶
func InsertExecutedBlock(blockID flow.Identifier) func(pebble.Writer) error
func InsertExecutionForkEvidence ¶
func InsertExecutionForkEvidence(conflictingSeals []*flow.IncorporatedResultSeal) func(pebble.Writer) error
func InsertExecutionReceiptMeta ¶
func InsertExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(pebble.Writer) error
InsertExecutionReceiptMeta inserts an execution receipt meta by ID.
func InsertExecutionResult ¶
func InsertExecutionResult(result *flow.ExecutionResult) func(pebble.Writer) error
InsertExecutionResult inserts an execution result by ID.
func InsertExecutionStateInteractions ¶
func InsertExecutionStateInteractions( blockID flow.Identifier, executionSnapshots []*snapshot.ExecutionSnapshot, ) func(pebble.Writer) error
func InsertGuarantee ¶
func InsertGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(pebble.Writer) error
func InsertHeader ¶
func InsertJobAtIndex ¶
InsertJobAtIndex insert an entity ID at the given index
func InsertLastCompleteBlockHeightIfNotExists ¶
InsertLastCompleteBlockHeightIfNotExists inserts the last full block height if it is not already set. Calling this function multiple times is a no-op and returns no expected errors.
func InsertLightTransactionResult ¶
func InsertLightTransactionResult(blockID flow.Identifier, transactionResult *flow.LightTransactionResult) func(pebble.Writer) error
func InsertLivenessData ¶
func InsertLivenessData(chainID flow.ChainID, livenessData *hotstuff.LivenessData) func(pebble.Writer) error
InsertLivenessData inserts liveness data into the database.
func InsertMyBeaconPrivateKey ¶
func InsertMyBeaconPrivateKey(epochCounter uint64, info *encodable.RandomBeaconPrivKey) func(pebble.Writer) error
InsertMyBeaconPrivateKey stores the random beacon private key for the given epoch.
CAUTION: This method stores confidential information and should only be used in the context of the secrets database. This is enforced in the above layer (see storage.DKGState). Error returns: storage.ErrAlreadyExists
func InsertProcessedIndex ¶ added in v0.37.1
func InsertProtocolVersion ¶
InsertProtocolVersion inserts the protocol version for the present spork. A single database and protocol state instance spans at most one spork, and a spork has exactly one protocol version for its duration, so this is inserted exactly once, when bootstrapping the state.
func InsertPublicDBMarker ¶
func InsertQuorumCertificate ¶
func InsertQuorumCertificate(qc *flow.QuorumCertificate) func(pebble.Writer) error
InsertQuorumCertificate inserts a quorum certificate by block ID. Returns storage.ErrAlreadyExists if a QC has already been inserted for the block.
func InsertResultApproval ¶
func InsertResultApproval(approval *flow.ResultApproval) func(pebble.Writer) error
InsertResultApproval inserts a ResultApproval by ID.
func InsertSafetyData ¶
func InsertSafetyData(chainID flow.ChainID, safetyData *hotstuff.SafetyData) func(pebble.Writer) error
InsertSafetyData inserts safety data into the database.
func InsertSeal ¶
func InsertSecretDBMarker ¶
func InsertServiceEvent ¶
func InsertSporkID ¶
func InsertSporkID(sporkID flow.Identifier) func(pebble.Writer) error
InsertSporkID inserts the spork ID for the present spork. A single database and protocol state instance spans at most one spork, so this is inserted exactly once, when bootstrapping the state.
func InsertSporkRootBlockHeight ¶
InsertSporkRootBlockHeight inserts the spork root block height for the present spork. A single database and protocol state instance spans at most one spork, so this is inserted exactly once, when bootstrapping the state.
func InsertTransaction ¶
func InsertTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(pebble.Writer) error
InsertTransaction inserts a transaction keyed by transaction fingerprint.
func InsertTransactionResult ¶
func InsertTransactionResult(blockID flow.Identifier, transactionResult *flow.TransactionResult) func(pebble.Writer) error
func LookupBlockHeight ¶
LookupBlockHeight retrieves finalized blocks by height.
func LookupBySealedBlockID ¶
func LookupBySealedBlockID(sealedBlockID flow.Identifier, sealID *flow.Identifier) func(pebble.Reader) error
LookupBySealedBlockID finds the seal for the given sealed block ID.
func LookupClusterBlockHeight ¶
func LookupClusterBlockHeight(clusterID flow.ChainID, number uint64, blockID *flow.Identifier) func(pebble.Reader) error
LookupClusterBlockHeight retrieves a block ID by number for the given cluster
func LookupClusterBlocksByReferenceHeightRange ¶
func LookupClusterBlocksByReferenceHeightRange(start, end uint64, clusterBlockIDs *[]flow.Identifier) func(pebble.Reader) error
LookupClusterBlocksByReferenceHeightRange traverses the ref_height->cluster_block index and returns any finalized cluster blocks which have a reference block with height in the given range. This is used to avoid including duplicate transaction when building or validating a new collection.
func LookupCollectionBlock ¶
func LookupCollectionBlock(collID flow.Identifier, blockID *flow.Identifier) func(pebble.Reader) error
LookupCollectionBlock looks up a block by a collection within that block.
func LookupCollectionPayload ¶
func LookupCollectionPayload(blockID flow.Identifier, txIDs *[]flow.Identifier) func(pebble.Reader) error
LookupCollection looks up the collection for a given cluster payload.
func LookupEventsByBlockID ¶
func LookupExecutionReceipts ¶
func LookupExecutionReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(pebble.Reader) error
LookupExecutionReceipts finds all execution receipts by block ID
func LookupExecutionResult ¶
func LookupExecutionResult(blockID flow.Identifier, resultID *flow.Identifier) func(pebble.Reader) error
LookupExecutionResult finds execution result ID by block
func LookupLastVersionBeaconByHeight ¶
func LookupLastVersionBeaconByHeight( maxHeight uint64, versionBeacon *flow.SealedVersionBeacon, ) func(pebble.Reader) error
LookupLastVersionBeaconByHeight finds the highest flow.VersionBeacon but no higher than maxHeight. Returns storage.ErrNotFound if no version beacon exists at or below the given height. TODO: fix it
func LookupLatestSealAtBlock ¶
func LookupLatestSealAtBlock(blockID flow.Identifier, sealID *flow.Identifier) func(pebble.Reader) error
LookupLatestSealAtBlock finds the highest seal that was included in the fork up to (and including) blockID. In most cases, it is the highest seal included in this block's payload. However, if there are no seals in this block, sealID should reference the highest seal in blockID's ancestor.
func LookupLightTransactionResultsByBlockIDUsingIndex ¶
func LookupLightTransactionResultsByBlockIDUsingIndex(blockID flow.Identifier, txResults *[]flow.LightTransactionResult) func(pebble.Reader) error
LookupLightTransactionResultsByBlockIDUsingIndex retrieves all tx results for a block, but using tx_index index. This correctly handles cases of duplicate transactions within block.
func LookupOwnExecutionReceipt ¶
func LookupOwnExecutionReceipt(blockID flow.Identifier, receiptID *flow.Identifier) func(pebble.Reader) error
LookupOwnExecutionReceipt finds execution receipt ID by block
func LookupPayloadGuarantees ¶
func LookupPayloadGuarantees(blockID flow.Identifier, guarIDs *[]flow.Identifier) func(pebble.Reader) error
func LookupPayloadReceipts ¶
func LookupPayloadReceipts(blockID flow.Identifier, receiptIDs *[]flow.Identifier) func(pebble.Reader) error
func LookupPayloadResults ¶
func LookupPayloadResults(blockID flow.Identifier, resultIDs *[]flow.Identifier) func(pebble.Reader) error
func LookupPayloadSeals ¶
func LookupPayloadSeals(blockID flow.Identifier, sealIDs *[]flow.Identifier) func(pebble.Reader) error
func LookupReferenceBlockByClusterBlock ¶
func LookupReferenceBlockByClusterBlock(clusterBlockID flow.Identifier, refID *flow.Identifier) func(pebble.Reader) error
LookupReferenceBlockByClusterBlock looks up the reference block ID for the given cluster block ID. While each cluster block specifies a reference block in its payload, we maintain this additional lookup for performance reasons.
func LookupResultApproval ¶
func LookupResultApproval(resultID flow.Identifier, chunkIndex uint64, approvalID *flow.Identifier) func(pebble.Reader) error
LookupResultApproval finds a ResultApproval by result ID and chunk index.
func LookupStateCommitment ¶
func LookupStateCommitment(blockID flow.Identifier, commit *flow.StateCommitment) func(pebble.Reader) 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 LookupTransactionResultsByBlockIDUsingIndex ¶
func LookupTransactionResultsByBlockIDUsingIndex(blockID flow.Identifier, txResults *[]flow.TransactionResult) func(pebble.Reader) error
LookupTransactionResultsByBlockIDUsingIndex retrieves all tx results for a block, by using tx_index index. This correctly handles cases of duplicate transactions within block.
func NewBatchWriter ¶
func NewBatchWriter(batch storage.BatchWriter) pebble.Writer
func PersistBlocklist ¶
func PersistBlocklist(blocklist map[flow.Identifier]struct{}) func(pebble.Writer) error
PersistBlocklist writes the set of blocked nodes IDs into the data base. If an entry already exists, it is overwritten; otherwise a new entry is created. No errors are expected during normal operations.
TODO: TEMPORARY manual override for adding node IDs to list of ejected nodes, applies to networking layer only
func PurgeBlocklist ¶
PurgeBlocklist removes the set of blocked nodes IDs from the data base. If no corresponding entry exists, this function is a no-op. No errors are expected during normal operations. TODO: TEMPORARY manual override for adding node IDs to list of ejected nodes, applies to networking layer only
func RemoveChunkDataPack ¶
func RemoveChunkDataPack(chunkID flow.Identifier) func(w pebble.Writer) error
RemoveChunkDataPack removes the chunk data pack with the given chunk ID. any error are exceptions
func RemoveCollection ¶
func RemoveCollection(collID flow.Identifier) func(pebble.Writer) error
func RemoveComputationResultUploadStatus ¶
func RemoveComputationResultUploadStatus( blockID flow.Identifier) func(pebble.Writer) error
RemoveComputationResult removes an instance of ComputationResult with given ID.
func RemoveEventsByBlockID ¶
func RemoveEventsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
func RemoveExecutionResultIndex ¶
func RemoveExecutionResultIndex(blockID flow.Identifier) func(pebble.Writer) error
RemoveExecutionResultIndex removes execution result indexed by the given blockID
func RemoveOwnExecutionReceipt ¶
func RemoveOwnExecutionReceipt(blockID flow.Identifier) func(pebble.Writer) error
RemoveOwnExecutionReceipt removes own execution receipt index by blockID
func RemoveServiceEventsByBlockID ¶
func RemoveServiceEventsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
func RemoveStateCommitment ¶
func RemoveStateCommitment(blockID flow.Identifier) func(pebble.Writer) error
RemoveStateCommitment removes the state commitment by block ID
func RemoveTransactionResultsByBlockID ¶
func RemoveTransactionResultsByBlockID(blockID flow.Identifier) func(pebble.Writer) error
RemoveTransactionResultsByBlockID removes the transaction results for the given blockID
func RetrieveBlockChildren ¶
func RetrieveBlockChildren(blockID flow.Identifier, childrenIDs *flow.IdentifierList) func(pebble.Reader) error
RetrieveBlockChildren the child block ID by parent block ID
func RetrieveBlocklist ¶
func RetrieveBlocklist(blocklist *map[flow.Identifier]struct{}) func(pebble.Reader) error
RetrieveBlocklist reads the set of blocked node IDs from the data base. Returns `storage.ErrNotFound` error in case no respective data base entry is present.
TODO: TEMPORARY manual override for adding node IDs to list of ejected nodes, applies to networking layer only
func RetrieveChunkDataPack ¶
func RetrieveChunkDataPack(chunkID flow.Identifier, sc *storage.StoredChunkDataPack) func(r pebble.Reader) error
RetrieveChunkDataPack retrieves a chunk data pack by chunk ID. it returns storage.ErrNotFound if the chunk data pack is not found
func RetrieveChunkLocator ¶
func RetrieveClusterFinalizedHeight ¶
func RetrieveClusterFinalizedHeight(clusterID flow.ChainID, number *uint64) func(pebble.Reader) error
RetrieveClusterFinalizedHeight retrieves the finalized boundary for the given cluster.
func RetrieveCollection ¶
func RetrieveCollection(collID flow.Identifier, collection *flow.LightCollection) func(pebble.Reader) error
func RetrieveCollectionID ¶
func RetrieveCollectionID(txID flow.Identifier, collectionID *flow.Identifier) func(pebble.Reader) error
LookupCollectionID retrieves a collection id by transaction id
func RetrieveDKGEndStateForEpoch ¶
func RetrieveDKGEndStateForEpoch(epochCounter uint64, endState *flow.DKGEndState) func(pebble.Reader) error
RetrieveDKGEndStateForEpoch retrieves the DKG end state for the epoch. Error returns: storage.ErrNotFound
func RetrieveDKGStartedForEpoch ¶
RetrieveDKGStartedForEpoch retrieves the DKG started flag for the given epoch. If no flag is set, started is set to false and no error is returned. No errors expected during normal operation.
func RetrieveEpochCommit ¶
func RetrieveEpochCommit(eventID flow.Identifier, event *flow.EpochCommit) func(pebble.Reader) error
func RetrieveEpochCommitSafetyThreshold ¶
RetrieveEpochCommitSafetyThreshold retrieves the epoch commit safety threshold for the present spork.
func RetrieveEpochEmergencyFallbackTriggeredBlockID ¶
func RetrieveEpochEmergencyFallbackTriggeredBlockID(blockID *flow.Identifier) func(pebble.Reader) error
RetrieveEpochEmergencyFallbackTriggeredBlockID gets the block ID where epoch emergency was triggered.
func RetrieveEpochFirstHeight ¶
RetrieveEpochFirstHeight retrieves the height of the first block in the given epoch. Returns storage.ErrNotFound if the first block of the epoch has not yet been finalized.
func RetrieveEpochLastHeight ¶
RetrieveEpochLastHeight retrieves the height of the last block in the given epoch. It's a more readable, but equivalent query to RetrieveEpochFirstHeight when interested in the last height of an epoch. Returns storage.ErrNotFound if the first block of the epoch has not yet been finalized.
func RetrieveEpochSetup ¶
func RetrieveEpochSetup(eventID flow.Identifier, event *flow.EpochSetup) func(pebble.Reader) error
func RetrieveEpochStatus ¶
func RetrieveEpochStatus(blockID flow.Identifier, status *flow.EpochStatus) func(pebble.Reader) error
func RetrieveEvents ¶
func RetrieveEvents(blockID flow.Identifier, transactionID flow.Identifier, events *[]flow.Event) func(pebble.Reader) error
func RetrieveExecutedBlock ¶
func RetrieveExecutedBlock(blockID *flow.Identifier) func(pebble.Reader) error
func RetrieveExecutionForkEvidence ¶
func RetrieveExecutionForkEvidence(conflictingSeals *[]*flow.IncorporatedResultSeal) func(pebble.Reader) error
func RetrieveExecutionReceiptMeta ¶
func RetrieveExecutionReceiptMeta(receiptID flow.Identifier, meta *flow.ExecutionReceiptMeta) func(pebble.Reader) error
RetrieveExecutionReceipt retrieves a execution receipt meta by ID.
func RetrieveExecutionResult ¶
func RetrieveExecutionResult(resultID flow.Identifier, result *flow.ExecutionResult) func(pebble.Reader) error
RetrieveExecutionResult retrieves a transaction by fingerprint.
func RetrieveExecutionStateInteractions ¶
func RetrieveExecutionStateInteractions( blockID flow.Identifier, executionSnapshots *[]*snapshot.ExecutionSnapshot, ) func(pebble.Reader) error
func RetrieveFinalizedHeight ¶
func RetrieveGuarantee ¶
func RetrieveGuarantee(collID flow.Identifier, guarantee *flow.CollectionGuarantee) func(pebble.Reader) error
func RetrieveHeader ¶
func RetrieveJobAtIndex ¶
func RetrieveJobAtIndex(queue string, index uint64, entity *flow.Identifier) func(pebble.Reader) error
RetrieveJobAtIndex returns the entity at the given index
func RetrieveJobLatestIndex ¶
func RetrieveLightTransactionResult ¶
func RetrieveLightTransactionResult(blockID flow.Identifier, transactionID flow.Identifier, transactionResult *flow.LightTransactionResult) func(pebble.Reader) error
func RetrieveLightTransactionResultByIndex ¶
func RetrieveLightTransactionResultByIndex(blockID flow.Identifier, txIndex uint32, transactionResult *flow.LightTransactionResult) func(pebble.Reader) error
func RetrieveLivenessData ¶
func RetrieveLivenessData(chainID flow.ChainID, livenessData *hotstuff.LivenessData) func(pebble.Reader) error
RetrieveLivenessData retrieves liveness data from the database.
func RetrieveMyBeaconPrivateKey ¶
func RetrieveMyBeaconPrivateKey(epochCounter uint64, info *encodable.RandomBeaconPrivKey) func(pebble.Reader) error
RetrieveMyBeaconPrivateKey retrieves the random beacon private key for the given epoch.
CAUTION: This method stores confidential information and should only be used in the context of the secrets database. This is enforced in the above layer (see storage.DKGState). Error returns: storage.ErrNotFound
func RetrieveProcessedIndex ¶ added in v0.37.1
RetrieveProcessedIndex returns the processed index for a job consumer
func RetrieveProtocolVersion ¶
RetrieveProtocolVersion retrieves the protocol version for the present spork.
func RetrieveQuorumCertificate ¶
func RetrieveQuorumCertificate(blockID flow.Identifier, qc *flow.QuorumCertificate) func(pebble.Reader) error
RetrieveQuorumCertificate retrieves a quorum certificate by blockID. Returns storage.ErrNotFound if no QC is stored for the block.
func RetrieveResultApproval ¶
func RetrieveResultApproval(approvalID flow.Identifier, approval *flow.ResultApproval) func(pebble.Reader) error
RetrieveResultApproval retrieves an approval by ID.
func RetrieveSafetyData ¶
func RetrieveSafetyData(chainID flow.ChainID, safetyData *hotstuff.SafetyData) func(pebble.Reader) error
RetrieveSafetyData retrieves safety data from the database.
func RetrieveSeal ¶
func RetrieveSporkID ¶
func RetrieveSporkID(sporkID *flow.Identifier) func(pebble.Reader) error
RetrieveSporkID retrieves the spork ID for the present spork.
func RetrieveSporkRootBlockHeight ¶
RetrieveSporkRootBlockHeight retrieves the spork root block height for the present spork.
func RetrieveTransaction ¶
func RetrieveTransaction(txID flow.Identifier, tx *flow.TransactionBody) func(pebble.Reader) error
RetrieveTransaction retrieves a transaction by fingerprint.
func RetrieveTransactionResult ¶
func RetrieveTransactionResult(blockID flow.Identifier, transactionID flow.Identifier, transactionResult *flow.TransactionResult) func(pebble.Reader) error
func RetrieveTransactionResultByIndex ¶
func RetrieveTransactionResultByIndex(blockID flow.Identifier, txIndex uint32, transactionResult *flow.TransactionResult) func(pebble.Reader) error
func SetEpochEmergencyFallbackTriggered ¶
func SetEpochEmergencyFallbackTriggered(blockID flow.Identifier) func(txn pebble.Writer) error
SetEpochEmergencyFallbackTriggered sets a flag in the DB indicating that epoch emergency fallback has been triggered, and the block where it was triggered.
EFM can be triggered in two ways:
- Finalizing the first block past the epoch commitment deadline, when the next epoch has not yet been committed (see protocol.Params for more detail)
- Finalizing a fork in which an invalid service event was incorporated.
TODO: in pebble/mutator.go must implement RetrieveEpochEmergencyFallbackTriggeredBlockID and verify not exist Note: The caller needs to ensure a previous value was not stored
func SetJobLatestIndex ¶
func SetProcessedIndex ¶ added in v0.37.1
SetProcessedIndex updates the processed index for a job consumer with given index
func UpdateBlockChildren ¶
func UpdateBlockChildren(blockID flow.Identifier, childrenIDs flow.IdentifierList) func(pebble.Writer) error
UpdateBlockChildren updates the children for a block.
func UpdateClusterFinalizedHeight ¶
UpdateClusterFinalizedHeight updates the finalized boundary for the given cluster.
func UpdateComputationResultUploadStatus ¶
func UpdateComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted bool) func(pebble.Writer) error
UpdateComputationResult updates given existing instance of ComputationResult in local BadgerDB.
func UpdateLivenessData ¶
func UpdateLivenessData(chainID flow.ChainID, livenessData *hotstuff.LivenessData) func(pebble.Writer) error
UpdateLivenessData updates liveness data in the database.
func UpdateSafetyData ¶
func UpdateSafetyData(chainID flow.ChainID, safetyData *hotstuff.SafetyData) func(pebble.Writer) error
UpdateSafetyData updates safety data in the database.
func UpsertComputationResultUploadStatus ¶
func UpsertComputationResultUploadStatus(blockID flow.Identifier, wasUploadCompleted bool) func(pebble.Writer) error
UpsertComputationResult upserts given existing instance of ComputationResult in local BadgerDB.
func WithReaderBatchWriter ¶
Types ¶
type ReaderBatchWriter ¶
type ReaderBatchWriter struct {
// contains filtered or unexported fields
}
func NewPebbleReaderBatchWriter ¶
func NewPebbleReaderBatchWriter(db *pebble.DB) *ReaderBatchWriter
func NewPebbleReaderBatchWriterWithBatch ¶
func NewPebbleReaderBatchWriterWithBatch(db *pebble.DB, batch *pebble.Batch) *ReaderBatchWriter
func (*ReaderBatchWriter) AddCallback ¶
func (b *ReaderBatchWriter) AddCallback(callback func())
func (*ReaderBatchWriter) Commit ¶
func (b *ReaderBatchWriter) Commit() error
func (*ReaderBatchWriter) IndexedBatch ¶
func (b *ReaderBatchWriter) IndexedBatch() *pebble.Batch
func (*ReaderBatchWriter) ReaderWriter ¶
func (b *ReaderBatchWriter) ReaderWriter() (pebble.Reader, pebble.Writer)
Source Files ¶
- approvals.go
- batch.go
- bft.go
- children.go
- chunk_data_pack.go
- chunk_locators.go
- cluster.go
- collections.go
- commits.go
- common.go
- computation_result.go
- dkg.go
- epoch.go
- events.go
- guarantees.go
- headers.go
- heights.go
- init.go
- interactions.go
- jobs.go
- prefix.go
- qcs.go
- receipts.go
- results.go
- seals.go
- spork.go
- transaction_results.go
- transactions.go
- version_beacon.go
- views.go