Fix: Update noir-r1cs with Skyscraper v2#142
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase to align with Skyscraper v2 by moving core components into a centralized skyscraper/ directory structure and updating noir-r1cs to be compatible with the new version. The refactoring maintains behavioral compatibility while improving code organization.
- Moves
block_multiplier,block_multiplier_codegen,fp_rounding, andhlaintoskyscraper/subdirectory - Migrates existing
/skyscraperto/skyscraper/corefor better organization - Updates
noir-r1cs/skyscraperimplementation to use Skyscraper v2 APIs
Reviewed Changes
Copilot reviewed 23 out of 88 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| noir-r1cs/src/skyscraper/whir.rs | Updates type aliases from Field256 to FieldElement and replaces local compress function with v2 API |
| noir-r1cs/src/skyscraper/sponge.rs | New sponge implementation using FieldElement and skyscraper::reference::permute |
| noir-r1cs/src/skyscraper/skyscraper_impl.rs | Removes old implementation file (171 lines deleted) |
| noir-r1cs/src/skyscraper/mod.rs | Updates module structure to match new organization |
| noir-r1cs/Cargo.toml | Adds ark-bn254 dependency for field element conversions |
| gnark-whir/whir_utilities.go | Updates function calls from Compress to CompressV2 |
| gnark-whir/go.mod | Updates dependency versions for gnark-nimue and gnark-skyscraper |
| Cargo.toml | Restructures workspace members to use new skyscraper/ directory layout |
| cm31_ntt/* | Code style improvements including import organization and formatting consistency |
| .github/workflows/benchmark.yml | Enhances benchmark workflow to automatically discover packages with benchmarks |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…nd hla into skyscraper
c9b8ae2 to
c0a5084
Compare
CodSpeed WallTime Performance ReportMerging #142 will improve performances by ×52Comparing
|
| Benchmark | BASE |
HEAD |
Change | |
|---|---|---|---|---|
ark_ff |
98 ns | N/A | N/A | |
block_mul |
127 ns | N/A | N/A | |
montgomery_interleaved_3 |
113 ns | N/A | N/A | |
montgomery_interleaved_4 |
192 ns | N/A | N/A | |
scalar_mul |
95 ns | N/A | N/A | |
simd_mul |
112 ns | N/A | N/A | |
ark_ff |
81 ns | N/A | N/A | |
block_sqr |
91 ns | N/A | N/A | |
montgomery_square_interleaved_3 |
97 ns | N/A | N/A | |
montgomery_square_interleaved_4 |
157 ns | N/A | N/A | |
montgomery_square_log_interleaved_3 |
97 ns | N/A | N/A | |
montgomery_square_log_interleaved_4 |
157 ns | N/A | N/A | |
scalar_sqr |
78 ns | N/A | N/A | |
simd_sqr |
85 ns | N/A | N/A | |
wrm_overhead |
14 ns | N/A | N/A | |
| ⚡ | verify_poseidon_1000 |
118.8 ms | 2.3 ms | ×52 |
block3 |
162.5 µs | N/A | N/A | |
block4 |
196.6 µs | N/A | N/A | |
reference |
1.3 ms | N/A | N/A | |
simple |
381.5 µs | N/A | N/A | |
| ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
|
These crates are not |
Fix: Update `noir-r1cs` with Skyscraper v2
This PR:
block_multiplier,block_multiplier_codegen,fp_roundingandhlainto/skyscraperand moves/skyscraperto/skyscraper/core./noir-r1cs/skyscraperto be compatible with Skyscraper v2.Impact:
skyscraper/, noir-r1cs keeps only protocol glueskyscraper/components across projects