state_synchronization

package
v0.23.7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CodeIntermediateCIDs = iota
	CodeExecutionStateDiff
)
View Source
const MAX_BLOCK_SIZE = 1e6 // 1MB

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockWriter

type BlockWriter struct {
	// contains filtered or unexported fields
}

func (*BlockWriter) Flush

func (bw *BlockWriter) Flush() error

func (*BlockWriter) GetWrittenCids

func (bw *BlockWriter) GetWrittenCids() []cid.Cid

func (*BlockWriter) Reset

func (bw *BlockWriter) Reset()

func (*BlockWriter) Write

func (bw *BlockWriter) Write(p []byte) (n int, err error)

type ExecutionStateDiff

type ExecutionStateDiff struct {
	Collections        []*flow.Collection
	Events             []*flow.Event
	TrieUpdate         []*ledger.TrieUpdate
	TransactionResults []*flow.TransactionResult
}

type StateDiffStorer

type StateDiffStorer struct {
	// contains filtered or unexported fields
}

func NewStateDiffStorer

func NewStateDiffStorer(
	codec encoding.Codec,
	compressor network.Compressor,
	bstore blockstore.Blockstore,
) (*StateDiffStorer, error)

func (*StateDiffStorer) Load

Load loads the ExecutionStateDiff represented by the given CID from the blockstore. Since blocks are limited to MAX_BLOCK_SIZE bytes, it's possible that the data was stored in multiple chunks, and hence the root CID may point to a block for which the data itself is a list of concatenated CIDs.

func (*StateDiffStorer) Store

func (s *StateDiffStorer) Store(sd *ExecutionStateDiff) (cid.Cid, error)

Jump to

Keyboard shortcuts

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