Skip to content

anoma/arm-risc0-examples

Repository files navigation

arm-risc0-examples

Arm-Risc0 application examples

arm-risc0-examples Directory Structure

  • example_circuits/: Demonstration circuits for applications:

    • counter: The simple counter logic circuit
    • kudo circuits(kudo_main, simple_kudo_denomination, simple_kudo_receive): kudo application circuits
  • examples/: Demonstration application examples:

    • simple_counter_application: A simple counter increment example, more detailed descriptions can be found here
    • kudo_application: A relatively complex example; more detailed descriptions can be found here

Build and Test

  • Compile examples
cargo build
  • Run examples tests
# run tests in dev-mode: no real proofs are generated
RISC0_DEV_MODE=1 cargo test

# run tests in release mode: default succinct(stark) proofs are generated
cargo test --release
  • Run examples

For example, run the simple counter example:

# Run the counter initialization test
cargo test test_create_init_counter_tx

# Run the counter increment test
cargo test test_create_increment_tx

Generate proving and verifying keys (ELF and ImageID) reproducibly for releasing

cargo risczero build --manifest-path example_circuits/simple_counter/methods/guest/Cargo.toml

cargo risczero build --manifest-path example_circuits/kudo_main/methods/guest/Cargo.toml

cargo risczero build --manifest-path example_circuits/simple_kudo_denomination/methods/guest/Cargo.toml

cargo risczero build --manifest-path example_circuits/simple_kudo_receive/methods/guest/Cargo.toml

About

Arm-Risc0 application examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages