executor

package
v1.22.41 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Ctx           context.Context
	LuxCtx        *consContext.Context // Lux consensus context
	Config        *config.Config
	Fxs           []*fxs.ParsedFx
	TypeToFxIndex map[reflect.Type]int
	Codec         codec.Manager
	// Note: FeeAssetID may be different than ctx.XAssetID if this XVM is
	// running in a subnet.
	FeeAssetID   ids.ID
	Bootstrapped bool

	// Chain IDs for cross-chain operations
	XChainID ids.ID
	CChainID ids.ID

	// Logger for this backend
	Log log.Logger

	// SharedMemory provides cross-chain atomic operations
	SharedMemory SharedMemory
}

func (*Backend) ToChainContext

func (b *Backend) ToChainContext() *verify.ChainContext

ToChainContext creates a verify.ChainContext from this backend

type Executor

type Executor struct {
	Codec          codec.Manager
	State          state.Chain // state will be modified
	Tx             *txs.Tx
	Inputs         set.Set[ids.ID]             // imported inputs
	AtomicRequests map[ids.ID]*atomic.Requests // may be nil
}

func (*Executor) BaseTx

func (e *Executor) BaseTx(tx *txs.BaseTx) error

func (*Executor) CreateAssetTx

func (e *Executor) CreateAssetTx(tx *txs.CreateAssetTx) error

func (*Executor) ExportTx

func (e *Executor) ExportTx(tx *txs.ExportTx) error

func (*Executor) ImportTx

func (e *Executor) ImportTx(tx *txs.ImportTx) error

func (*Executor) OperationTx

func (e *Executor) OperationTx(tx *txs.OperationTx) error

type SemanticVerifier

type SemanticVerifier struct {
	*Backend
	State state.ReadOnlyChain
	Tx    *txs.Tx
}

func (*SemanticVerifier) BaseTx

func (v *SemanticVerifier) BaseTx(tx *txs.BaseTx) error

func (*SemanticVerifier) CreateAssetTx

func (v *SemanticVerifier) CreateAssetTx(tx *txs.CreateAssetTx) error

func (*SemanticVerifier) ExportTx

func (v *SemanticVerifier) ExportTx(tx *txs.ExportTx) error

func (*SemanticVerifier) ImportTx

func (v *SemanticVerifier) ImportTx(tx *txs.ImportTx) error

func (*SemanticVerifier) OperationTx

func (v *SemanticVerifier) OperationTx(tx *txs.OperationTx) error

type SharedMemory

type SharedMemory interface {
	Get(peerChainID ids.ID, keys [][]byte) ([][]byte, error)
	Apply(requests map[ids.ID]interface{}, batch ...interface{}) error
}

SharedMemory interface for cross-chain operations

type SyntacticVerifier

type SyntacticVerifier struct {
	*Backend
	Tx *txs.Tx
}

func (*SyntacticVerifier) BaseTx

func (v *SyntacticVerifier) BaseTx(tx *txs.BaseTx) error

func (*SyntacticVerifier) CreateAssetTx

func (v *SyntacticVerifier) CreateAssetTx(tx *txs.CreateAssetTx) error

func (*SyntacticVerifier) ExportTx

func (v *SyntacticVerifier) ExportTx(tx *txs.ExportTx) error

func (*SyntacticVerifier) ImportTx

func (v *SyntacticVerifier) ImportTx(tx *txs.ImportTx) error

func (*SyntacticVerifier) OperationTx

func (v *SyntacticVerifier) OperationTx(tx *txs.OperationTx) error

Jump to

Keyboard shortcuts

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