Documentation ¶
Index ¶
- Constants
- Variables
- func NewExecutionDataService(codec encoding.Codec, compressor network.Compressor, ...) *executionDataServiceImpl
- type BlobNotFoundError
- type BlobRecord
- type BlobSizeLimitExceededError
- type BlobTree
- type BlobTreeLocation
- type BlobTreeRecord
- type ExecutionData
- type ExecutionDataCIDCache
- type ExecutionDataCIDCacheImpl
- type ExecutionDataReceivedCallback
- type ExecutionDataRequester
- type ExecutionDataService
- type MalformedDataError
Constants ¶
const ( CodeRecursiveCIDs = iota + 1 CodeExecutionData )
header codes to distinguish between different types of data
Variables ¶
var ErrBlobTreeDepthExceeded = errors.New("blob tree depth exceeded")
var ErrCacheMiss = errors.New("CID not found in cache")
Functions ¶
func NewExecutionDataService ¶
func NewExecutionDataService( codec encoding.Codec, compressor network.Compressor, blobService network.BlobService, metrics module.ExecutionDataServiceMetrics, logger zerolog.Logger, ) *executionDataServiceImpl
Types ¶
type BlobNotFoundError ¶
type BlobNotFoundError struct {
// contains filtered or unexported fields
}
BlobNotFoundError is returned when the blobservice failed to find a blob.
func (*BlobNotFoundError) Error ¶
func (e *BlobNotFoundError) Error() string
type BlobRecord ¶
type BlobRecord struct { BlobTreeRecord *BlobTreeRecord BlobTreeLocation BlobTreeLocation }
type BlobSizeLimitExceededError ¶
type BlobSizeLimitExceededError struct {
// contains filtered or unexported fields
}
BlobSizeLimitExceededError is returned when a blob exceeds the maximum size allowed.
func (*BlobSizeLimitExceededError) Error ¶
func (e *BlobSizeLimitExceededError) Error() string
type BlobTreeLocation ¶
type BlobTreeRecord ¶
type BlobTreeRecord struct { BlockID flow.Identifier BlockHeight uint64 BlobTree BlobTree }
type ExecutionData ¶
type ExecutionData struct { BlockID flow.Identifier Collections []*flow.Collection Events []flow.EventsList TrieUpdates []*ledger.TrieUpdate }
ExecutionData represents the execution data of a block
type ExecutionDataCIDCache ¶
type ExecutionDataCIDCacheImpl ¶
type ExecutionDataCIDCacheImpl struct {
// contains filtered or unexported fields
}
func NewExecutionDataCIDCache ¶
func NewExecutionDataCIDCache(size uint) *ExecutionDataCIDCacheImpl
func (*ExecutionDataCIDCacheImpl) BlobRecords ¶
func (e *ExecutionDataCIDCacheImpl) BlobRecords() uint
func (*ExecutionDataCIDCacheImpl) BlobTreeRecords ¶
func (e *ExecutionDataCIDCacheImpl) BlobTreeRecords() uint
func (*ExecutionDataCIDCacheImpl) Get ¶
func (e *ExecutionDataCIDCacheImpl) Get(c cid.Cid) (BlobRecord, error)
type ExecutionDataReceivedCallback ¶ added in v0.26.2
type ExecutionDataReceivedCallback func(*ExecutionData)
ExecutionDataReceivedCallback is a callback that is called ExecutionData is received for a new block
type ExecutionDataRequester ¶ added in v0.26.2
type ExecutionDataRequester interface { component.Component // OnBlockFinalized accepts block finalization notifications from the FinalizationDistributor OnBlockFinalized(*model.Block) // AddOnExecutionDataFetchedConsumer adds a callback to be called when a new ExecutionData is received AddOnExecutionDataFetchedConsumer(fn ExecutionDataReceivedCallback) }
ExecutionDataRequester is a component that syncs ExecutionData from the network, and exposes a callback that is called when a new ExecutionData is received
type ExecutionDataService ¶
type ExecutionDataService interface { module.ReadyDoneAware // Add constructs a blob tree for the given ExecutionData and // adds it to the blobservice, and then returns the root CID // and list of all CIDs. Add(ctx context.Context, sd *ExecutionData) (flow.Identifier, BlobTree, error) // Get gets the ExecutionData for the given root CID from the blobservice. Get(ctx context.Context, rootID flow.Identifier) (*ExecutionData, error) }
ExecutionDataService handles adding/getting execution data to/from a blobservice
type MalformedDataError ¶
type MalformedDataError struct {
// contains filtered or unexported fields
}
MalformedDataError is returned when malformed data is found at some level of the requested blob tree. It likely indicates that the tree was generated incorrectly, and hence the request should not be retried.
func (*MalformedDataError) Error ¶
func (e *MalformedDataError) Error() string
func (*MalformedDataError) Unwrap ¶
func (e *MalformedDataError) Unwrap() error