Skip to content

Change configs test#322

Open
anatgstarkware wants to merge 1 commit intomainfrom
anatg/fix_tests
Open

Change configs test#322
anatgstarkware wants to merge 1 commit intomainfrom
anatg/fix_tests

Conversation

@anatgstarkware
Copy link
Copy Markdown
Contributor

@anatgstarkware anatgstarkware commented Mar 16, 2026

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

This change is Reviewable

Copy link
Copy Markdown
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

@gilbens-starkware reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on anatgstarkware).


crates/privacy_circuit_verify/src/tests.rs line 86 at r1 (raw file):

            + CAIRO_PCS_CONFIG.fri_config.n_queries as u32
                * CAIRO_PCS_CONFIG.fri_config.log_blowup_factor
            >= 96_u32,

Consider moving this and the one above to const/variable

Code quote:

96_u32,

gilbens-starkware added a commit that referenced this pull request Mar 19, 2026
- Add zstd compression to `privacy_prove` and `privacy_recursive_prove` outputs.
- Decompress in `verify_cairo` and `verify_recursive_circuit`.
- Add `MAX_RECURSIVE_PROOF_UNCOMPRESSED_BYTES` limit on the recursive
  decompression path to prevent zip-bomb attacks.
- Extract `compress_proof` / `decompress_proof` helpers to keep prover
  and verifier functions symmetric.
- Add `RECURSIVE_PROOF_UNCOMPRESSED_BYTES` constant (346,380 bytes) and
  a slow test that validates it against a real proof.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gilbens-starkware added a commit that referenced this pull request Mar 19, 2026
* Compress proof output and add zip-bomb protection (#322)

- Add zstd compression to `privacy_prove` and `privacy_recursive_prove` outputs.
- Decompress in `verify_cairo` and `verify_recursive_circuit`.
- Add `MAX_RECURSIVE_PROOF_UNCOMPRESSED_BYTES` limit on the recursive
  decompression path to prevent zip-bomb attacks.
- Extract `compress_proof` / `decompress_proof` helpers to keep prover
  and verifier functions symmetric.
- Add `RECURSIVE_PROOF_UNCOMPRESSED_BYTES` constant (346,380 bytes) and
  a slow test that validates it against a real proof.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add zip-bomb protection to verify_cairo

- Add CAIRO_PROOF_UNCOMPRESSED_BYTES constant (621,432 bytes), validated
  by slow test check_max_cairo_proof_uncompressed_size.
- Unify RECURSIVE_PROOF_MAX_DECOMPRESSED_RATIO into PROOF_MAX_DECOMPRESSED_RATIO
  shared by both paths.
- Replace usize::MAX with MAX_CAIRO_PROOF_UNCOMPRESSED_BYTES in verify_cairo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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