Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Sonobe integration #14

Open
wants to merge 148 commits into
base: master
Choose a base branch
from
Open

[WIP] Sonobe integration #14

wants to merge 148 commits into from

Conversation

pmikolajczyk41
Copy link
Member

First step of the VIMz <-> Sonobe integration.

Changes

  1. CLI configuration: I've migrated the code from builder pattern into more concise derive-based definition.
  2. General Rust refactor: including fixing toolchain, rustfmt file, module reorganization.
  3. Circom input rework: since Sonobe expects that circom circuits work on specific names and a single input signal vector, I had to make renaming step_in -> ivc_input, step_out -> ivc_output and a small input rework (single signal input external_inputs that is later split into row_orig and row_tran)
  4. Currently Sonobe works only with pairing-friendy curve cycles, so I had to work over bn254+grumpkin instead of pasta curves.
  5. build_circuits.sh fails after first error.
  6. Cleaned Cargo.toml a bit.
  7. Makefile with useful shortcuts for supported operations.
  8. Few typos fixed.

Running

Prerequisite: run ./build_circuits.sh in the circuits directory.

Go to the nova directory and run:

make grayscale
# or
LIGHT_TEST=yes make grayscale

The first command will run full pipeline. The second one omits large part of the decider circuit and thus reduces significantly running time (decider parameters and proof generation times drop by orders of magnitude).

Current results

Currently, performance drops awfully. Running 5 iterations (make brightness) on AWS EC2 c6a.4xlarge (16 CPU, 32GB RAM) generates output:

Prepare private inputs: 959.651324ms
Prepare circuit: 432.823686ms
Nova preprocess: 3.766051025s
Nova init: 2.577248313s
Decider preprocess: 166.461459305s
Nova::prove_step 0: 3.603513129s
Nova::prove_step 1: 3.648399006s
Nova::prove_step 2: 4.217254158s
Nova::prove_step 3: 4.210277988s
Nova::prove_step 4: 4.223081125s
Generated decider proof: 160.870678994s

Using better machine (c6a.8xlarge, with doubled resources), generates output:

Prepare private inputs: 996.494671ms
Prepare circuit: 427.634026ms
Nova preprocess: 3.35350682s
Nova init: 2.520849573s
Decider preprocess: 141.116302512s
Nova::prove_step 0: 3.339145441s
Nova::prove_step 1: 3.414786912s
Nova::prove_step 2: 3.725095237s
Nova::prove_step 3: 3.707483027s
Nova::prove_step 4: 3.753000253s
Generated decider proof: 149.577160396s

Both runs require ~22GB of RAM (both for decider operations (params and proof) as well as for the folding steps).

Notes

Currently, only grayscale, blur and brightness transformation are supported.

@lovely-necromancer
Copy link
Member

Just pure beauty of quality work 😍
Thanks for all the effort @pmikolajczyk41

Note

The only reason that this isn't merged yet is the Artifacts evaluation process from PETS 2025 Conference.
The instructions on that artifact section of that paper are only compatible with the old version of VIMz.
But soon it should be over and we'll merge it (also for the sake of Soulforge)

  • We should also update the README in the sonobe_integration branch.
  • @lovely-necromancer should execute all the benchamrks in this branch.
  • @parizad1188 should execute all the benchamrks in this branch.

@lovely-necromancer lovely-necromancer added enhancement New feature or request dependencies Pull requests that update a dependency file awesome Impressive effort labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awesome Impressive effort dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants