title | lang | description |
---|---|---|
Asterisc |
en-US |
Learn about Asterisc |
Asterisc is an alternative fault-proof VM for the OP Stack, crafted to validate RISC-V program execution via an interactive fraud-proof mechanism. Asterisc bridges simplicity and functionality, delivering a minimalist yet powerful solution for optimistic rollup fraud-proofing. Leveraging the RISC-V architecture, it offers:
- Support for 64-bit operations
- Concurrent yet deterministic threading
- Compatibility with RISC-V's expanding ecosystem
Read more about fault-proofs in our Fault-proof explainer
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.
Ready to dive in? Keep reading or head over to the Asterisc repo.
- Read through the additional repo docs.
- Use Foundry to compile the associated smart contracts.
- Compile test binaries using the
Makefile
. - Execute
rvgo
tests to validate both on-chain and off-chain operations through RISC-V unit tests.
rvgo
: A Go-based RISC-V emulator with two operational modes:Fast Mode
: Executes one instruction per step on the VM state.Slow Mode
: Emulates one instruction per step using a VM state oracle.
rvsol
: A Solidity/Yul implementation of the slow-mode step for EVM compatibility.
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.
See the repo for a deeper dive on Yul and fast/slow modes.
Here's a few key subsets. For the complete list, see the repo.
RV32I
: Base 32-bit instruction setRV64I
: 64-bit instruction setRV32M
andRV64M
: MultiplicationRV32A
andRV64A
: Atomics- Compact instructions for Rust: Work in progress
Unsupported operations are implemented as no-ops, ensuring compatibility with the Go runtime.
The following section highlights specific advantages that Asterisc provides over other fault-proof systems.
Cannon, originally developed by geohot
and now maintained by Optimism, offers similar functionality but has key differences:
- Cannon operates on a 32-bit MIPS architecture, whereas Asterisc uses RISC-V.
- Asterisc supports 64-bit operations and deterministic threading, making it more future-ready.
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.
Arbitrum's WebAssembly-based fraud-proofing leverages a business-source license and transformation to WAVM, limiting its general usability. In contrast, Asterisc is open-source under the MIT license, offering broader applicability.
Asterisc is designed to run Go programs for fraud-proofing optimistic rollups. Contributions that align with its goals of simplicity, minimalism, and compatibility are highly encouraged.