Expand description
Common type definitions for ckb-script package.
Structs§
- Data
Location - Used to specify the location of script data.
- Exec
V2Args - Arguments for exec syscall
- Fd
- File descriptor
- FdArgs
- Arguments shared by read, write and inherited fd syscalls
- Full
Suspended State - 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.
- Iteration
Result - Single iteration result
- Lazy
Data - LazyData wrapper make sure not-loaded data will be loaded only after one access
- Pipe
Args - Arguments for pipe syscall
- Read
State - VM is in waiting-to-read state.
- Script
Group - 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.
- Spawn
Args - Arguments for spawn syscall
- Terminated
Result - Terminated result
- Transaction
State - 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
- Wait
Args - Arguments for wait syscall
- Write
State - VM is in waiting-to-write state.
Enums§
- Binaries
- A tri-state enum for representing binary lookup results.
- Chunk
Command - ChunkCommand is used to control the verification process to suspend or resume
- Data
Guard - A cell that is either loaded, or not yet loaded.
- Data
Piece Id - 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.
- Script
Group Type - The script group type.
- Script
Version - The version of CKB Script Verifier.
- Verify
Result - 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§
- Debug
Printer - 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.
- Syscall
Generator - Syscall generator function type
- VmId
- VM id type
- VmIsa
- The type of CKB-VM ISA.
- VmVersion
- /// The type of CKB-VM version.