Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkAssigner ¶ added in v0.14.0
type ChunkAssigner struct {
// contains filtered or unexported fields
}
ChunkAssigner implements an instance of the Public Chunk Assignment algorithm for assigning chunks to verifier nodes in a deterministic but unpredictable manner. It implements the ChunkAssigner interface.
func NewChunkAssigner ¶ added in v0.14.0
func NewChunkAssigner(alpha uint, protocolState protocol.State) (*ChunkAssigner, error)
NewChunkAssigner generates and returns an instance of the Public Chunk Assignment algorithm. Parameter alpha is the number of verifiers that should be assigned to each chunk.
func (*ChunkAssigner) Assign ¶ added in v0.14.0
func (p *ChunkAssigner) Assign(result *flow.ExecutionResult, blockID flow.Identifier) (*chunkmodels.Assignment, error)
Assign generates the assignment error returns:
- NoValidChildBlockError indicates that no valid child block is known (which contains the block's source of randomness)
- unexpected errors should be considered symptoms of internal bugs
func (*ChunkAssigner) Size ¶ added in v0.14.0
func (p *ChunkAssigner) Size() uint
Size returns number of assignments
type ChunkVerifier ¶
type ChunkVerifier struct {
// contains filtered or unexported fields
}
ChunkVerifier is a verifier based on the current definitions of the flow network
func NewChunkVerifier ¶
NewChunkVerifier creates a chunk verifier containing a flow virtual machine
func (*ChunkVerifier) Verify ¶
func (fcv *ChunkVerifier) Verify( vc *verification.VerifiableChunkData, ) ( []byte, error, )
Verify verifies a given VerifiableChunk by executing it and checking the final state commitment. It returns a Spock Secret as a byte array, verification fault of the chunk, and an error.