Run NodesReferencevmsplatformvmblock

executor

Package executor is a generated GoMock package.

import "github.com/luxfi/node/vms/platformvm/block/executor"

Package executor is a generated GoMock package.

Functions

VerifyWarpMessages

func VerifyWarpMessages(
	ctx context.Context,
	networkID uint32,
	validatorState validators.State,
	pChainHeight uint64,
	b block.Block,
) error

VerifyWarpMessages verifies every warp message the block carries. If any of them is invalid, an error is returned.

Every transaction means every transaction: the decision txs a block charges for, and — on a proposal block — the tx the chain emitted about itself. A warp message is an assertion about another chain no matter who put it in the block, so which of the two sets it arrived in cannot decide whether its signature is checked.

When GPU acceleration is available and the block contains multiple BLS warp signatures, verification is batched through the GPU for throughput. Otherwise falls back to sequential CPU verification.

Types

Block

Exported for testing in platformvm package.

func (b *Block) Accept(context.Context) error
func (b *Block) EpochBit() bool
func (b *Block) FPCVotes() [][]byte
func (b *Block) Options(context.Context) ([2]chain.Block, error)
func (b *Block) ParentID() ids.ID
func (b *Block) Reject(context.Context) error
func (*Block) ShouldVerifyWithRuntime(context.Context) (bool, error)
func (b *Block) Status() uint8
func (b *Block) Timestamp() time.Time
func (b *Block) Verify(ctx context.Context) error
func (b *Block) VerifyWithRuntime(ctx context.Context, blockContext *runtime.Runtime) error

Manager

func NewManager(
	mempool mempool.Mempool[*txs.Tx],
	metrics metrics.Metrics,
	s state.State,
	txExecutorBackend *executor.Backend,
	validatorManager validators.Manager,

	stateLock *sync.Mutex,
) Manager

MockManager

MockManager is a mock of Manager interface.

func NewMockManager(ctrl *gomock.Controller) *MockManager
func (m *MockManager) EXPECT() *MockManagerMockRecorder
func (m *MockManager) GetBlock(blkID ids.ID) (chain.Block, error)
func (m *MockManager) GetState(blkID ids.ID) (state.Chain, bool)
func (m *MockManager) GetStatelessBlock(blkID ids.ID) (block.Block, error)
func (m *MockManager) LastAccepted() ids.ID
func (m *MockManager) NewBlock(arg0 block.Block) chain.Block
func (m *MockManager) Preferred() ids.ID
func (m *MockManager) SetPreference(blkID ids.ID) bool
func (m *MockManager) VerifyTx(tx *txs.Tx) error
func (m *MockManager) VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) error

MockManagerMockRecorder

MockManagerMockRecorder is the mock recorder for MockManager.

func (mr *MockManagerMockRecorder) GetBlock(blkID any) *gomock.Call
func (mr *MockManagerMockRecorder) GetState(blkID any) *gomock.Call
func (mr *MockManagerMockRecorder) GetStatelessBlock(blkID any) *gomock.Call
func (mr *MockManagerMockRecorder) LastAccepted() *gomock.Call
func (mr *MockManagerMockRecorder) NewBlock(arg0 any) *gomock.Call
func (mr *MockManagerMockRecorder) Preferred() *gomock.Call
func (mr *MockManagerMockRecorder) SetPreference(blkID any) *gomock.Call
func (mr *MockManagerMockRecorder) VerifyTx(tx any) *gomock.Call
func (mr *MockManagerMockRecorder) VerifyUniqueInputs(blkID, inputs any) *gomock.Call