Documentation
¶
Index ¶
- type ExecutionDataCIDProvider
- func (p *ExecutionDataCIDProvider) CalculateChunkExecutionDataID(ced execution_data.ChunkExecutionData) (cid.Cid, error)
- func (p *ExecutionDataCIDProvider) CalculateExecutionDataRootID(edRoot flow.BlockExecutionDataRoot) (flow.Identifier, error)
- func (p *ExecutionDataCIDProvider) GenerateExecutionDataRoot(executionData *execution_data.BlockExecutionData) (flow.Identifier, *flow.BlockExecutionDataRoot, error)
- type ExecutionDataProvider
- type Provider
- type ProviderOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionDataCIDProvider ¶ added in v0.32.0
type ExecutionDataCIDProvider struct {
// contains filtered or unexported fields
}
func NewExecutionDataCIDProvider ¶ added in v0.32.0
func NewExecutionDataCIDProvider(serializer execution_data.Serializer) *ExecutionDataCIDProvider
func (*ExecutionDataCIDProvider) CalculateChunkExecutionDataID ¶ added in v0.32.0
func (p *ExecutionDataCIDProvider) CalculateChunkExecutionDataID( ced execution_data.ChunkExecutionData, ) (cid.Cid, error)
CalculateChunkExecutionDataID calculates the chunk execution data ID from the provided chunk execution data.
No errors are expected during normal operation.
func (*ExecutionDataCIDProvider) CalculateExecutionDataRootID ¶ added in v0.32.0
func (p *ExecutionDataCIDProvider) CalculateExecutionDataRootID( edRoot flow.BlockExecutionDataRoot, ) (flow.Identifier, error)
CalculateExecutionDataRootID calculates the execution data root ID from the provided execution data root.
No errors are expected during normal operation.
func (*ExecutionDataCIDProvider) GenerateExecutionDataRoot ¶
func (p *ExecutionDataCIDProvider) GenerateExecutionDataRoot( executionData *execution_data.BlockExecutionData, ) (flow.Identifier, *flow.BlockExecutionDataRoot, error)
GenerateExecutionDataRoot generates the execution data root and its ID from the provided block execution data. This is a helper function useful for testing.
No errors are expected during normal operation.
type ExecutionDataProvider ¶ added in v0.32.0
type ExecutionDataProvider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider( logger zerolog.Logger, metrics module.ExecutionDataProviderMetrics, serializer execution_data.Serializer, blobService network.BlobService, storage tracker.Storage, opts ...ProviderOption, ) *ExecutionDataProvider
func (*ExecutionDataProvider) Provide ¶ added in v0.32.0
func (p *ExecutionDataProvider) Provide(ctx context.Context, blockHeight uint64, executionData *execution_data.BlockExecutionData) (flow.Identifier, *flow.BlockExecutionDataRoot, error)
Provide adds the block execution data for a newly executed (generally not sealed or finalized) block to the blob store for distribution using Bitswap. It computes and returns the root CID of the execution data blob tree. This function returns once the root CID has been computed, and all blobs are successfully stored in the Bitswap Blobstore.
type Provider ¶
type Provider interface {
Provide(ctx context.Context, blockHeight uint64, executionData *execution_data.BlockExecutionData) (flow.Identifier, *flow.BlockExecutionDataRoot, error)
}
Provider is used to provide execution data blobs over the network via a blob service.
type ProviderOption ¶
type ProviderOption func(*ExecutionDataProvider)
func WithBlobSizeLimit ¶
func WithBlobSizeLimit(size int) ProviderOption