zkVM Integration

Overview

The Glitch Gremlin AI platform integrates with Nexus zkVM to provide enhanced privacy and security for chaos testing. This integration allows tests to run in a zero-knowledge environment, generating cryptographic proofs of test execution without revealing sensitive details.

Features

  • Isolated test execution in zkVM environment

  • Cryptographic proofs of test completion

  • Enhanced privacy for test parameters and results

  • Compatible with all existing test types

Configuration

Enable zkVM execution by setting the environment variable:

export USE_ZKVM=true

Prerequisites

  1. Install Nexus zkVM:

cargo install nexus-zkvm
  1. Configure zkVM environment:

nexus config init

Architecture

The zkVM integration consists of three main components:

  1. ZkVMExecutor: Manages test execution in the zkVM environment

  2. Proof Generation: Creates cryptographic proofs of test completion

  3. Result Verification: Validates proofs on-chain

Usage Example

Security Considerations

  1. Proof Verification

    • All proofs are verified on-chain before finalizing results

    • Invalid proofs result in test failure

    • Proof verification adds ~2-5 seconds to completion time

  2. Data Privacy

    • Test parameters are encrypted in the zkVM

    • Results contain only the proof and basic metrics

    • Full logs available only to test requestor

  3. Resource Limits

    • Maximum test duration: 1 hour

    • Maximum program size: 10MB

    • Memory limit: 4GB per test

Best Practices

  1. Start with shorter tests while learning zkVM integration

  2. Monitor resource usage - zkVM execution is more intensive

  3. Keep test programs minimal - include only necessary logic

  4. Store proof verification keys securely

  5. Implement proper error handling for proof verification

Troubleshooting

Common issues and solutions:

  1. Proof Generation Fails

    • Check zkVM installation

    • Verify program size limits

    • Monitor system resources

  2. Verification Timeout

    • Increase timeout settings

    • Try 'light' proof type

    • Reduce test complexity

  3. Memory Errors

    • Reduce test duration

    • Decrease parallel operations

    • Monitor zkVM memory usage

Next Steps

  • Review Test Types for zkVM compatibility

  • Learn about Proof Types

  • Explore Advanced Configuration

Last updated