-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce blob circuit (#8101)
I'm contributiiiiiiiiiiiiiiiiing! Copying over the blob circuit from https://github.com/iAmMichaelConnor/blob-lib. Compiling this circuit takes 11 minutes, and two of the tests take 5 minutes each. So this might ruin CI. We might need to use an alternative lignum library, or tweak Zac's lignum library to make oracle calls to execute native ts/c++/rust code instead of brillig unconstrained functions. The typescript and solidity (and the part of the README which teaches about blobs) will need to be copied over in a separate PR by someone who knows their way around the monorepo :)
- Loading branch information
1 parent
2d70215
commit 4bb3bac
Showing
8 changed files
with
9,492 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "blob" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.30.0" | ||
|
||
[dependencies] | ||
bigint = {tag = "v0.3.0", git = "https://github.com/noir-lang/noir-bignum" } |
24 changes: 24 additions & 0 deletions
24
noir-projects/noir-protocol-circuits/crates/blob/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Constraint counts | ||
|
||
Current count: 428,240. | ||
|
||
## Compile: | ||
|
||
`time nargo compile` | ||
|
||
## Get gate count: | ||
|
||
Install bbup: `curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash` | ||
The version of bb compatible with nargo 0.33.0 is `bbup --version 0.48.0` | ||
|
||
`time bb gates_mega_honk -b ./target/blob.json` | ||
|
||
## Generate, then serve a new flamegraph, after compiling: | ||
|
||
<!-- `~/packages/noir/noir-repo/target/release/noir-profiler gates-flamegraph --artifact-path ./target/blob.json --backend-path ~/.bb/bb --output ./flamegraph -- -h && python3 -m http.server --directory "./flamegraph" 3000` --> | ||
|
||
`~/packages/noir/noir-repo/target/release/noir-profiler gates-flamegraph --artifact-path ./target/blob.json --backend-path ~/.bb/bb --output ./flamegraph --backend-gates-command "gates_mega_honk" -- -h && python3 -m http.server --directory "./flamegraph" 3000` | ||
|
||
## To serve an existing flamegraph: | ||
|
||
`python3 -m http.server --directory "./flamegraph" 3000` |
Oops, something went wrong.