verification

package
v0.43.1-rc.1.access-me... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2025 License: AGPL-3.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkDataPackRequest added in v0.17.0

type ChunkDataPackRequest struct {
	chunks.Locator // uniquely identifies chunk
	ChunkDataPackRequestInfo
}

ChunkDataPackRequest is an internal data structure in fetcher engine that is passed between the engine and requester module. It conveys required information for requesting a chunk data pack.

func NewChunkDataPackRequest added in v0.43.0

func NewChunkDataPackRequest(untrusted UntrustedChunkDataPackRequest) (*ChunkDataPackRequest, error)

NewChunkDataPackRequest creates a new instance of ChunkDataPackRequest. Construction ChunkDataPackRequest allowed only within the constructor.

All errors indicate a valid ChunkDataPackRequest cannot be constructed from the input.

type ChunkDataPackRequestInfo added in v0.23.2

type ChunkDataPackRequestInfo struct {
	ChunkID   flow.Identifier
	Height    uint64              // block height of execution result of the chunk, used to drop chunk requests of sealed heights.
	Agrees    flow.IdentifierList // execution node ids that generated the result of chunk.
	Disagrees flow.IdentifierList // execution node ids that generated a conflicting result with result of chunk.
	Targets   flow.IdentityList   // list of all execution nodes identity at the block height of this chunk (including non-responders).
}

func (ChunkDataPackRequestInfo) SampleTargets added in v0.23.2

func (c ChunkDataPackRequestInfo) SampleTargets(count int) (flow.IdentifierList, error)

SampleTargets returns identifier of execution nodes that can be asked for the chunk data pack, based on the agreeing and disagreeing execution nodes of the chunk data pack request.

type ChunkDataPackRequestInfoList added in v0.23.2

type ChunkDataPackRequestInfoList []*ChunkDataPackRequestInfo

type ChunkDataPackRequestList added in v0.17.0

type ChunkDataPackRequestList []*ChunkDataPackRequest

func (ChunkDataPackRequestList) ContainsChunkID added in v0.23.2

func (c ChunkDataPackRequestList) ContainsChunkID(chunkID flow.Identifier) bool

ContainsChunkID returns true if list contains a request for chunk ID.

func (ChunkDataPackRequestList) ContainsLocator added in v0.23.2

func (c ChunkDataPackRequestList) ContainsLocator(resultID flow.Identifier, chunkIndex uint64) bool

ContainsLocator returns true if list contains a request for the given resultID and chunkIndex.

func (ChunkDataPackRequestList) UniqueRequestInfo added in v0.23.2

UniqueRequestInfo extracts and returns request info based on chunk IDs. Note that a ChunkDataPackRequestList may have duplicate requests for the same chunk ID that belongs to distinct execution results.

type ChunkDataPackResponse added in v0.23.2

type ChunkDataPackResponse struct {
	chunks.Locator
	Cdp *flow.ChunkDataPack
}

ChunkDataPackResponse is an internal data structure in fetcher engine that is passed between the fetcher and requester engine. It conveys requested chunk data pack as well as meta-data for fetcher engine to process the chunk data pack.

func NewChunkDataPackResponse added in v0.43.0

func NewChunkDataPackResponse(untrusted UntrustedChunkDataPackResponse) (*ChunkDataPackResponse, error)

NewChunkDataPackResponse creates a new instance of ChunkDataPackResponse. Construction ChunkDataPackResponse allowed only within the constructor.

All errors indicate a valid ChunkDataPackResponse cannot be constructed from the input.

type ChunkStatus added in v0.17.0

type ChunkStatus struct {
	ChunkIndex      uint64
	BlockHeight     uint64
	ExecutionResult *flow.ExecutionResult
}

ChunkStatus is a data struct represents the current status of fetching chunk data pack for the chunk.

func (ChunkStatus) Chunk added in v0.23.2

func (s ChunkStatus) Chunk() *flow.Chunk

type ChunkStatusList added in v0.17.0

type ChunkStatusList []*ChunkStatus

func (ChunkStatusList) Chunks added in v0.17.0

func (l ChunkStatusList) Chunks() flow.ChunkList

type UntrustedChunkDataPackRequest added in v0.43.0

type UntrustedChunkDataPackRequest ChunkDataPackRequest

UntrustedChunkDataPackRequest is an untrusted input-only representation of a ChunkDataPackRequest, used for construction.

This type exists to ensure that constructor functions are invoked explicitly with named fields, which improves clarity and reduces the risk of incorrect field ordering during construction.

An instance of UntrustedChunkDataPackRequest should be validated and converted into a trusted ChunkDataPackRequest using NewChunkDataPackRequest constructor.

type UntrustedChunkDataPackResponse added in v0.43.0

type UntrustedChunkDataPackResponse ChunkDataPackResponse

UntrustedChunkDataPackResponse is an untrusted input-only representation of a ChunkDataPackResponse, used for construction.

This type exists to ensure that constructor functions are invoked explicitly with named fields, which improves clarity and reduces the risk of incorrect field ordering during construction.

An instance of UntrustedChunkDataPackResponse should be validated and converted into a trusted ChunkDataPackResponse using NewChunkDataPackResponse constructor.

type VerifiableChunkData added in v0.17.0

type VerifiableChunkData struct {
	IsSystemChunk     bool                             // indicates whether this is a system chunk
	Chunk             *flow.Chunk                      // the chunk to be verified
	Header            *flow.Header                     // BlockHeader that contains this chunk
	Snapshot          protocol.SnapshotExecutionSubset // state snapshot at the chunk's block
	Result            *flow.ExecutionResult            // execution result of this block
	ChunkDataPack     *flow.ChunkDataPack              // chunk data package needed to verify this chunk
	EndState          flow.StateCommitment             // state commitment at the end of this chunk
	TransactionOffset uint32                           // index of the first transaction in a chunk within a block
}

VerifiableChunkData represents a ready-to-verify chunk It contains the execution result as well as all resources needed to verify it

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL