diff --git a/fpp-dev/env.html b/fpp-dev/env.html index 54f9fed01..f38face99 100644 --- a/fpp-dev/env.html +++ b/fpp-dev/env.html @@ -177,7 +177,7 @@
Before kicking off the development of your own Fault Proof Program , it's important to understand the environment that your program will be running in.
-The FPP runs on top of a custom FPVM target, which is typically a VM with a modified subset of an existing reduced instruction set architecture. The FPVM is designed to +
The FPP runs on top of a custom FPVM target, which is typically a VM with a modified subset of an existing reduced instruction set architecture and a subset of Linux syscalls. The FPVM is designed to
execute verifiable programs, and commonly modifies the instruction set it is derived from as well as the internal representation of memory to support verifiable memory access, client
(program)
communication with the host
(the FPVM), and other implementation-specific features.
In order for the client
to read from the host
, special syscalls are modified within the FPVM to allow the client
to request preparation of and read foreign data.
When the client
wants to read data from the host
, it must first send a "hint" to the host
through the hint file descriptor, which is a request for the host
to prepare the data for reading. The host
will then
+
When the client
wants to read data from the host
, it must first send a "hint" to the host
through the hint file descriptor, which is a request for the host
to prepare the data for reading. The host
will then
prepare the data, and send a hint acknowledgement back to the client
. The client
can then read the data from the host through the designated file descriptor.
The preparation step ("hinting") is an optimization that allows the host
to know ahead of time the intents of the client
and the data it requires for execution. This can allow
+
The preparation step ("hinting") is an optimization that allows the host
to know ahead of time the intents of the client
and the data it requires for execution. This can allow
for lazy loading of data, and also prevent the need for unnecessary allocations within the host
's memory. This step is a no-op on-chain, and is only ran locally
when the host
is the native implementation of the FPVM.
If there is a feature that you would like to see supported, please open an issue or consider contributing!
-TODO
+Cannon is based off of the mips32r2
target architecture, supporting 55 instructions:
Category | Instruction | Description |
---|---|---|
Arithmetic | addi | Add immediate (with sign-extension). |
Arithmetic | addiu | Add immediate unsigned (no overflow). |
Arithmetic | addu | Add unsigned (no overflow). |
Logical | and | Bitwise AND. |
Logical | andi | Bitwise AND immediate. |
Branch | b | Unconditional branch. |
Conditional Branch | beq | Branch on equal. |
Conditional Branch | beqz | Branch if equal to zero. |
Conditional Branch | bgez | Branch on greater than or equal to zero. |
Conditional Branch | bgtz | Branch on greater than zero. |
Conditional Branch | blez | Branch on less than or equal to zero. |
Conditional Branch | bltz | Branch on less than zero. |
Conditional Branch | bne | Branch on not equal. |
Conditional Branch | bnez | Branch if not equal to zero. |
Logical | clz | Count leading zeros. |
Arithmetic | divu | Divide unsigned. |
Unconditional Jump | j | Jump. |
Unconditional Jump | jal | Jump and link. |
Unconditional Jump | jalr | Jump and link register. |
Unconditional Jump | jr | Jump register. |
Data Transfer | lb | Load byte. |
Data Transfer | lbu | Load byte unsigned. |
Data Transfer | lui | Load upper immediate. |
Data Transfer | lw | Load word. |
Data Transfer | lwr | Load word right. |
Data Transfer | mfhi | Move from HI register. |
Data Transfer | mflo | Move from LO register. |
Data Transfer | move | Move between registers. |
Data Transfer | movn | Move conditional on not zero. |
Data Transfer | movz | Move conditional on zero. |
Data Transfer | mtlo | Move to LO register. |
Arithmetic | mul | Multiply (to produce a word result). |
Arithmetic | multu | Multiply unsigned. |
Arithmetic | negu | Negate unsigned. |
No Op | nop | No operation. |
Logical | not | Bitwise NOT (pseudo-instruction in MIPS). |
Logical | or | Bitwise OR. |
Logical | ori | Bitwise OR immediate. |
Data Transfer | sb | Store byte. |
Logical | sll | Shift left logical. |
Logical | sllv | Shift left logical variable. |
Comparison | slt | Set on less than (signed). |
Comparison | slti | Set on less than immediate. |
Comparison | sltiu | Set on less than immediate unsigned. |
Comparison | sltu | Set on less than unsigned. |
Logical | sra | Shift right arithmetic. |
Logical | srl | Shift right logical. |
Logical | srlv | Shift right logical variable. |
Arithmetic | subu | Subtract unsigned. |
Data Transfer | sw | Store word. |
Data Transfer | swr | Store word right. |
Serialization | sync | Synchronize shared memory. |
System Calls | syscall | System call. |
Logical | xor | Bitwise XOR. |
Logical | xori | Bitwise XOR immediate. |
Asterisc is based off of the rv64gc
target architecture, which defines the following extensions:
FENCE
, ECALL
, EBREAK
are hardwired to implement a minimal subset of systemcalls of the linux kernel
risc64
runtime. risc64
runtime.It is built and maintained by members of OP Labs as well as open source contributors, and is licensed under the MIT License.
+It is built and maintained by members of OP Labs as well as open source contributors, and is licensed under the MIT License.
Kona provides tooling and abstractions around low-level syscalls, memory management, and other common structures that authors of verifiable programs
will need to interact with. It also provides build pipelines for compiling no_std
Rust programs to a format that can be executed by supported
Fault Proof VM targets.
It is built and maintained by members of OP Labs as well as open source contributors, and is licensed under the MIT License.
+It is built and maintained by members of OP Labs as well as open source contributors, and is licensed under the MIT License.
Kona provides tooling and abstractions around low-level syscalls, memory management, and other common structures that authors of verifiable programs
will need to interact with. It also provides build pipelines for compiling no_std
Rust programs to a format that can be executed by supported
Fault Proof VM targets.
It is built and maintained by members of OP Labs as well as open source contributors, and is licensed under the MIT License.
+It is built and maintained by members of OP Labs as well as open source contributors, and is licensed under the MIT License.
Kona provides tooling and abstractions around low-level syscalls, memory management, and other common structures that authors of verifiable programs
will need to interact with. It also provides build pipelines for compiling no_std
Rust programs to a format that can be executed by supported
Fault Proof VM targets.
The FPP runs on top of a custom FPVM target, which is typically a VM with a modified subset of an existing reduced instruction set architecture. The FPVM is designed to +
The FPP runs on top of a custom FPVM target, which is typically a VM with a modified subset of an existing reduced instruction set architecture and a subset of Linux syscalls. The FPVM is designed to
execute verifiable programs, and commonly modifies the instruction set it is derived from as well as the internal representation of memory to support verifiable memory access, client
(program)
communication with the host
(the FPVM), and other implementation-specific features.
In order for the client
to read from the host
, special syscalls are modified within the FPVM to allow the client
to request preparation of and read foreign data.
When the client
wants to read data from the host
, it must first send a "hint" to the host
through the hint file descriptor, which is a request for the host
to prepare the data for reading. The host
will then
+
When the client
wants to read data from the host
, it must first send a "hint" to the host
through the hint file descriptor, which is a request for the host
to prepare the data for reading. The host
will then
prepare the data, and send a hint acknowledgement back to the client
. The client
can then read the data from the host through the designated file descriptor.
The preparation step ("hinting") is an optimization that allows the host
to know ahead of time the intents of the client
and the data it requires for execution. This can allow
+
The preparation step ("hinting") is an optimization that allows the host
to know ahead of time the intents of the client
and the data it requires for execution. This can allow
for lazy loading of data, and also prevent the need for unnecessary allocations within the host
's memory. This step is a no-op on-chain, and is only ran locally
when the host
is the native implementation of the FPVM.
If there is a feature that you would like to see supported, please open an issue or consider contributing!
-TODO
+Cannon is based off of the mips32r2
target architecture, supporting 55 instructions:
Category | Instruction | Description |
---|---|---|
Arithmetic | addi | Add immediate (with sign-extension). |
Arithmetic | addiu | Add immediate unsigned (no overflow). |
Arithmetic | addu | Add unsigned (no overflow). |
Logical | and | Bitwise AND. |
Logical | andi | Bitwise AND immediate. |
Branch | b | Unconditional branch. |
Conditional Branch | beq | Branch on equal. |
Conditional Branch | beqz | Branch if equal to zero. |
Conditional Branch | bgez | Branch on greater than or equal to zero. |
Conditional Branch | bgtz | Branch on greater than zero. |
Conditional Branch | blez | Branch on less than or equal to zero. |
Conditional Branch | bltz | Branch on less than zero. |
Conditional Branch | bne | Branch on not equal. |
Conditional Branch | bnez | Branch if not equal to zero. |
Logical | clz | Count leading zeros. |
Arithmetic | divu | Divide unsigned. |
Unconditional Jump | j | Jump. |
Unconditional Jump | jal | Jump and link. |
Unconditional Jump | jalr | Jump and link register. |
Unconditional Jump | jr | Jump register. |
Data Transfer | lb | Load byte. |
Data Transfer | lbu | Load byte unsigned. |
Data Transfer | lui | Load upper immediate. |
Data Transfer | lw | Load word. |
Data Transfer | lwr | Load word right. |
Data Transfer | mfhi | Move from HI register. |
Data Transfer | mflo | Move from LO register. |
Data Transfer | move | Move between registers. |
Data Transfer | movn | Move conditional on not zero. |
Data Transfer | movz | Move conditional on zero. |
Data Transfer | mtlo | Move to LO register. |
Arithmetic | mul | Multiply (to produce a word result). |
Arithmetic | multu | Multiply unsigned. |
Arithmetic | negu | Negate unsigned. |
No Op | nop | No operation. |
Logical | not | Bitwise NOT (pseudo-instruction in MIPS). |
Logical | or | Bitwise OR. |
Logical | ori | Bitwise OR immediate. |
Data Transfer | sb | Store byte. |
Logical | sll | Shift left logical. |
Logical | sllv | Shift left logical variable. |
Comparison | slt | Set on less than (signed). |
Comparison | slti | Set on less than immediate. |
Comparison | sltiu | Set on less than immediate unsigned. |
Comparison | sltu | Set on less than unsigned. |
Logical | sra | Shift right arithmetic. |
Logical | srl | Shift right logical. |
Logical | srlv | Shift right logical variable. |
Arithmetic | subu | Subtract unsigned. |
Data Transfer | sw | Store word. |
Data Transfer | swr | Store word right. |
Serialization | sync | Synchronize shared memory. |
System Calls | syscall | System call. |
Logical | xor | Bitwise XOR. |
Logical | xori | Bitwise XOR immediate. |
Asterisc is based off of the rv64gc
target architecture, which defines the following extensions:
FENCE
, ECALL
, EBREAK
are hardwired to implement a minimal subset of systemcalls of the linux kernel
risc64
runtime. risc64
runtime.