Benchmark
Performance · measured numbers, and an honest read of what they mean.
Spectre proves an update in seconds on commodity hardware, where IBC Eureka's SP1 prover takes minutes (~100x slower) on a specialized GPU cluster
Circuit constraints
Measured R1CS constraint counts of the BatchCircuit, generated by TestConstraintBreakdown (relayer/prover/constraint_count_test.go). Methodology: the full circuit is compiled at each bucket size N, then each of the 5 sub-circuits is compiled in isolation and reported as a fraction of the full total.
| Component | N = 1 | N = 2 | N = 4 | N = 8 | N = 16 | N = 32 |
|---|---|---|---|---|---|---|
| SHA-512 (H_RAM, per slot) | 178,402 | 223,411 | 313,421 | 493,451 | 853,501 | 1,573,610 |
| ECIP verify (2N points) | 197,638 | 204,572 | 218,440 | 246,510 | 302,646 | 414,596 |
| SHA-256 witness hash | 143,141 | 143,908 | 149,916 | 161,926 | 190,615 | 238,661 |
| Fiat-Shamir challenges | 9,858 | 18,794 | 35,935 | 70,780 | 139,814 | 278,204 |
| Prefix binding | 246 | 491 | 981 | 1,961 | 3,921 | 7,841 |
| Total | 484,462 | 548,146 | 679,517 | 943,213 | 1,469,587 | 2,507,617 |
Two things to read off the table:
- Batching scales cleanly — each additional slot costs a stable ~65K constraints (63,684–65,924 across the whole range).
- SHA-512 is the dominant cost at production bucket sizes (N ≥ 16): 58–63 % of all constraints. ECIP scales sub-linearly — a large fixed overhead (~198K at N = 1) but barely growing after, its share falling from 41 % at N = 1 to 17 % at N = 32.
Per-component cost
Cost of each additional slot, measured N = 16 → 32; the remaining ~1K/slot (1.5 %) is uncategorized overhead.
| Component | What it does | Cost per extra slot |
|---|---|---|
| SHA-512 (H_RAM) | Per-slot SHA-512(R ∥ A ∥ msg[0:msgLen]) with FixedLengthSum, computing the Ed25519 H_RAM scalar. Includes point compression (Edwards Y + sign of X → 32 bytes). | 45,007 (69.4 %) — linear, most of what each extra slot costs |
| Fiat-Shamir challenges | Transcript-based derivation of the N per-slot random challenges: MarshalG1(R, A) + ToBinary(msg bytes) bound to a recursion.Transcript, then N × ComputeChallenge + FromBits + Reduce. | 8,649 (13.3 %) — linear, driven by ToBinary over all MaxMsgLen=192 message bytes |
| ECIP verify | Elliptic Curve Inner Product argument verifying Σ zᵢ·[Sᵢ]·(−G) + Σ zᵢ·Hᵢ·Aᵢ + Σ zᵢ·Rᵢ = 0 over 2N Weierstrass points: hint-based polynomial evaluation, Fiat-Shamir for A₀, ScalarMul, and per-point EvalPointChallengeSigned. | 6,997 (10.8 %) — sub-linear thanks to degree-based ECIP |
| SHA-256 witness hash | Single SHA-256(PrefixHead ∥ roundPresent ∥ BlockHash ∥ per-slot(active ∥ A)) producing the 2-element public commitment. Includes compressEdwardsToLE per pubkey (emulated ToBits). | 3,003 (4.6 %) — mostly fixed; only the hash buffer grows, 33 B/slot |
| Prefix binding | Select + AssertIsEqual checking each active slot's Type|Height and BlockHash against the committed values, with per-slot varint-width detection (ToBinary on byte 0). | 245 (0.4 %) — negligible |
Reproduce:
cd relayer
LD_LIBRARY_PATH=../../ecip-gnark go test -v -run TestConstraintBreakdown -timeout 1200s ./prover/Proof generation
Wall-clock to generate one Groth16 proof for an N-signer quorum batch, on the same circuit across three hardware setups. 10 samples per bucket; the figure is the mean (Go benchmark ns/op), run-to-run variation ±2–7%. Witness build and local verify are sub-20 ms at every bucket, so these are effectively groth16.Prove.
| Bucket (N signers) | CPU only ¹ | CPU + GPU ² | AWS g6e.2xlarge ³ |
|---|---|---|---|
| 4 | 1.30 s | 0.91 s | 0.45 s |
| 8 | 1.76 s | 1.18 s | 0.79 s |
| 16 | 3.04 s | 2.22 s | 1.50 s |
| 32 | 5.63 s | 4.55 s | 3.00 s |
| 64 | 11.50 s | 9.55 s | 6.36 s |
| 128 | 22.36 s | 18.90 s | 15.00 s |
¹ CPU only — Intel Core i7-13700K, native gnark (no GPU). ² CPU + GPU — Intel Core i7-13700K + NVIDIA RTX 4080, ICICLE/CUDA backend. ³ AWS g6e.2xlarge (NVIDIA L40S), ICICLE/CUDA backend.
All three rows are the same circuit version, so this is a clean hardware comparison — and the point it makes is the important one:
A commodity machine is enough. Where IBC Eureka's SP1 prover needs a GPU cluster and minutes per update, Spectre proves a real-world quorum batch (bucket-16) in ~3 s on a plain desktop CPU — no GPU, no special hardware. A single consumer gaming GPU (RTX 4080) takes it to ~2.2 s. Anyone can run a Spectre relayer + prover on hardware they already own.
- CPU-only is already practical — a desktop i7 proves bucket-16 in ~3.0 s and even a full 128-signer batch in ~22 s, with no GPU at all.
- A consumer GPU (RTX 4080) cuts ~25–30% off that — an off-the-shelf gaming card, not datacenter kit.
- A datacenter GPU (L40S on AWS g6e) is the fastest — ~2× the CPU (bucket-16: 1.50 s vs 3.04 s) — but it's purely optional headroom for operators who want the lowest latency. The protocol requires none of it.
On-chain cost
updateApplicationState gas on Ethereum at the production bucket (16 signers) — measured prod, real Groth16 verify included: 617k gas.
The first recvPacket to a fresh client costs ~941k gas (one-time cold-storage init), then each subsequent packet drops to ~324k gas (warm storage), trending lower across a batch — steady-state delivery is ~⅓ the cold first-hit.