Skip to content

fix(verifier-ray): bench-compress - #3791

Closed
Tabaie wants to merge 2 commits into
mainfrom
verifier-ray/fix/bench-compress
Closed

fix(verifier-ray): bench-compress#3791
Tabaie wants to merge 2 commits into
mainfrom
verifier-ray/fix/bench-compress

Conversation

@Tabaie

@Tabaie Tabaie commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

bench_compress has not compiled since #3455 added an r5_config import to poseidon2.zig, and its runner reported "no cycles recorded" because zkc gates printf output — which carries both the clock cycle: trace and the guest's VERIFIER-MARK writes — behind -vvv.

Fixes both, and forwards -Ddisable-accelerators through run.go -accel, which makes the accelerated Poseidon2 path measurable for the first time: 141.40 cycles/call against 8674.20 for software.

Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
@Tabaie
Tabaie requested review from YaoJGalteland and arijitdutta67 and a lite review from Copilot and removed request for Copilot August 13, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR restores the verifier-ray/bench/bench_compress micro-benchmark by updating its Zig build wiring to match the post-#3455 r5_config requirements, and by ensuring zkc emits the trace output that the Go runner parses. It also adds a runner flag to benchmark the accelerated Poseidon2 path (custom RISC-V opcode) vs the software implementation.

Changes:

  • Add -accel to the Go runner and forward the corresponding Zig build option to enable/disable accelerators.
  • Update the benchmark’s build.zig to supply r5_config (and conditionally import lineth_accelerators) so it compiles after the Poseidon2 acceleration changes.
  • Ensure zkc exec is invoked with -vvv so the runner can observe clock cycle: trace lines and VERIFIER-MARK outputs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
verifier-ray/bench/bench_compress/run.go Adds -accel, forwards -Ddisable-accelerators=false when requested, and enables zkc printf output via -vvv so cycle/marker parsing works.
verifier-ray/bench/bench_compress/build.zig Introduces the disable-accelerators option (defaulting to software), supplies r5_config, and conditionally imports lineth_accelerators to match Poseidon2’s new compile-time config expectations.
verifier-ray/bench/bench_compress/bench/bench-compress.csv Updates the recorded baseline cycle measurement for Poseidon2 compression.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Tabaie Tabaie closed this Aug 25, 2026
@Tabaie
Tabaie deleted the verifier-ray/fix/bench-compress branch August 25, 2026 15:58
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.

2 participants