Documentation ¶
Overview ¶
Package proposervm is a generated GoMock package.
Index ¶
- Constants
- type Block
- type Config
- type MockPostForkBlock
- func (m *MockPostForkBlock) Accept(arg0 context.Context) error
- func (m *MockPostForkBlock) Bytes() []byte
- func (m *MockPostForkBlock) EXPECT() *MockPostForkBlockMockRecorder
- func (m *MockPostForkBlock) Height() uint64
- func (m *MockPostForkBlock) ID() ids.ID
- func (m *MockPostForkBlock) Parent() ids.ID
- func (m *MockPostForkBlock) Reject(arg0 context.Context) error
- func (m *MockPostForkBlock) Status() choices.Status
- func (m *MockPostForkBlock) Timestamp() time.Time
- func (m *MockPostForkBlock) Verify(arg0 context.Context) error
- type MockPostForkBlockMockRecorder
- func (mr *MockPostForkBlockMockRecorder) Accept(arg0 any) *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Bytes() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Height() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) ID() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Parent() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Reject(arg0 any) *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Status() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Timestamp() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Verify(arg0 any) *gomock.Call
- 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) Commit() 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) GetFullPostForkBlock(ctx context.Context, blkID ids.ID) (snowman.Block, 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) 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)
- func (vm *VM) VerifyHeightIndex(context.Context) error
Constants ¶
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 { // Time at which proposerVM activates its congestion control mechanism ActivationTime time.Time // Durango fork activation time DurangoTime time.Time // Minimal P-chain height referenced upon block building MinimumPChainHeight uint64 // 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 }
type MockPostForkBlock ¶ added in v1.9.2
type MockPostForkBlock struct {
// contains filtered or unexported fields
}
MockPostForkBlock is a mock of PostForkBlock interface.
func NewMockPostForkBlock ¶ added in v1.9.2
func NewMockPostForkBlock(ctrl *gomock.Controller) *MockPostForkBlock
NewMockPostForkBlock creates a new mock instance.
func (*MockPostForkBlock) Accept ¶ added in v1.9.2
func (m *MockPostForkBlock) Accept(arg0 context.Context) error
Accept mocks base method.
func (*MockPostForkBlock) Bytes ¶ added in v1.9.2
func (m *MockPostForkBlock) Bytes() []byte
Bytes mocks base method.
func (*MockPostForkBlock) EXPECT ¶ added in v1.9.2
func (m *MockPostForkBlock) EXPECT() *MockPostForkBlockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPostForkBlock) Height ¶ added in v1.9.2
func (m *MockPostForkBlock) Height() uint64
Height mocks base method.
func (*MockPostForkBlock) ID ¶ added in v1.9.2
func (m *MockPostForkBlock) ID() ids.ID
ID mocks base method.
func (*MockPostForkBlock) Parent ¶ added in v1.9.2
func (m *MockPostForkBlock) Parent() ids.ID
Parent mocks base method.
func (*MockPostForkBlock) Reject ¶ added in v1.9.2
func (m *MockPostForkBlock) Reject(arg0 context.Context) error
Reject mocks base method.
func (*MockPostForkBlock) Status ¶ added in v1.9.2
func (m *MockPostForkBlock) Status() choices.Status
Status mocks base method.
func (*MockPostForkBlock) Timestamp ¶ added in v1.9.2
func (m *MockPostForkBlock) Timestamp() time.Time
Timestamp mocks base method.
type MockPostForkBlockMockRecorder ¶ added in v1.9.2
type MockPostForkBlockMockRecorder struct {
// contains filtered or unexported fields
}
MockPostForkBlockMockRecorder is the mock recorder for MockPostForkBlock.
func (*MockPostForkBlockMockRecorder) Accept ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Accept(arg0 any) *gomock.Call
Accept indicates an expected call of Accept.
func (*MockPostForkBlockMockRecorder) Bytes ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Bytes() *gomock.Call
Bytes indicates an expected call of Bytes.
func (*MockPostForkBlockMockRecorder) Height ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Height() *gomock.Call
Height indicates an expected call of Height.
func (*MockPostForkBlockMockRecorder) ID ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) ID() *gomock.Call
ID indicates an expected call of ID.
func (*MockPostForkBlockMockRecorder) Parent ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Parent() *gomock.Call
Parent indicates an expected call of Parent.
func (*MockPostForkBlockMockRecorder) Reject ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Reject(arg0 any) *gomock.Call
Reject indicates an expected call of Reject.
func (*MockPostForkBlockMockRecorder) Status ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Status() *gomock.Call
Status indicates an expected call of Status.
func (*MockPostForkBlockMockRecorder) Timestamp ¶ added in v1.9.2
func (mr *MockPostForkBlockMockRecorder) Timestamp() *gomock.Call
Timestamp indicates an expected call of Timestamp.
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 ¶
func (*VM) GetAncestors ¶
func (*VM) GetBlockIDAtHeight ¶
vm.ctx.Lock should be held
func (*VM) GetFullPostForkBlock ¶
Note: this is a contention heavy call that should be avoided for frequent/repeated indexer ops
func (*VM) GetLastStateSummary ¶ added in v1.8.4
func (*VM) GetOngoingSyncStateSummary ¶ added in v1.8.4
func (*VM) GetStateSummary ¶ added in v1.8.4
func (*VM) Initialize ¶
func (*VM) ParseBlock ¶
func (*VM) ParseStateSummary ¶ added in v1.8.4
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.
func (*VM) StateSyncEnabled ¶ added in v1.8.4
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package proposer is a generated GoMock package.
|
Package proposer is a generated GoMock package. |
Package scheduler is a generated GoMock package.
|
Package scheduler is a generated GoMock package. |
Package state is a generated GoMock package.
|
Package state is a generated GoMock package. |