| Crates.io | anoma-rm-risc0-test-app |
| lib.rs | anoma-rm-risc0-test-app |
| version | 1.0.0 |
| created_at | 2026-01-13 06:38:13.413193+00 |
| updated_at | 2026-01-13 06:38:13.413193+00 |
| description | An Anoma Resource Machine Test Application using RISC0 zkVM |
| homepage | |
| repository | https://github.com/anoma/arm-risc0 |
| max_upload_size | |
| id | 2039485 |
| size | 653,301 |
A test application for the Anoma Resource Machine implementation using RISC0 zkVM. This crate demonstrates transaction creation, validation, and proof generation with example resource logic.
The anoma-rm-risc0-test-app crate provides:
The TestLogic struct implements a minimal but complete resource logic circuit:
pub struct TestLogic {
witness: TestLogicWitness,
}
impl LogicProver for TestLogic {
// Implements proof generation and verification
}
create_an_action_with_multiple_compliancesCreates a single action with multiple compliance units:
create_multiple_actionsCreates multiple actions for stress testing and validation:
generate_test_transactionHigh-level utility for creating complete test transactions:
cuda: Enable CUDA acceleration for proof generationprove: Enable local proof generation (enabled by default)bonsai: Enable remote proof execution via BonsaiThe crate includes a comprehensive test suite:
test_logic_prover: Validates individual logic proof generationtest_action: Tests action creation with multiple compliance unitstest_transaction: Validates complete transaction flowtest_unmatched_logic_verifier_inputs_in_action: Ensures logic proof validation catches mismatchestest_nullifier_duplication_check: Verifies duplicate nullifier detectiontest_aggregation_works: Tests sequential and batch proof aggregation strategiestest_aggregation_works_groth16: Tests aggregation with Groth16 proofs (ignored by default)test_verify_aggregation_fails_for_incorrect_instances: Validates aggregation integrity checkstest_cannot_aggregate_invalid_proofs: Ensures invalid proofs cannot be aggregatedAdd to your Cargo.toml:
[dependencies]
anoma-rm-risc0-test-app = "1.0"
# Run all tests
cargo test
# Run tests in dev mode(This will not generate valid, secure proofs)
RISC0_DEV_MODE=1 cargo test
# Run specific test
cargo test test_aggregation_works
bonsai feature for remote proving on slower machinescuda feature for GPU accelerationLicensed under the Apache License 2.0. See LICENSE for details.