verification

package
v0.25.9-er-index Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: AGPL-3.0 Imports: 4 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.

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

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.

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

func (ChunkStatus) ChunkLocatorID added in v0.17.0

func (s ChunkStatus) ChunkLocatorID() flow.Identifier

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 ReceiptDataPack

type ReceiptDataPack struct {
	Receipt  *flow.ExecutionReceipt
	OriginID flow.Identifier
	Ctx      context.Context // used for span tracing
}

ReceiptDataPack represents an execution receipt with some metadata. This is an internal entity for verification node.

func (*ReceiptDataPack) Checksum

func (r *ReceiptDataPack) Checksum() flow.Identifier

Checksum returns the checksum of the ReceiptDataPack.

func (*ReceiptDataPack) ID

ID returns the unique identifier for the ReceiptDataPack which is the id of its execution receipt.

type ResultDataPack

type ResultDataPack struct {
	ExecutorID      flow.Identifier
	ExecutionResult *flow.ExecutionResult
}

ResultDataPack represents an execution result with some metadata. This is an internal entity for verification node.

func (*ResultDataPack) Checksum

func (r *ResultDataPack) Checksum() flow.Identifier

Checksum returns the checksum of the ResultDataPack.

func (*ResultDataPack) ID

func (r *ResultDataPack) ID() flow.Identifier

ID returns the unique identifier for the ResultDataPack which is the id of its execution result.

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
	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

Jump to

Keyboard shortcuts

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