Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

naive snark circuit and pow bits for compression wrapper #179

Open
wants to merge 1 commit into
base: v1.5.0
Choose a base branch
from

Conversation

saitima
Copy link
Member

@saitima saitima commented Aug 8, 2024

What ❔

Compression wrapper mode uses 8 bits

Why ❔

PoW bits reduces number of FRI queries so that smaller snark verification circuit size.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

@saitima saitima requested a review from shamatar August 8, 2024 20:02
@@ -422,19 +423,19 @@ impl ZkSyncCompressionForWrapperCircuit {
use crate::boojum::cs::traits::circuit::CircuitBuilder;
match &self {
Self::CompressionMode1Circuit(..) => {
<CompressionMode1Circuit as CircuitBuilder<GoldilocksField>>::geometry()
<CompressionMode1ForWrapperCircuit as CircuitBuilder<GoldilocksField>>::geometry()
Copy link
Member

Choose a reason for hiding this comment

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

This may break existing functionality, I do not remember the path of how current scheduler proof is wrapper (most likely 1 FRI based proof to switch to BN254 hasher, and then PLONK proof), so such code path may be used and will break.

In general, would be nice to have comment on what's a difference between compression and compression for wrapper, especially at initial steps, as only one step should swap hasher

Copy link
Member Author

Choose a reason for hiding this comment

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

In general, 'compression for wrapper' refers to using a BN-compatible hasher for both the transcript and the Merkle tree as it is the last step before EVM verification. Additionally, this is a circuit that verifies the proof of the previous ‘compression’ step. Therefore, it should return the geometry of 'CompressionMode1ForWrapperCircuit' for the constraint system, not 'CompressionMode1Circuit'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants