|
1 | 1 | ---
|
2 |
| -title: Asterisc |
| 2 | +title: Fault proof VM - Asterisc |
3 | 3 | lang: en-US
|
4 | 4 | description: Learn about Asterisc
|
5 | 5 | ---
|
6 | 6 |
|
7 | 7 | # Asterisc
|
8 | 8 |
|
9 |
| -[Asterisc](https://github.com/protolambda/asterisc/tree/master) is an alternative fault-proof VM for the OP Stack, crafted to validate RISC-V program execution via an interactive fraud-proof mechanism. Asterisc delivers a minimalist yet powerful solution for optimistic rollup fraud-proofing through Go. Leveraging the RISC-V architecture, it offers: |
| 9 | +Asterisc is an alternative implementation of the [fault-proof VM](/stack/fault-proofs/fp-components#fault-proof-virtual-machine). When combined with the a [fault proof program](/stack/fault-proofs/fp-components#fault-proof-program) like [Kona](https://github.com/anton-rs/kona), Asterisc is equivalent to Cannon + OP-Program. Asterisc uses a RISC-V architecture instead of MIPS, and Kona is written in Rust instead of Go. |
10 | 10 |
|
11 |
| -* Support for 64-bit operations |
12 |
| -* Concurrent yet deterministic threading |
13 |
| -* Compatibility with RISC-V's expanding ecosystem |
| 11 | +Read more about fault-proofs in our [Fault-proof explainer](/stack/fault-proofs/explainer) and [Cannon documentation](/stack/fault-proofs/cannon#overview-of-offchain-cannon-components) |
14 | 12 |
|
15 |
| -Read more about fault-proofs in our [Fault-proof explainer](/stack/fault-proofs/explainer) |
| 13 | +## Benefits over Cannon |
16 | 14 |
|
17 |
| -## How it works |
| 15 | +[Cannon](https://github.com/ethereum-optimism/cannon/) offers similar functionality but has key differences: |
18 | 16 |
|
19 |
| -Asterisc enables parties to reach consensus on shared execution trace states. In cases of dispute, it identifies the diverging execution step. Commitments are generated for memory, registers, CSR, and VM states across the execution trace, with disputed steps emulated within the EVM to resolve inconsistencies. |
| 17 | +* Cannon operates on a 32-bit MIPS architecture, whereas Asterisc uses RISC-V. |
| 18 | +* Asterisc supports 64-bit operations and deterministic threading, making it more future-ready. |
| 19 | + |
| 20 | +## How it works |
20 | 21 |
|
21 |
| -Ready to dive in? Keep reading or head over to the [Asterisc repo](https://github.com/protolambda/asterisc/tree/master). |
| 22 | +Asterisc, when combined with fault proof program like Kona, enables parties to reach consensus on shared execution trace states. In cases of dispute, it identifies the diverging execution step. Commitments are generated for memory, registers, CSR, and VM states across the execution trace, with disputed steps emulated within the EVM to resolve inconsistencies. |
22 | 23 |
|
23 | 24 | ## Getting started
|
24 | 25 |
|
25 |
| -1. Read through the [additional repo docs](https://github.com/protolambda/asterisc/tree/master/docs). |
| 26 | +Ready to dive in? Keep reading for a quick overview, or head over to the [Asterisc repo](https://github.com/ethereum-optimism/asterisc) for a complete walkthrough. |
| 27 | + |
| 28 | +1. Read through the [additional repo docs](https://github.com/ethereum-optimism/asterisc/docs). |
26 | 29 | 2. Use Foundry to compile the associated smart contracts.
|
27 |
| -3. Compile test binaries using the [`Makefile`](https://github.com/protolambda/asterisc/blob/master/tests/go-tests/Makefile). |
| 30 | +3. Compile test binaries using the [`Makefile`](https://github.com/ethereum-optimism/asteriscblob/master/tests/go-tests/Makefile). |
28 | 31 | 4. Execute `rvgo` tests to validate both on-chain and off-chain operations through RISC-V unit tests.
|
29 | 32 |
|
30 |
| -## Key components |
31 |
| - |
32 |
| -* **`rvgo`:** A Go-based RISC-V emulator with two operational modes: |
33 |
| - * **`Fast Mode`:** Executes one instruction per step on the VM state. |
34 |
| - * **`Slow Mode`:** Emulates one instruction per step using a VM state oracle. |
35 |
| -* **`rvsol`:** A Solidity/Yul implementation of the slow-mode step for EVM compatibility. |
36 |
| - |
37 |
| -### Yul in Solidity |
38 |
| - |
39 |
| -Yul is chosen for its simplicity and precision, offering direct mirroring with Go code while retaining critical features like underflow/overflow behavior and untyped operations. |
40 |
| - |
41 |
| -[See the repo](https://github.com/protolambda/asterisc/blob/master/README.md#why-use-yul-in-solidity) for a deeper dive on Yul and fast/slow modes. |
42 |
| - |
43 |
| -## Supported RISC-V subsets |
44 |
| - |
45 |
| -Here's a few key subsets. For the complete list, see the [repo](https://github.com/protolambda/asterisc?tab=readme-ov-file#risc-v-subset-support). |
46 |
| - |
47 |
| -* `RV32I`: Base 32-bit instruction set |
48 |
| -* `RV64I`: 64-bit instruction set |
49 |
| -* `RV32M` and `RV64M`: Multiplication |
50 |
| -* `RV32A` and `RV64A`: Atomics |
51 |
| -* Compact instructions for Rust: Work in progress |
52 |
| - |
53 |
| -Unsupported operations are implemented as no-ops, ensuring compatibility with the Go runtime. |
54 |
| - |
55 | 33 | ## FAQ
|
56 | 34 |
|
57 | 35 | The following section highlights specific advantages that Asterisc provides over other fault-proof systems.
|
58 | 36 |
|
59 |
| -### Benefits over Cannon |
60 |
| - |
61 |
| -[Cannon](https://github.com/ethereum-optimism/cannon/), originally developed by [`geohot`](https://github.com/geohot/) and now maintained by Optimism, offers similar functionality but has key differences: |
62 |
| - |
63 |
| -* Cannon operates on a 32-bit MIPS architecture, whereas Asterisc uses RISC-V. |
64 |
| -* Asterisc supports 64-bit operations and deterministic threading, making it more future-ready. |
65 |
| - |
66 | 37 | ### Benefits over Cartesi
|
67 | 38 |
|
68 | 39 | [Cartesi](https://github.com/cartesi/) provides RISC-V fraud-proofing for a full machine, including numerous additional features. However, this added complexity can introduce risks. Asterisc focuses on simplicity by running single-process executions with minimal system calls.
|
|
0 commit comments