Description:
Create a gas benchmark suite to measure verification costs across proof types. Identify optimization opportunities (e.g., batch pairing, precomputed tables). Document expected gas costs for each operation.
Acceptance Criteria:
benches/gas_bench.rs using soroban-sdk bench utilities.
Benchmarks for: single proof verification, batch of 5 proofs, Poseidon hash (2/4/8 inputs).
Reports: instructions, memory, and storage fees.
Optimizations applied: reuse pairing check results, minimize Bytes copying.
Documentation: GAS_COSTS.md with estimated lumen costs per operation.
Benchmark runs nightly and fails if gas exceeds pre-defined thresholds (e.g., >5M ops for single proof).
Description:
Create a gas benchmark suite to measure verification costs across proof types. Identify optimization opportunities (e.g., batch pairing, precomputed tables). Document expected gas costs for each operation.
Acceptance Criteria:
benches/gas_bench.rs using soroban-sdk bench utilities.
Benchmarks for: single proof verification, batch of 5 proofs, Poseidon hash (2/4/8 inputs).
Reports: instructions, memory, and storage fees.
Optimizations applied: reuse pairing check results, minimize Bytes copying.
Documentation: GAS_COSTS.md with estimated lumen costs per operation.
Benchmark runs nightly and fails if gas exceeds pre-defined thresholds (e.g., >5M ops for single proof).