Menu

1 / 2

How We Made STARK Verification 294x Faster

DEV Community·H33.ai·6 months ago
#lORXCXrl
Reading 0:00
15s threshold

STARK verification takes 25 microseconds per proof. That sounds fast until you are verifying 100,000 proofs per second.

We got it to 85 nanoseconds. 294x. Here is how.

The Problem

STARK verification is O(log^2(n)). The four steps:

FRI layer checks — 9.2us

Constraint evaluation — 7.8us

Merkle path verification — 5.1us

OOD consistency check — 2.9us

Total: 25 microseconds. Repeated on every request.

The Fix

Verify once. Cache the result with a computation fingerprint:

SHA3-256(proof_bytes || verification_key || constraints || domain_params)

Enter fullscreen mode

Exit fullscreen mode

The cached result is served in 85 nanoseconds. Not faster math.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.