Implement a Cairo VM for Cairo (i.e. not Cairo Zero), including Starknet contracts in TypeScript
Educational purpose, emphasis on readability and being idiomatic rather than performance
Improve current documentation on Cairo VM in general
While performing the different steps of the project, writing documentation on the different concepts of the VM is a must, to better understand them ourselves, and for the Cairo ecosystem
Step 1: Technical Research
As we aim to provide a pedagogic Cairo 1 VM, the project architecture could differ from the current ones, based off the rust version
Analyze the existing Cairo VMs and their state (Rust in prod, Go & Zig in dev)
Analyze current state of the Cairo VM in TS (what can be kept, needs refactoring, dropped)
How benchmark are done ?
Step 2: Architecture
Propose a detailed architecture to implement the Cairo VM, with a focus on readability
Design a benchmark process
Step 3: Cairo VM Implementation
Memory model
Cairo hints
Hint processor
Cairo builtins
Builtin processor
Cairo runner - Currently blocked by not having a serialized CASM output from cairo compiler; NetherMind is working on it, on Scarb
Proof Mode
Tracing, comparison of traces between Cairo VM implementations
...
This document is still WIP and subject to change
Goals:
While performing the different steps of the project, writing documentation on the different concepts of the VM is a must, to better understand them ourselves, and for the Cairo ecosystem
Step 1: Technical Research As we aim to provide a pedagogic Cairo 1 VM, the project architecture could differ from the current ones, based off the rust version
Step 2: Architecture
Step 3: Cairo VM Implementation
Memory model
Cairo hints
Hint processor
Cairo builtins
Builtin processor
Cairo runner - Currently blocked by not having a serialized CASM output from cairo compiler; NetherMind is working on it, on Scarb
Proof Mode
Tracing, comparison of traces between Cairo VM implementations ...
Add unit, integration and fuzzing tests
Add benchmark
Step 4: StarkNet Contracts implementation