Skip to content

feat: Add E2E zkVM proof tests with RISC Zero integration#11

Merged
Mehd1b merged 1 commit into
devfrom
feature/e2e-zkvm-proof-tests
Jan 24, 2026
Merged

feat: Add E2E zkVM proof tests with RISC Zero integration#11
Mehd1b merged 1 commit into
devfrom
feature/e2e-zkvm-proof-tests

Conversation

@Mehd1b

@Mehd1b Mehd1b commented Jan 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Add methods crate for building zkVM guest ELF and exporting ZKVM_GUEST_ELF / ZKVM_GUEST_ID
  • Add zkvm-guest wrapper crate for risc0-build compatibility
  • Add e2e-tests crate with feature-gated proof generation tests
  • Add agent code hash binding (build.rs generates AGENT_CODE_HASH at compile time)
  • Add spec/e2e-tests.md specification document
  • Update README with E2E testing and on-chain verification sections

Test Cases

Test Description
test_e2e_success_with_echo Happy path with Groth16 proof generation
test_e2e_agent_code_hash_mismatch Security - wrong hash aborts execution
test_e2e_empty_output Empty output commitment verification
test_e2e_determinism Same input produces identical journals

On-Chain Verification Data

Extracts data needed for Solidity verifier:

  • seal (256 bytes Groth16 proof)
  • journal (KernelJournalV1 bytes)
  • imageId (bytes32 guest identity)

Test Plan

  • cargo test -p e2e-tests passes (unit tests, no RISC Zero required)
  • cargo test -p host-tests passes (92 tests, no regressions)
  • cargo test -p e2e-tests --features risc0-e2e test_e2e_success_with_echo generates valid proof
  • cargo test -p e2e-tests --features risc0-e2e test_e2e_agent_code_hash_mismatch correctly fails
  • cargo test -p e2e-tests --features risc0-e2e test_e2e_empty_output generates valid proof

- Add methods crate for building zkVM guest ELF and exporting IMAGE_ID
- Add zkvm-guest wrapper crate for risc0-build compatibility
- Add e2e-tests crate with feature-gated proof generation tests
- Add agent code hash binding (build.rs generates AGENT_CODE_HASH)
- Add spec/e2e-tests.md specification document
- Update README with E2E testing and on-chain verification sections

Test cases:
- test_e2e_success_with_echo: Happy path with proof generation
- test_e2e_agent_code_hash_mismatch: Security validation
- test_e2e_empty_output: Empty output commitment verification
- test_e2e_determinism: Deterministic execution verification

On-chain data extraction:
- seal (256 bytes Groth16 proof)
- journal (KernelJournalV1 bytes)
- imageId (bytes32 guest identity)
@Mehd1b
Mehd1b merged commit 1d3dcde into dev Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant