Skip to content

Commit

Permalink
feat: test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Apr 1, 2024
1 parent f514812 commit 17cf8be
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "barretenberg"]
path = barretenberg
url = https://github.com/aztecprotocol/aztec-packages
branch = md/02-26-feat_honk_verifier_start
1 change: 1 addition & 0 deletions barretenberg
Submodule barretenberg added at 56c28f
9 changes: 9 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Build barretenberg cpp
# TODO: only build honk_gen - not everything
echo "Downloading srs..."
(cd ./barretenberg/barretenberg/cpp/srs_db && ./download_ignition.sh 3)
(cd ./barretenberg/barretenberg/cpp && cmake --preset clang16)
(cd ./barretenberg/barretenberg/cpp && cmake --preset clang16)
(cd ./barretenberg/barretenberg/cpp && cmake --build --preset clang16 --target honk_solidity_proof_gen)


3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ src = "src"
out = "out"
libs = ["lib"]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
ffi = true
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
12 changes: 0 additions & 12 deletions script/Counter.s.sol

This file was deleted.

19 changes: 19 additions & 0 deletions scripts/run_fuzzer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
BB_BASE="barretenberg/barretenberg"

PLONK_FLAVOUR=${1:-"ultra"}
CIRCUIT_FLAVOUR=${2:-"blake"}
INPUTS=${3:-"1,2,3,4"}

BIN="$BB_BASE/cpp/build/bin/solidity_proof_gen"

INPUTS="$( sed 's/\\n//g' <<<"$INPUTS" )"

SRS_PATH="$BB_BASE/cpp/srs_db/ignition"

# If the plonk flavour is honk, then run the honk generator
if [ "$PLONK_FLAVOUR" == "honk" ]; then
BIN="$BB_BASE/cpp/build/bin/honk_solidity_proof_gen"
fi

$BIN $PLONK_FLAVOUR $CIRCUIT_FLAVOUR $SRS_PATH $INPUTS
2 changes: 1 addition & 1 deletion src/reference/Transcript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library TranscriptLib {
{
// TODO(md): the 12 here will need to be halved when we fix the transcript to not be over field elements
// TODO: use assembly
bytes32[3 + 3 + 12] memory round0;
bytes32[3 + NUMBER_OF_PUBLIC_INPUTS + 12] memory round0;
round0[0] = bytes32(proof.circuitSize);
round0[1] = bytes32(proof.publicInputsSize);
round0[2] = bytes32(proof.publicInputsOffset);
Expand Down

0 comments on commit 17cf8be

Please sign in to comment.