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
Install Nexus zkVM:
cargo install nexus-zkvm
Configure zkVM environment:
nexus config init
Architecture
The zkVM integration consists of three main components:
ZkVMExecutor: Manages test execution in the zkVM environment
Proof Generation: Creates cryptographic proofs of test completion
Result Verification: Validates proofs on-chain
Usage Example
import { GlitchSDK, TestType } from '@glitch-gremlin/sdk';
const sdk = new GlitchSDK({
cluster: 'devnet',
wallet: yourWallet,
useZkVM: true // Enable zkVM execution
});
const request = await sdk.createChaosRequest({
targetProgram: "Your program ID",
testType: TestType.EXPLOIT,
duration: 300,
intensity: 7,
params: {
zkvm: {
proofType: 'full', // or 'light' for faster verification
confidential: true // Hide test parameters
}
}
});
// Results will include a cryptographic proof
const results = await request.waitForCompletion();
console.log('Proof:', results.proof);
Security Considerations
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
Data Privacy
Test parameters are encrypted in the zkVM
Results contain only the proof and basic metrics
Full logs available only to test requestor
Resource Limits
Maximum test duration: 1 hour
Maximum program size: 10MB
Memory limit: 4GB per test
Best Practices
Start with shorter tests while learning zkVM integration
Monitor resource usage - zkVM execution is more intensive
Keep test programs minimal - include only necessary logic
Store proof verification keys securely
Implement proper error handling for proof verification
Troubleshooting
Common issues and solutions:
Proof Generation Fails
Error: Failed to generate proof
Check zkVM installation
Verify program size limits
Monitor system resources
Verification Timeout
Error: Proof verification timeout
Increase timeout settings
Try 'light' proof type
Reduce test complexity
Memory Errors
Error: Out of memory
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