Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Crates.io License Bindings Tests

Example Transaction Generation

This package provides a Rust executable to generate example transactions with aggregated and non-aggregated proofs that can be executed with the Anoma EVM Protocol Adapter or be used for testing purposes, e.g., in ./contracts/test/examples/transactions/.

Prerequisites

  1. Get an up-to-date version of Rust with

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Install RISC Zero rzup with

    curl -L https://risczero.com/install | sh
  3. Install the RISC Zero version 3.0.3 with

    rzup install cargo-risczero 3.0.3

Usage

Build

From the project root run

cargo build --release --package example-tx-generation

Generate an Example Transaction

The executable expects three input arguments:

  1. Whether to generate aggregate proofs or not.
  2. The number of actions to generate.
  3. The number of compliance units per action, each of which contains two resources.

Compliance units contain one ephemeral consumed resource and one created resource, both having a quantity of one and the trivial resource logic always returning true.

To generate an example transaction .bin file with, e.g., aggregated proofs and one action containing one compliance unit, run

./target/release/example-tx-generation true 1 1

from the project root.