Documentation
¶
Index ¶
- Constants
- type Block
- type Config
- type PostForkBlock
- type VM
- func (vm *VM) BatchedParseBlock(ctx context.Context, blks [][]byte) ([]snowman.Block, error)
- func (vm *VM) BuildBlock(ctx context.Context) (snowman.Block, error)
- func (vm *VM) GetAncestors(ctx context.Context, blkID ids.ID, maxBlocksNum int, maxBlocksSize int, ...) ([][]byte, error)
- func (vm *VM) GetBlock(ctx context.Context, id ids.ID) (snowman.Block, error)
- func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error)
- func (vm *VM) GetLastStateSummary(ctx context.Context) (block.StateSummary, error)
- func (vm *VM) GetOngoingSyncStateSummary(ctx context.Context) (block.StateSummary, error)
- func (vm *VM) GetStateSummary(ctx context.Context, height uint64) (block.StateSummary, error)
- func (vm *VM) Initialize(ctx context.Context, chainCtx *snow.Context, db database.Database, ...) error
- func (vm *VM) LastAccepted(ctx context.Context) (ids.ID, error)
- func (vm *VM) ParseBlock(ctx context.Context, b []byte) (snowman.Block, error)
- func (vm *VM) ParseLocalBlock(ctx context.Context, b []byte) (snowman.Block, error)
- func (vm *VM) ParseStateSummary(ctx context.Context, summaryBytes []byte) (block.StateSummary, error)
- func (vm *VM) SetPreference(ctx context.Context, preferred ids.ID) error
- func (vm *VM) SetState(ctx context.Context, newState snow.State) error
- func (vm *VM) Shutdown(ctx context.Context) error
- func (vm *VM) StateSyncEnabled(ctx context.Context) (bool, error)
Constants ¶
View Source
const ( // DefaultMinBlockDelay should be kept as whole seconds because block // timestamps are only specific to the second. DefaultMinBlockDelay = time.Second // DefaultNumHistoricalBlocks as 0 results in never deleting any historical // blocks. DefaultNumHistoricalBlocks uint64 = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.10.18
type Config struct { Upgrades upgrade.Config // Configurable minimal delay among blocks issued consecutively MinBlkDelay time.Duration // Maximal number of block indexed. // Zero signals all blocks are indexed. NumHistoricalBlocks uint64 // Block signer StakingLeafSigner crypto.Signer // Block certificate StakingCertLeaf *staking.Certificate // Registerer for prometheus metrics Registerer prometheus.Registerer }
type PostForkBlock ¶
type PostForkBlock interface { Block // contains filtered or unexported methods }
type VM ¶
type VM struct { block.ChainVM Config state.State proposer.Windower tree.Tree scheduler.Scheduler mockable.Clock // contains filtered or unexported fields }
func New ¶
New performs best when [minBlkDelay] is whole seconds. This is because block timestamps are only specific to the second.
func (*VM) BatchedParseBlock ¶ added in v1.6.4
func (*VM) GetAncestors ¶ added in v1.6.4
func (*VM) GetBlockIDAtHeight ¶ added in v1.7.5
vm.ctx.Lock should be held
func (*VM) GetLastStateSummary ¶ added in v1.7.11
func (*VM) GetOngoingSyncStateSummary ¶ added in v1.7.11
func (*VM) GetStateSummary ¶ added in v1.7.11
func (*VM) Initialize ¶
func (*VM) ParseBlock ¶
func (*VM) ParseLocalBlock ¶ added in v1.11.11
func (*VM) ParseStateSummary ¶ added in v1.7.11
func (vm *VM) ParseStateSummary(ctx context.Context, summaryBytes []byte) (block.StateSummary, error)
Note: it's important that ParseStateSummary do not use any index or state to allow summaries being parsed also by freshly started node with no previous state.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
proposermock
Package proposermock is a generated GoMock package.
|
Package proposermock is a generated GoMock package. |
schedulermock
Package schedulermock is a generated GoMock package.
|
Package schedulermock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.