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,
) errorVerifyWarpMessages 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) errorfunc (b *Block) EpochBit() boolfunc (b *Block) FPCVotes() [][]bytefunc (b *Block) Options(context.Context) ([2]chain.Block, error)func (b *Block) ParentID() ids.IDfunc (b *Block) Reject(context.Context) errorfunc (*Block) ShouldVerifyWithRuntime(context.Context) (bool, error)func (b *Block) Status() uint8func (b *Block) Timestamp() time.Timefunc (b *Block) Verify(ctx context.Context) errorfunc (b *Block) VerifyWithRuntime(ctx context.Context, blockContext *runtime.Runtime) errorManager
func NewManager(
mempool mempool.Mempool[*txs.Tx],
metrics metrics.Metrics,
s state.State,
txExecutorBackend *executor.Backend,
validatorManager validators.Manager,
stateLock *sync.Mutex,
) ManagerMockManager
MockManager is a mock of Manager interface.
func NewMockManager(ctrl *gomock.Controller) *MockManagerfunc (m *MockManager) EXPECT() *MockManagerMockRecorderfunc (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.IDfunc (m *MockManager) NewBlock(arg0 block.Block) chain.Blockfunc (m *MockManager) Preferred() ids.IDfunc (m *MockManager) SetPreference(blkID ids.ID) boolfunc (m *MockManager) VerifyTx(tx *txs.Tx) errorfunc (m *MockManager) VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) errorMockManagerMockRecorder
MockManagerMockRecorder is the mock recorder for MockManager.
func (mr *MockManagerMockRecorder) GetBlock(blkID any) *gomock.Callfunc (mr *MockManagerMockRecorder) GetState(blkID any) *gomock.Callfunc (mr *MockManagerMockRecorder) GetStatelessBlock(blkID any) *gomock.Callfunc (mr *MockManagerMockRecorder) LastAccepted() *gomock.Callfunc (mr *MockManagerMockRecorder) NewBlock(arg0 any) *gomock.Callfunc (mr *MockManagerMockRecorder) Preferred() *gomock.Callfunc (mr *MockManagerMockRecorder) SetPreference(blkID any) *gomock.Callfunc (mr *MockManagerMockRecorder) VerifyTx(tx any) *gomock.Callfunc (mr *MockManagerMockRecorder) VerifyUniqueInputs(blkID, inputs any) *gomock.Call