Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 3.58 KB

README.md

File metadata and controls

71 lines (54 loc) · 3.58 KB

AluVM rust implementation

Build Tests Lints codecov

crates.io Docs unsafe forbidden Apache-2 licensed

Rust implementation of AluVM (arithmetic logic unit virtual machine).

AluVM is a pure functional register-based highly deterministic & exception-less instruction set architecture (ISA) and virtual machine (VM). The AluVM ISA can be extended by an environment running the virtual machine (runtime environment), providing ability to load data to the VM registers and support application-specific instructions (like SIMD).

The main purpose for ALuVM is to be used in distributed systems whether robustness, platform-independent determinism are more important than the speed of computation. The main area of AluVM applications (using appropriate ISA extensions) is blockchain environments, consensus-critical computations, edge computing, multiparty computing (including deterministic machine learning), client-side-validation, sandboxed computing and genetic algorithms.

For more details on AluVM, please check the specification, watch detailed presentation on YouTube or check slides from the presentation.

Design

The robustness lies at the very core of AluVM. It is designed to avoid any undefined behaviour. Specifically,

  • All registers may be in the undefined state;
  • Impossible/incorrect operations put destination register into a special undefined state;
  • Code always extended to 2^16 bytes with zeros, which corresponds to “set st0 register to false and stop execution” op-code;
  • There are no invalid jump operations;
  • There are no invalid instructions;
  • Cycles & jumps are counted with 2^16 limit (bounded-time execution);
  • No ambiguity: any two distinct byte strings always represent strictly distinct programs;
  • Code and embedded data signing;
  • Code commits to the used ISA extensions;
  • Libraries identified by their hashes;
  • Code does not run if not all libraries are present.

Comparison table

Instruction Set Architecture

Instruction set architecture

History

  • The need for AluVM recognized as a part of RGB project in Mar, the 24 & 31st, 2021 (see developers call https://youtu.be/JmKNyOMv68I)
  • Concept was presented on 19th of May 2021(check the recoding)
  • v0.1 release of Rust AluVM implementation on the 28th of May 2021 (ISA & API docs)
  • v0.2 release with multiple enhancements on the 9 Jun 2021 (ISA & API docs) – see presentation on YouTube or read slides
  • At the end of 2024 v0.12 became a complete re-write, abstracting most of the instructions into a ISA extensions. The remaining core of AluVM become zk-STARK and zk-STARK-compatible, so a dedicated ISA extensions can be used to create fully arithmetized applications.