Skip to content

Verifier in Solidity#5

Open
jtcoolen wants to merge 5 commits into
mainfrom
solidity-verifier
Open

Verifier in Solidity#5
jtcoolen wants to merge 5 commits into
mainfrom
solidity-verifier

Conversation

@jtcoolen
Copy link
Copy Markdown

@jtcoolen jtcoolen commented May 18, 2026

Jira ticket: https://eyblockchain.atlassian.net/browse/GBRD-13?atlOrigin=eyJpIjoiNWEwMzA0YzBmYTQxNGM1ZmE5NmI1ODAzZWZkMzM4YzUiLCJwIjoiaiJ9

What this PR does

It introduces a Keccak transcript and instruments the verifier algorithm in Rust to record an execution trace with the values of intermediate variables.

It introduces a rust library solidity-verifier under the proofs crate that generates verifier contracts for a specific verifying key. The relevant documentation can be found in the Jira ticket and under proofs/solidity-verifier/docs, as well as in proofs/solidity-verifier/README.

How to test this PR

Append the --trace flag for the trace equivalence test.

IVC example:

proofs/solidity-verifier/scripts/run_ivc_bench.sh \
  --allow-unpinned-solc \
  --rust-toolchain stable

Generated contracts under proofs/solidity-verifier/target/ivc-keccak-solidity-dump/

Moonlight proof (ssumes the Moonlight checkout is available at ../Moonlight and is on branch codex/wrap-bench-cherry-picks).

proofs/solidity-verifier/scripts/run_team_demo.sh \
  --skip-trace \
  --allow-unpinned-solc \
  --rust-toolchain stable

Generated contracts under proofs/solidity-verifier/target/moonlight-wrap-solidity-dump/

PBT tests (located in proofs/solidity-verifier/src/test.rs):

POSEIDON_PBT_CASES=50 \
HALO2_SOLIDITY_RUN_EVM_TESTS=1 \
SRS_DIR="$PWD/zk_stdlib/examples/assets" \
cargo test -p halo2_solidity_verifier --release \
  --features evm,rust-verifier-trace \
  pbt_ -- --nocapture

Add a Keccak256 transcript hash implementation and update the challenge sampling path to use a single Keccak squeeze with big-endian scalar encoding.
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
Comment thread proofs/solidity-verifier/.github/workflows/ci.yml Fixed
@jtcoolen jtcoolen requested review from a team and Michael-EY May 18, 2026 06:14
@jtcoolen jtcoolen force-pushed the solidity-verifier branch 3 times, most recently from 3b29e2d to 35a5064 Compare May 18, 2026 08:07
@jtcoolen jtcoolen requested a review from jiajieey May 18, 2026 09:49
jtcoolen added 4 commits May 18, 2026 11:14
Switch the stdlib Poseidon example to the Keccak transcript path, add final-step IVC prove/verify coverage, and publish Solidity verifier fixtures for replay.
Separate verifier options for keeping instance and fold point sets so aggregation and circuit paths can tune verifier MSM length independently.
Expose native verifier trace points across PLONK, KZG, circuit accumulator checks, and transcript wiring so Solidity verifier replay can compare intermediate values.
Move the Solidity verifier generator into the Midfall workspace with codegen, templates, docs, fixtures, scripts, tests, and validated test-command documentation.
@jtcoolen jtcoolen force-pushed the solidity-verifier branch from 35a5064 to cf89e5f Compare May 18, 2026 11:05
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.

3 participants