File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Prover Service
2+
3+ gRPC service for generating SP1 Groth16 proofs for Ethereum light client updates and Hyperlane merkle roots.
4+
5+ ## Environment Variables
6+
7+ Set the env variables in an .env file like the example provided.
8+
9+ | Variable | Required | Default | Description |
10+ | ----------------------- | -------- | ------- | --------------------------------------------------- |
11+ | ` ETH_BEACON_RPC ` | Yes | - | Ethereum Beacon Chain RPC endpoint |
12+ | ` ETH_EXECUTION_RPC ` | Yes | - | Ethereum Execution Layer RPC endpoint |
13+ | ` NETWORK_PRIVATE_KEY ` | Yes | - | Private key for SP1 network prover authentication |
14+ | ` LIGHT_CLIENT_CONTRACT ` | Yes | - | Address of the light client contract |
15+ | ` API_KEY ` | Yes | - | API key for authenticating requests to this service |
16+ | ` CHAIN_ID ` | No | ` 1 ` | Chain ID (1 for Mainnet, 11155111 for Sepolia) |
17+ | ` PORT ` | No | ` 50051 ` | gRPC server port |
18+
19+ ## Running the Service
20+
21+ The service can be run either natively with Cargo or via Docker.
22+
23+ ### Native
24+
25+ ``` bash
26+ cargo run --release
27+ ```
28+
29+ ### Docker
30+
31+ Build from project root:
32+
33+ ``` bash
34+ docker build -t prover-service .
35+ ```
36+
37+ Run with environment variables in a ` .env ` file:
38+
39+ ``` bash
40+ docker run --rm -p 50051:50051 --env-file .env --name prover prover-service
41+ ```
42+
43+ ## Testing
44+
45+ ``` bash
46+ grpcurl -plaintext \
47+ -proto ./proto/prover.proto \
48+ -H " x-api-key: $API_KEY " \
49+ localhost:50051 proto.Prover/EthereumHyperlaneRoot
50+ ```
You can’t perform that action at this time.
0 commit comments