verification

package
v0.29.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkDataPackRequest

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

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

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

type ChunkDataPackRequestInfoList []*ChunkDataPackRequestInfo

type ChunkDataPackRequestList

type ChunkDataPackRequestList []*ChunkDataPackRequest

func (ChunkDataPackRequestList) ContainsChunkID

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

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

func (ChunkDataPackRequestList) ContainsLocator

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

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

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

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

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

func (ChunkStatus) ChunkLocatorID

func (s ChunkStatus) ChunkLocatorID() flow.Identifier

type ChunkStatusList

type ChunkStatusList []*ChunkStatus

func (ChunkStatusList) Chunks

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

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