This syscall manually closes a file descriptor. After calling this, any attempt to read/write the file descriptor
pointed to the other end would fail.
Note: available after ckb 2nd hardfork.
current_cyclesNeither native-simulator nor stub-syscalls
Current Cycles returns current cycle consumption just before executing this syscall.
This syscall consumes 500 cycles.
Exec runs an executable file from specified cell data in the context of an
already existing machine, replacing the previous executable. The used cycles
does not change, but the code, registers and memory of the vm are replaced
by those of the new program. It’s cycles consumption consists of two parts:
Exit, this script will be terminated after the exit syscall.
exit code 0 represents verification is success, others represent error code.
inherited_fdsNeither native-simulator nor stub-syscalls
This syscall retrieves the file descriptors available to the current process, which are passed in from the parent
process. These results are copied from the inherited_fds parameter of the Spawn syscall.
Note: available after ckb 2nd hardfork.
This syscall create a pipe with read-write pair of file descriptions. The file descriptor with read permission is
located at fds[0], and the corresponding file descriptor with write permission is located at fds[1].
Note: available after ckb 2nd hardfork.
process_idNeither native-simulator nor stub-syscalls
This syscall is used to get the current process id. Root process ID is 0.
Note: available after ckb 2nd hardfork.
This syscall reads data from a pipe via a file descriptor. The syscall Read attempts to read up to value pointed by
length bytes from file descriptor fd into the buffer, and the actual length of data read is returned.
Note: available after ckb 2nd hardfork.
The parent process calls the Spawn system call, which creates a new process (a child process) that is an
independent ckb-vm instance. It’s important to note that the parent process will not be blocked by the child
process as a result of this syscall.
Note: available after ckb 2nd hardfork.
vm_versionNeither native-simulator nor stub-syscalls
VM version syscall returns current running VM version, so far 2 values will be returned:
This syscall writes data to a pipe via a file descriptor. The syscall Write writes up to value pointed by length
bytes from the buffer, and the actual length of data written is returned.