Module types

Source
Expand description

Common type definitions for ckb-script package.

Structs§

DataLocation
Used to specify the location of script data.
ExecV2Args
Arguments for exec syscall
Fd
File descriptor
FdArgs
Arguments shared by read, write and inherited fd syscalls
FullSuspendedState
Full state representing all VM instances from verifying a CKB script. It should be serializable to binary formats, while also be able to fully recover the running environment with the full transaction environment.
IterationResult
Single iteration result
LazyData
LazyData wrapper make sure not-loaded data will be loaded only after one access
PipeArgs
Arguments for pipe syscall
ReadState
VM is in waiting-to-read state.
ScriptGroup
A script group is defined as scripts that share the same hash.
SgData
Immutable context data at script group level
SgInfo
Script group level derived information.
SpawnArgs
Arguments for spawn syscall
TerminatedResult
Terminated result
TransactionState
Struct specifies which script has verified so far. State is lifetime free, but capture snapshot need heavy memory copy
TxData
Immutable context data at transaction level
TxInfo
Information that is either passed as the context of the transaction, or can be derived from the transaction.
VmContext
Mutable data at virtual machine level
WaitArgs
Arguments for wait syscall
WriteState
VM is in waiting-to-write state.

Enums§

Binaries
A tri-state enum for representing binary lookup results.
ChunkCommand
ChunkCommand is used to control the verification process to suspend or resume
DataGuard
A cell that is either loaded, or not yet loaded.
DataPieceId
A pointer to the data that is part of the transaction.
Message
Inter-process message, this is now used for implementing syscalls, but might be expanded for more usages later.
RunMode
The scheduler’s running mode.
ScriptGroupType
The script group type.
ScriptVersion
The version of CKB Script Verifier.
VerifyResult
Enum represent resumable verify result
VmArgs
When the vm is initialized, arguments are loaded onto the stack. This enum specifies how to locate these arguments.
VmState
VM State.

Constants§

FIRST_FD_SLOT
The first FD to be used
FIRST_VM_ID
The first VM booted always have 0 as the ID

Type Aliases§

DebugPrinter
Debug printer function type
Machine
The default machine type when asm feature is enabled. Note that ckb-script now functions solely based on ckb_vm::DefaultMachineRunner trait. The type provided here is only for default implementations.
SyscallGenerator
Syscall generator function type
VmId
VM id type
VmIsa
The type of CKB-VM ISA.
VmVersion
/// The type of CKB-VM version.