Skip to content

Commit

Permalink
deploy: 1973a2f
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Feb 12, 2024
1 parent 1a30849 commit b30d98c
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 20 deletions.
8 changes: 4 additions & 4 deletions fpp-dev/env.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ <h1 id="environment"><a class="header" href="#environment">Environment</a></h1>
<p>Before kicking off the development of your own <a href="../glossary.html#fault-proof-program">Fault Proof Program</a>
,
it's important to understand the environment that your program will be running in.</p>
<p>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
<p>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, <code>client</code> (program)
communication with the <code>host</code> (the FPVM), and other implementation-specific features.</p>
<h2 id="host---client-communication"><a class="header" href="#host---client-communication">Host &lt;-&gt; Client Communication</a></h2>
Expand All @@ -186,17 +186,17 @@ <h2 id="host---client-communication"><a class="header" href="#host---client-comm
(<a href="https://github.com/ethereum-optimism/optimism/blob/develop/specs/fault-proof.md#pre-image-oracle">specification</a>).</p>
<p>In order for the <code>client</code> to read from the <code>host</code>, special syscalls are modified within the FPVM to allow the <code>client</code> to request preparation of and read foreign data.</p>
<h3 id="reading"><a class="header" href="#reading">Reading</a></h3>
<p>When the <code>client</code> wants to read data from the <code>host</code>, it must first send a &quot;hint&quot; to the <code>host</code> through the hint file descriptor, which is a request for the <code>host</code> to prepare the data for reading. The <code>host</code> will then
<p>When the <code>client</code> wants to read data from the <code>host</code>, it must first send a "hint" to the <code>host</code> through the hint file descriptor, which is a request for the <code>host</code> to prepare the data for reading. The <code>host</code> will then
prepare the data, and send a hint acknowledgement back to the <code>client</code>. The <code>client</code> can then read the data from the host through the designated file descriptor.</p>
<p>The preparation step (&quot;hinting&quot;) is an optimization that allows the <code>host</code> to know ahead of time the intents of the <code>client</code> and the data it requires for execution. This can allow
<p>The preparation step ("hinting") is an optimization that allows the <code>host</code> to know ahead of time the intents of the <code>client</code> 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 <code>host</code>'s memory. This step is a no-op on-chain, and is only ran locally
when the <code>host</code> is the native implementation of the FPVM.</p>
<center>
<pre class="mermaid">sequenceDiagram
Client-&gt;&gt;+Host: Hint preimage (no-op on-chain / read-only mode)
Host--&gt;&gt;Host: Prepare Preimage
Host--&gt;&gt;-Client: Hint acknowledgement
Client--&gt;&gt;+Host: Preimage Read
Client--&gt;&gt;+Host: Preimage Request
Host--&gt;&gt;-Client: Preimage Data
</pre>
</center>
Expand Down
64 changes: 61 additions & 3 deletions fpp-dev/targets.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,74 @@ <h1 id="supported-targets"><a class="header" href="#supported-targets">Supported
</tbody></table>
</div>
<p>If there is a feature that you would like to see supported, please <a href="https://github.com/ethereum-optimism/kona/issues/new">open an issue</a> or <a href="https://github.com/ethereum-optimism/kona/tree/main/CONTRIBUTING.md">consider contributing</a>!</p>
<h2 id="cannon-mips32rel1"><a class="header" href="#cannon-mips32rel1">Cannon (MIPS32rel1)</a></h2>
<p><em>TODO</em></p>
<h2 id="cannon-mips32r2"><a class="header" href="#cannon-mips32r2">Cannon (MIPS32r2)</a></h2>
<p>Cannon is based off of the <code>mips32r2</code> target architecture, supporting 55 instructions:</p>
<div class="table-wrapper"><table><thead><tr><th>Category</th><th>Instruction</th><th>Description</th></tr></thead><tbody>
<tr><td><code>Arithmetic</code></td><td><code>addi</code></td><td>Add immediate (with sign-extension).</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>addiu</code></td><td>Add immediate unsigned (no overflow).</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>addu</code></td><td>Add unsigned (no overflow).</td></tr>
<tr><td><code>Logical</code></td><td><code>and</code></td><td>Bitwise AND.</td></tr>
<tr><td><code>Logical</code></td><td><code>andi</code></td><td>Bitwise AND immediate.</td></tr>
<tr><td><code>Branch</code></td><td><code>b</code></td><td>Unconditional branch.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>beq</code></td><td>Branch on equal.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>beqz</code></td><td>Branch if equal to zero.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>bgez</code></td><td>Branch on greater than or equal to zero.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>bgtz</code></td><td>Branch on greater than zero.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>blez</code></td><td>Branch on less than or equal to zero.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>bltz</code></td><td>Branch on less than zero.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>bne</code></td><td>Branch on not equal.</td></tr>
<tr><td><code>Conditional Branch</code></td><td><code>bnez</code></td><td>Branch if not equal to zero.</td></tr>
<tr><td><code>Logical</code></td><td><code>clz</code></td><td>Count leading zeros.</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>divu</code></td><td>Divide unsigned.</td></tr>
<tr><td><code>Unconditional Jump</code></td><td><code>j</code></td><td>Jump.</td></tr>
<tr><td><code>Unconditional Jump</code></td><td><code>jal</code></td><td>Jump and link.</td></tr>
<tr><td><code>Unconditional Jump</code></td><td><code>jalr</code></td><td>Jump and link register.</td></tr>
<tr><td><code>Unconditional Jump</code></td><td><code>jr</code></td><td>Jump register.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>lb</code></td><td>Load byte.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>lbu</code></td><td>Load byte unsigned.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>lui</code></td><td>Load upper immediate.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>lw</code></td><td>Load word.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>lwr</code></td><td>Load word right.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>mfhi</code></td><td>Move from HI register.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>mflo</code></td><td>Move from LO register.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>move</code></td><td>Move between registers.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>movn</code></td><td>Move conditional on not zero.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>movz</code></td><td>Move conditional on zero.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>mtlo</code></td><td>Move to LO register.</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>mul</code></td><td>Multiply (to produce a word result).</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>multu</code></td><td>Multiply unsigned.</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>negu</code></td><td>Negate unsigned.</td></tr>
<tr><td><code>No Op</code></td><td><code>nop</code></td><td>No operation.</td></tr>
<tr><td><code>Logical</code></td><td><code>not</code></td><td>Bitwise NOT (pseudo-instruction in MIPS).</td></tr>
<tr><td><code>Logical</code></td><td><code>or</code></td><td>Bitwise OR.</td></tr>
<tr><td><code>Logical</code></td><td><code>ori</code></td><td>Bitwise OR immediate.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>sb</code></td><td>Store byte.</td></tr>
<tr><td><code>Logical</code></td><td><code>sll</code></td><td>Shift left logical.</td></tr>
<tr><td><code>Logical</code></td><td><code>sllv</code></td><td>Shift left logical variable.</td></tr>
<tr><td><code>Comparison</code></td><td><code>slt</code></td><td>Set on less than (signed).</td></tr>
<tr><td><code>Comparison</code></td><td><code>slti</code></td><td>Set on less than immediate.</td></tr>
<tr><td><code>Comparison</code></td><td><code>sltiu</code></td><td>Set on less than immediate unsigned.</td></tr>
<tr><td><code>Comparison</code></td><td><code>sltu</code></td><td>Set on less than unsigned.</td></tr>
<tr><td><code>Logical</code></td><td><code>sra</code></td><td>Shift right arithmetic.</td></tr>
<tr><td><code>Logical</code></td><td><code>srl</code></td><td>Shift right logical.</td></tr>
<tr><td><code>Logical</code></td><td><code>srlv</code></td><td>Shift right logical variable.</td></tr>
<tr><td><code>Arithmetic</code></td><td><code>subu</code></td><td>Subtract unsigned.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>sw</code></td><td>Store word.</td></tr>
<tr><td><code>Data Transfer</code></td><td><code>swr</code></td><td>Store word right.</td></tr>
<tr><td><code>Serialization</code></td><td><code>sync</code></td><td>Synchronize shared memory.</td></tr>
<tr><td><code>System Calls</code></td><td><code>syscall</code></td><td>System call.</td></tr>
<tr><td><code>Logical</code></td><td><code>xor</code></td><td>Bitwise XOR.</td></tr>
<tr><td><code>Logical</code></td><td><code>xori</code></td><td>Bitwise XOR immediate.</td></tr>
</tbody></table>
</div>
<h2 id="asterisc-risc-v"><a class="header" href="#asterisc-risc-v">Asterisc (RISC-V)</a></h2>
<p>Asterisc is based off of the <code>rv64gc</code> target architecture, which defines the following extensions:</p>
<ul>
<li><code>RV32I</code> support - 32 bit base instruction set
<ul>
<li><code>FENCE</code>, <code>ECALL</code>, <code>EBREAK</code> are hardwired to implement a minimal subset of systemcalls of the linux kernel
<ul>
<li>Work in progress. All syscalls used by the Golang <code>risc64</code> runtime. </li>
<li>Work in progress. All syscalls used by the Golang <code>risc64</code> runtime.</li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ <h2 id="introduction"><a class="header" href="#introduction">Introduction</a></h
<p>Kona is a suite of libraries and build pipelines for developing verifiable Rust programs targeting
<a href="./glossary.html#fault-proof-vm">Fault Proof VMs</a>
.</p>
<p>It is built and maintained by members of <a href="https://github.com/ethereum-optimism">OP Labs</a> as well as open source contributors, and is licensed under the MIT License. </p>
<p>It is built and maintained by members of <a href="https://github.com/ethereum-optimism">OP Labs</a> as well as open source contributors, and is licensed under the MIT License.</p>
<p>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 <code>no_std</code> Rust programs to a format that can be executed by supported
Fault Proof VM targets.</p>
Expand Down
2 changes: 1 addition & 1 deletion intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ <h2 id="introduction"><a class="header" href="#introduction">Introduction</a></h
<p>Kona is a suite of libraries and build pipelines for developing verifiable Rust programs targeting
<a href="./glossary.html#fault-proof-vm">Fault Proof VMs</a>
.</p>
<p>It is built and maintained by members of <a href="https://github.com/ethereum-optimism">OP Labs</a> as well as open source contributors, and is licensed under the MIT License. </p>
<p>It is built and maintained by members of <a href="https://github.com/ethereum-optimism">OP Labs</a> as well as open source contributors, and is licensed under the MIT License.</p>
<p>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 <code>no_std</code> Rust programs to a format that can be executed by supported
Fault Proof VM targets.</p>
Expand Down
Loading

0 comments on commit b30d98c

Please sign in to comment.