Maru
  • Introduction
  • Volume use cases
  • Architecture overview
  • Maru Roadmap
  • ZK IMPLEMENTATION
    • Schema
      • Sum proof
      • Search proof
      • Data proof
      • Keccak proof
      • KeccakSponge proof
      • Logic proof
      • Arithmetic proof
    • Plonky2 verifier in Circom
  • user guide
    • Maru Demo FAQ
      • Why event proofs?
      • Why starky?
    • Deployed contracts
  • Maru ZKVM
    • Computer architecture
    • Memory model
    • Instruction set architecture
      • Instructions Execution
      • Instruction set
      • Instruction encoding
    • High-level frontend
    • Domain Specific Language
      • Unary map
      • Zip and binary map
      • Filter for all ETH-USDC swap prices on Uniswap
      • Calculate a 24-hour block-by-block moving average of the ETH-USDC pair on Uniswap
      • Compiler optimizations
Powered by GitBook
On this page
  1. Maru ZKVM

Computer architecture

PreviousDeployed contractsNextMemory model

Last updated 1 year ago

While for virtual processors the question of architecture is not as paramount as for physical one, and many just go with Von Neumann as a default choice, we have a few considerations here.

While polymorphic code can be very helpful for some tasks and programming styles, for our particular domain it’s advantages are hardly applicable. Treating code and data differently helps us greatly with proving and generally reduces complexity of our system. Additionally, switching from Harvard architecture to Von Neuman is possible in principle if we would need it, but switching in another direction is far more difficult. So we decided to start with Harvard Architecture.

On the other hand, separation between code and data still calls for different treatment. By default we have two sections allocated by assembler by default:

  • .text - contains program bytecode and is read-only

  • .data - contains program write-once data. We don’t need a dedicated segment for constants, as every written value can not be changed and initial values can be populated using %init directive.

General operations structure