Skip to content

Conversation

@Bisht13
Copy link
Collaborator

@Bisht13 Bisht13 commented Sep 1, 2025

feat: Add ProveKit Verifier Server

Overview

HTTP server that combines Rust (API) + Go (verifier binary) for WHIR-based proof verification.

Architecture

  • Rust HTTP Server: Handles requests, downloads artifacts, orchestrates verification
  • Go Verifier Binary: Performs WHIR proof verification using gnark

Key Features

  • RESTful API: GET /health, POST /verify
  • Artifact Caching: Downloads cached by URL hash
  • Docker Support: Multi-stage build, docker-compose ready
  • Config Management: Environment variables for deployment
  • Service Architecture: Modular artifact/verification services
  • Structured Logging: Comprehensive tracing and monitoring

API

# Health check
curl http://localhost:3000/health

# Verify proof
curl -X POST http://localhost:3000/verify \
  -H "Content-Type: application/json" \
  -d '{"npsUrl": "...", "r1csUrl": "...", "pkUrl": "...", "vkUrl": "...", "np": {...}}'

Deployment

# Docker (recommended)
cd tooling/verifier-server
docker-compose up --build

# Local development
cargo run --bin verifier-server

Environment Variables

  • VERIFIER_HOST, VERIFIER_PORT - Server binding
  • VERIFIER_BINARY_PATH - Go verifier path
  • VERIFIER_ARTIFACTS_DIR - Cache directory
  • VERIFIER_REQUEST_TIMEOUT - Request timeout

Dependencies

Added: chrono, reqwest, sha2, tokio, tower, tower-http

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 1, 2025

CodSpeed WallTime Performance Report

Merging #173 will not alter performance

Comparing px/verifier-server (fd0a512) with main (9a1f428)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 35 untouched

Copy link
Collaborator

@piohei piohei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to clear cache from time to time. :) It could be control by standard HTTP headers link.

Copy link
Collaborator

@ashpect ashpect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ashpect ashpect merged commit 4790201 into main Sep 22, 2025
5 checks passed
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.

4 participants