A Rust CLI application that converts Succinct SP1 proof requests to zkVerify-compatible format and optionally submits them to the zkVerify network.
Rusty Router takes a Succinct proof request ID, downloads its proof artifact, converts it into the zkVerify-compatible format, saves the result to a JSON file, and optionally submits the proof to the zkVerify network for verification.
- Fetch proof request metadata from Succinct explorer API
- Download proof artifacts from AWS S3
- Convert SP1 proofs to zkVerify format (placeholder implementation)
- Save converted proofs in JSON format with hex encoding
- Submit proofs to zkVerify network using Substrate/Polkadot blockchain
- Command-line interface with configurable output paths and network options
- Rust (latest stable version or nightly)
- Cargo
- Access to zkVerify network (for submission feature)
- Clone the repository:
git clone <repository-url>
cd rusty_router- Build the project:
cargo +nightly build --releasecargo run -- --request-id <PROOF_REQUEST_ID> --output proof.json# Convert proof and send as system.remark transaction
cargo run -- \
--request-id <PROOF_REQUEST_ID> \
--output proof.json \
--send-remark
# Send existing proof file as system.remark (no conversion needed)
cargo run -- \
--output proof.json \
--send-remark# Convert proof and submit to zkVerify network
cargo run -- \
--request-id <PROOF_REQUEST_ID> \
--output proof.json \
--get-and-submit
# Submit existing proof file to zkVerify network (no conversion needed)
cargo run -- \
--output proof.json \
--get-and-submit--request-id(optional): The Succinct proof request ID (required for conversion, optional for sending existing proof)--output(optional): Path where to save the JSON file (default:proof.json)--api-base(optional): Override Succinct explorer base URL (default:https://explorer.succinct.xyz)--verbose(optional): Enable verbose structured logs--ws-url(optional): WebSocket URL of the Substrate node (default:wss://zkverify-volta-rpc.zkverify.io)--send-remark(optional): Send the proof as a system.remark transaction--get-and-submit(optional): Get proof from external source and submit to zkVerify network
cargo run -- --request-id 0xf53938b95d7f0c7ec46ac63388d6ddc1b363af86bb0e3bb5f4589b7352c0f942 --output my_proof.json --verbose# Using mnemonic from .env file
cargo run -- --request-id 0xf53938b95d7f0c7ec46ac63388d6ddc1b363af86bb0e3bb5f4589b7352c0f942 --send-remark
# Send existing proof file (no conversion needed)
cargo run -- --output proof.json --send-remark# Using mnemonic from .env file
cargo run -- --request-id 0xf53938b95d7f0c7ec46ac63388d6ddc1b363af86bb0e3bb5f4589b7352c0f942 --get-and-submit
# Submit existing proof file (no conversion needed)
cargo run -- --output proof.json --get-and-submitThe application generates a JSON file with the following structure:
{
"proof": "0x...",
"pub_inputs": "0x...",
"vk": "0x..."
}Where:
proof: The converted proof in hex format with 0x prefixpub_inputs: The public inputs in hex format with 0x prefixvk: The verification key in hex format with 0x prefix
Create a .env file in the project root with your mnemonic phrase:
# .env file
ZKV_MNEMONIC="your twelve word mnemonic phrase here"The application will automatically load this mnemonic when using blockchain features.
The application includes integration with the zkVerify Volta network using the subxt crate for Substrate/Polkadot blockchain interaction.
- Network: zkVerify Volta Network
- WebSocket URL:
wss://zkverify-volta-rpc.zkverify.io - Transaction Types:
system.remark(sends proof data as remark)Settlementsp1pallet.submit_proof(submits proof to zkVerify network)
- Explorer: zkVerify Volta Subscan
The application requires a mnemonic phrase for signing transactions. Set it in your .env file:
# Create a .env file
echo 'ZKV_MNEMONIC="your twelve word mnemonic phrase here"' > .env- ✅ Basic Integration: Connection to zkVerify Volta network
- ✅ System Remark Transactions: Sends proof data as system.remark transactions
- ✅ zkVerify Proof Submission: Submits proofs to
Settlementsp1pallet.submit_proof - ✅ CLI Interface: Command-line options for submission
- ✅ Environment Support: Mnemonic loading from .env files
- ✅ Transaction Signing: Proper transaction signing with sr25519 keypairs
- ✅ Proof File Handling: Reads and sends existing proof files
- ✅ JSON Parsing: Extracts proof and public inputs from JSON format
-
Generate zkVerify Pallet Types:
subxt codegen --url https://zkverify-volta-rpc.zkverify.io --output src/zkv_types.rs
-
Implement Actual Transaction Submission:
- Replace placeholder with actual
Settlementsp1pallet.submit_proofcalls - Handle transaction signing and submission
- Implement proper error handling
- Replace placeholder with actual
-
Add Event Monitoring:
- Monitor
Settlementsp1palletevents - Verify proof acceptance/rejection
- Handle verification status updates
- Monitor
src/
├── main.rs # CLI entrypoint
├── client.rs # HTTP client for fetching metadata and artifacts
├── converter.rs # Proof conversion logic
├── substrate.rs # Substrate blockchain integration
└── lib.rs # Module declarations
reqwest: HTTP client for API requests and downloadsserde/serde_json: JSON serialization/deserializationbincode: Binary serializationclap: CLI argument parsingtokio: Async runtimeanyhow: Error handlinghex: Hex encoding/decodingregex: Pattern matching for HTML parsingtempfile: Temporary file handlingsubxt: Substrate/Polkadot blockchain interactioncodec: SCALE codec for blockchain data encoding
✅ Working Features:
- CLI interface with proper argument parsing
- HTTP client for API requests
- HTML parsing for metadata extraction
- Demo mode for testing
- JSON output generation
- Error handling and logging
- Temporary file handling for artifacts
- zkVerify network connection
- Proof encoding for blockchain submission
🔄 Next Steps (To Complete Full Functionality):
-
Implement Real Proof Conversion (behind
real-conversionfeature):- Deserialize SP1 artifact and call
ProverClient::from_env() - Use zkVerify's
convert_proof_to_zkv(...) - Extract public inputs and encode to hex
- Deserialize SP1 artifact and call
-
Complete zkVerify Integration:
- Generate zkVerify pallet types
- Implement actual transaction submission
- Add comprehensive event monitoring
-
API Integration (optional if not using demo):
- Use
--api-baseto point to the correct explorer - Replace demo artifact with real S3 artifact
- Use
The application includes a demo mode for testing the conversion pipeline without requiring real proof requests.
The application provides clear error messages for common failure scenarios:
- Invalid request ID
- Network connectivity issues
- Invalid proof artifacts
- File system errors
- zkVerify network connection issues
- Invalid private keys
To run in development mode:
cargo +nightly run -- --request-id <PROOF_REQUEST_ID>To run tests:
cargo +nightly test[Add your license information here]