Skip to content

starknet_os_flow_tests,starknet_os,starknet_transaction_prover: test the single proof against the verifier - #15095

Open
einat-starkware wants to merge 1 commit into
claude/privacy-proof-os-verify-gsxf2h-5-verifier-taskfrom
claude/privacy-proof-os-verify-gsxf2h-6-combined-verify
Open

einat-starkware wants to merge 1 commit into
claude/privacy-proof-os-verify-gsxf2h-5-verifier-taskfrom
claude/privacy-proof-os-verify-gsxf2h-6-combined-verify

Conversation

@einat-starkware

@einat-starkware einat-starkware commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Part 7 (last) of the single-proof verification stack. Extracts the Cairo digest entry-point runner (starknet_os::test_utils::proof_fact_fold_runner) and the verifier-task fixtures (starknet_transaction_prover::verifier_task::test_utils) into shared test utilities, and adds the combined tests:

  • test_cairo_processed_proof_digest_matches_circuit_verifier_output: the Cairo0 processed-proof output digest over the fixture's proof facts, packed the way the OS output packs it, satisfies the real circuit verifier's output comparison.
  • test_os_emitted_output_feeds_verifier_task_comparison: a full OS run over one transaction carrying valid proof facts emits exactly the expected packed digest and count, and feeding the OS's emitted values into the verifier-task comparison cleanly rejects a verifier run over different proof facts as a digest mismatch. (A fully-matching OS-in-the-loop path needs a proof generated over OS-valid proof facts — the fixture carries the proving side's test-task hash, which the OS rejects.)

Stack: #15090 ← #15091 ← #15092 ← #15064 ← #15086 ← #15088 ← this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XmPJM3Wph4QLmFmhcxVsh4

@cursor

cursor Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only refactors and new integration coverage; no production verifier or OS execution path changes.

Overview
Refactors proof-fact verification test helpers into shared modules and adds end-to-end flow tests that tie Cairo digest logic, OS output, and the real circuit verifier together.

Shared utilities: Cairo0 entry-point helpers move from proof_fact_fold_test.rs into starknet_os::test_utils::proof_fact_fold_runner. Verifier gzip fixtures and run_one_leaf_verifier_task() move into starknet_transaction_prover::verifier_task::test_utils, gated by a new testing feature (optional flate2). starknet_os’s testing feature now pulls in apollo_starknet_os_program/test_programs; flow tests enable starknet_transaction_prover/testing.

New integration tests in proof_fact_verifier_test.rs:

  • test_cairo_processed_proof_digest_matches_circuit_verifier_output: Rust/Cairo processed-proof digest from fixture proof facts, packed like OS output, passes verify_circuit_verifier_task_output against a real one-leaf verifier run.
  • test_os_emitted_output_feeds_verifier_task_comparison: Full OS run with one proof-facts transaction checks n_proof_facts_transactions and packed processed_proof_output_* against expected digests; feeding those OS values into verifier comparison against the different fixture proof correctly yields VerificationDigestMismatch (documenting that a full match needs OS-aligned proof facts, not the proving-side fixture hash alone).

Reviewed by Cursor Bugbot for commit 52dd336. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 69d4399 to 5038791 Compare September 17, 2026 13:36
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 5038791 to a47dcf4 Compare September 22, 2026 09:22
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from a47dcf4 to 8de8660 Compare September 23, 2026 09:17
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 8de8660 to 3e16a65 Compare September 23, 2026 12:59
@einat-starkware einat-starkware changed the title starknet_os_flow_tests,starknet_os,starknet_transaction_prover: test the fold against the verifier starknet_os_flow_tests,starknet_os,starknet_transaction_prover: test the single proof against the verifier Sep 23, 2026
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 3e16a65 to 84066c8 Compare September 23, 2026 14:56
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 84066c8 to 9072cff Compare September 24, 2026 08:11
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 9072cff to b498496 Compare September 24, 2026 08:15
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from b498496 to 704010f Compare September 24, 2026 13:28
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 704010f to 9d67fe2 Compare September 24, 2026 17:20
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 9d67fe2 to 5d45202 Compare September 28, 2026 08:01
@einat-starkware
einat-starkware added this pull request to stack #15156 September 28, 2026 08:17
…the single proof against the verifier

Extracts the Cairo digest entry-point runner and the verifier-task
fixtures into shared test utilities, and adds the combined tests: the
Cairo0 processed-proof output digest over the fixture's proof facts
satisfies the real circuit verifier's output comparison, and a full OS
run over one transaction with valid proof facts emits exactly the
expected packed digest, whose comparison cleanly rejects a verifier run
over different proof facts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XmPJM3Wph4QLmFmhcxVsh4
@einat-starkware
einat-starkware force-pushed the claude/privacy-proof-os-verify-gsxf2h-6-combined-verify branch from 5d45202 to 52dd336 Compare September 28, 2026 10:51

This branch has not been deployed

No deployments
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