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

chore: towards ci3 (SOURCE ONLY) #10711

Closed
wants to merge 800 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
800 commits
Select commit Hold shift + click to select a range
ee4246a
better bb-native-tests
ludamad Dec 5, 2024
d318807
ebs for now
ludamad Dec 5, 2024
9c9625c
builder taag hack
ludamad Dec 5, 2024
9e7a8d6
fix bb native tests and less output
ludamad Dec 5, 2024
37e62f8
finishing touches
ludamad Dec 5, 2024
15bdb0f
progress
ludamad Dec 5, 2024
dc0e8b5
progress
ludamad Dec 5, 2024
1061f37
Revert "progress"
ludamad Dec 5, 2024
8980ef3
ci scrub of runner assumption
ludamad Dec 6, 2024
42baf70
expand and simplify acir tests.
charlielye Dec 6, 2024
d48ece3
mid ci
ludamad Dec 6, 2024
b15f6f5
better repo clone
ludamad Dec 6, 2024
d7daeac
fix
ludamad Dec 6, 2024
9583e7b
denoiseable
charlielye Dec 6, 2024
a9b6abd
redo spot runner logic
ludamad Dec 6, 2024
ee00ecf
trigger ci
ludamad Dec 6, 2024
06ad160
build
ludamad Dec 6, 2024
17871ec
fix
ludamad Dec 6, 2024
9bcf06b
fix
ludamad Dec 6, 2024
75dba08
til
ludamad Dec 6, 2024
7df865d
artifact syntax
ludamad Dec 6, 2024
e290ee8
quieter fetch
ludamad Dec 6, 2024
d131b60
TEST lets go
ludamad Dec 6, 2024
4246868
TEST lets go
ludamad Dec 6, 2024
ec7c5cd
lets go x2
ludamad Dec 6, 2024
e780c51
denoise yq
ludamad Dec 6, 2024
a92cc1f
noir packages go bunk
ludamad Dec 6, 2024
c606fc6
fix
ludamad Dec 6, 2024
516ecf4
noir shouldnt care about our version hack
ludamad Dec 6, 2024
fe9c287
noir hopeful fix
ludamad Dec 6, 2024
ffa2c0c
rebuild pattern simplification for noir
ludamad Dec 6, 2024
941119e
hash test target
ludamad Dec 6, 2024
345edf9
Upload
ludamad Dec 6, 2024
597998e
set GITHUB_RUN_URL
ludamad Dec 6, 2024
ee629b3
earthly install
ludamad Dec 6, 2024
3b5d63b
Update
ludamad Dec 6, 2024
277a154
typo
ludamad Dec 6, 2024
9c8980a
hash
ludamad Dec 6, 2024
70deb3e
get it working
ludamad Dec 6, 2024
7ddc12a
more
ludamad Dec 6, 2024
69a16a2
hash
ludamad Dec 6, 2024
9d043ac
sync
ludamad Dec 6, 2024
1f129a6
ci wakeup
ludamad Dec 6, 2024
d8ce1dc
earthly install
ludamad Dec 6, 2024
4b95915
fix cache
ludamad Dec 6, 2024
c3ab497
pass thru GITHUB_RUN_URL
ludamad Dec 6, 2024
f2e71d6
ci fix
ludamad Dec 6, 2024
f591e61
fix
ludamad Dec 6, 2024
8ea83b7
fix
ludamad Dec 6, 2024
4f2a15e
time
ludamad Dec 6, 2024
b15cb79
fix
ludamad Dec 6, 2024
2dddd87
finer caching
ludamad Dec 6, 2024
802c14a
Make images
ludamad Dec 6, 2024
acb3d2c
syntax
ludamad Dec 6, 2024
6e8d712
lets go
ludamad Dec 6, 2024
8844d2b
acir sol tests
charlielye Dec 6, 2024
2a7326f
mid ci
ludamad Dec 6, 2024
9acc153
fixes
ludamad Dec 6, 2024
5b42912
fix
ludamad Dec 6, 2024
45e2165
fix
ludamad Dec 6, 2024
f8843ff
More space on runner
ludamad Dec 6, 2024
7b188e2
space
ludamad Dec 6, 2024
e39dceb
ci.py fix
ludamad Dec 6, 2024
2b68dbd
fix acir bench flag
ludamad Dec 6, 2024
a5a4bfd
boxes test flag
ludamad Dec 6, 2024
82aed0d
mega honk circuits for gates report
ludamad Dec 6, 2024
e8b4100
copy over ssh
ludamad Dec 6, 2024
38ba26d
bigger disk for ci...
ludamad Dec 6, 2024
a9b4cf5
spot capacity
ludamad Dec 6, 2024
eb4db52
install ssh on tester
ludamad Dec 6, 2024
58b8ee3
fix bb bench
ludamad Dec 6, 2024
c8199e2
wording
ludamad Dec 6, 2024
fc2f85b
fix cache flag
ludamad Dec 6, 2024
58ae17d
fix username
ludamad Dec 6, 2024
d979a6c
fix e2e
ludamad Dec 6, 2024
43bd9d4
cache
ludamad Dec 6, 2024
7873bb2
litter for good measure
ludamad Dec 6, 2024
1c373aa
try to fix gates report
ludamad Dec 6, 2024
5806718
cache fix
ludamad Dec 6, 2024
a320dbc
cache fix
ludamad Dec 6, 2024
3d80034
force fix gates report
ludamad Dec 6, 2024
d98fd99
try fix github url
ludamad Dec 6, 2024
6003945
try fix github url
ludamad Dec 6, 2024
41b5104
bigger runner disk...
ludamad Dec 6, 2024
7a6a8c2
bootstrapping build images
ludamad Dec 6, 2024
28ba667
script perms
ludamad Dec 6, 2024
74e4b70
syntax
ludamad Dec 6, 2024
257ab03
not osxcross
ludamad Dec 6, 2024
32ca5cf
refine images
ludamad Dec 6, 2024
44fab0c
build images tweak
ludamad Dec 6, 2024
772f808
fix pushing
ludamad Dec 6, 2024
be2aa98
push dev stuff
ludamad Dec 6, 2024
fb9d312
global CI=1
ludamad Dec 6, 2024
234d765
fix CI flag
ludamad Dec 6, 2024
812097f
sync
ludamad Dec 6, 2024
925a799
fix
ludamad Dec 6, 2024
403846e
softer shutdown
ludamad Dec 6, 2024
ebd5fec
push image
ludamad Dec 6, 2024
a31ccf7
no brotli
ludamad Dec 6, 2024
b94af69
yq revisit
ludamad Dec 6, 2024
4a6041b
real head
ludamad Dec 6, 2024
66364e5
fix build images not caching
ludamad Dec 6, 2024
7b64774
fic scripts
ludamad Dec 6, 2024
817bd7b
shorter bootstrap aztec
ludamad Dec 7, 2024
9edd4f8
simpler
ludamad Dec 7, 2024
39cb51f
better xp for core bb
ludamad Dec 7, 2024
c4171d9
event name
ludamad Dec 7, 2024
21cb2c3
fix
ludamad Dec 7, 2024
ae537ea
jq
ludamad Dec 7, 2024
8b5ccb7
jq
ludamad Dec 7, 2024
6dbef4a
the obvious
ludamad Dec 7, 2024
dfa2594
fix
ludamad Dec 7, 2024
dab209f
up
ludamad Dec 7, 2024
d19c774
simplify tester-with-images flow
ludamad Dec 7, 2024
614c687
better images that work in kind
ludamad Dec 7, 2024
52dbc53
fix e2e
ludamad Dec 7, 2024
a272066
Merge branch 'cl/ci3-fake-base' into cl/ci3
charlielye Dec 7, 2024
596ee80
merge fix
charlielye Dec 7, 2024
3506a20
enable pipefail. source colors. color headers.
charlielye Dec 7, 2024
aa88de4
better call pattern. color tweak
charlielye Dec 7, 2024
d34a92b
Merge branch 'cl/ci3-fake-base' into cl/ci3
charlielye Dec 7, 2024
37029e8
try fix e2e
ludamad Dec 7, 2024
4dfeebb
fix
charlielye Dec 7, 2024
dae10e1
crs path fix in bb.js. tweaks to allow playing with omp again (nope).…
charlielye Dec 8, 2024
f7fdb06
noir-projects testing pass
ludamad Dec 8, 2024
d06143d
fix
charlielye Dec 8, 2024
1024875
Merge remote-tracking branch 'origin/cl/ci3' into ad/ci2.5
ludamad Dec 8, 2024
faca724
fix
charlielye Dec 8, 2024
f465215
more dense
ludamad Dec 8, 2024
bab9f70
fix compose log level. ec2-full cmd.
charlielye Dec 8, 2024
23c80eb
fix
charlielye Dec 8, 2024
3e0f90f
Merge remote-tracking branch 'origin/cl/ci3' into ad/ci2.5
ludamad Dec 9, 2024
31c7f80
more error info
ludamad Dec 9, 2024
396cf6c
fix noir-contracts function filter.
charlielye Dec 9, 2024
249db48
fix noir-contracts function filter.
charlielye Dec 9, 2024
309d731
attach to container in test.sh to catch error
charlielye Dec 9, 2024
342ce4d
attach to container in test.sh to catch error
charlielye Dec 9, 2024
2d8e30a
reqres flakes.
charlielye Dec 9, 2024
22511c3
merge
ludamad Dec 9, 2024
24fef92
-
ludamad Dec 9, 2024
3e7bd03
useful ci target
ludamad Dec 9, 2024
c1f84b7
Fix
ludamad Dec 9, 2024
ae45407
try part revert
ludamad Dec 9, 2024
107e8a6
try part revert
ludamad Dec 9, 2024
6c668e9
try fix
ludamad Dec 9, 2024
dee99ab
try fix
ludamad Dec 9, 2024
08877d0
try fix
ludamad Dec 9, 2024
4ac21ae
try fix
ludamad Dec 9, 2024
4b93a8c
try fix
ludamad Dec 9, 2024
84bb694
crs stuff
charlielye Dec 9, 2024
626d363
sync
ludamad Dec 9, 2024
93fcdf2
instance name
charlielye Dec 9, 2024
0f145a4
sync
ludamad Dec 9, 2024
471313b
try fix
ludamad Dec 10, 2024
d6951fc
Merge remote-tracking branch 'origin/master' into ad/ci2.5
ludamad Dec 10, 2024
8fc164e
yarn.lock's
ludamad Dec 10, 2024
6694988
locks
ludamad Dec 10, 2024
cb5d0d9
yarn-project precommit hook
charlielye Dec 10, 2024
1186c29
Merge branch 'cl/ci3-fake-base' into cl/ci3
charlielye Dec 10, 2024
c685aaf
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 10, 2024
567b788
fix yarn.lock. color precommit
charlielye Dec 10, 2024
f65de36
precommit comment
charlielye Dec 10, 2024
43600ca
fix
charlielye Dec 10, 2024
da9b0b3
node crs read requested amount
charlielye Dec 10, 2024
bef986b
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 11, 2024
9d125f3
jest silent reporter. NO_SPOT var.
charlielye Dec 11, 2024
c811b79
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 11, 2024
4f54ca9
Revert "feat: unified create circuit from acir (#10440)"
charlielye Dec 11, 2024
8d76959
unbound fix
charlielye Dec 11, 2024
c6e6627
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 11, 2024
9b806b0
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 11, 2024
d9c6bb1
Reapply "feat: unified create circuit from acir (#10440)"
charlielye Dec 11, 2024
ff77fb1
Merge remote-tracking branch 'origin/cl/ci3' into ad/ci2.5
ludamad Dec 11, 2024
c18fc70
-
ludamad Dec 11, 2024
d32bc66
-
ludamad Dec 11, 2024
5596c7d
Merge remote-tracking branch 'origin/master' into ad/ci2.5
ludamad Dec 11, 2024
a9da124
fix
ludamad Dec 11, 2024
592247d
Noir contracts fix
ludamad Dec 12, 2024
36f9344
running
ludamad Dec 12, 2024
39526ad
try
ludamad Dec 12, 2024
74c00d7
update
ludamad Dec 12, 2024
7584630
lock
ludamad Dec 12, 2024
6ffdaac
install state
ludamad Dec 12, 2024
c734ca3
gogo
ludamad Dec 12, 2024
bd475b8
fixes
ludamad Dec 12, 2024
0a0325d
fix
ludamad Dec 12, 2024
8a2cb72
fix
ludamad Dec 12, 2024
17a4350
ivc fix
charlielye Dec 12, 2024
94bbcdb
better err handling with dump_fail
charlielye Dec 12, 2024
0dea0a8
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 12, 2024
30b4af4
fix merge ci.yml
charlielye Dec 12, 2024
65d80fb
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 12, 2024
bb58eaa
Merge remote-tracking branch 'origin/master' into cl/ci3
charlielye Dec 12, 2024
0af331f
handle spot evicts gracefully
ludamad Dec 12, 2024
d9c4a9b
keys are not base64 encoded, just hex. because of course.
charlielye Dec 12, 2024
43a6482
reverse hex for fields
charlielye Dec 12, 2024
2c62ba6
Merge remote-tracking branch 'origin/cl/ci3' into ad/ci2.5
ludamad Dec 12, 2024
2cba937
fix ci.yml
ludamad Dec 12, 2024
30a7a29
fix syntax
ludamad Dec 12, 2024
25f007f
fix syntax
ludamad Dec 12, 2024
2b8201c
fix on-demand rescue
ludamad Dec 12, 2024
0e9f297
update aws_handle_evict
ludamad Dec 12, 2024
8c6f977
fix
ludamad Dec 12, 2024
a5744fd
fix testers
ludamad Dec 12, 2024
75340ba
fix testers
ludamad Dec 12, 2024
a92c1cc
xxd kludge
ludamad Dec 12, 2024
0daae8a
fix reporters
ludamad Dec 12, 2024
2ee63db
test evicts better
ludamad Dec 12, 2024
4df8df0
lets try
ludamad Dec 12, 2024
27e4533
Merge remote-tracking branch 'origin/master' into ad/ci2.5
ludamad Dec 12, 2024
8eb74b7
no reports in end-to-end
ludamad Dec 12, 2024
4ee096c
install xxd in build image
ludamad Dec 12, 2024
c9395a5
bootstrap fix
ludamad Dec 12, 2024
1b514fe
bootstrap fix
ludamad Dec 12, 2024
271517e
allow HOOKS_NO_LINT to be set
ludamad Dec 12, 2024
4b43a0f
less prover-client-test, no lint hook setting
ludamad Dec 13, 2024
cb23f55
stupid syntax
ludamad Dec 13, 2024
00c43d3
fixes
ludamad Dec 13, 2024
675061c
fix testers
ludamad Dec 13, 2024
1dda985
try BB_ASSERT_WARN
ludamad Dec 13, 2024
a8f564f
try to turn make assertions warnings piecemeal
ludamad Dec 13, 2024
73d1319
refactor tester-with-images to just explicit pulls
ludamad Dec 13, 2024
f148f18
more removal. Get bb compiling
ludamad Dec 13, 2024
8d30829
try again
ludamad Dec 13, 2024
0036f40
fix
ludamad Dec 13, 2024
c17c06e
syntax fix
ludamad Dec 13, 2024
21a110c
disable assertions in bb for now, as leads to avm failures. remove fl…
charlielye Dec 13, 2024
42525c0
install xxd. terminate use iid.
charlielye Dec 13, 2024
227cd2b
fix
charlielye Dec 13, 2024
28a2c1e
fix
charlielye Dec 13, 2024
a219704
region fix.
charlielye Dec 13, 2024
24c0c92
cooking
ludamad Dec 13, 2024
754b355
Update
ludamad Dec 13, 2024
dbf8c41
source only
ludamad Dec 13, 2024
6bbfb93
Merge remote-tracking branch 'origin/master' into ad/ci2.5-source-only
ludamad Dec 13, 2024
bab5b1f
revert earthfiles
ludamad Dec 13, 2024
c149e7b
More clawback
ludamad Dec 13, 2024
bca1696
reverts
ludamad Dec 13, 2024
c3cf559
reverts
ludamad Dec 13, 2024
9879705
reverts
ludamad Dec 13, 2024
ba8f8d6
reverts
ludamad Dec 13, 2024
420b1e4
reverts
ludamad Dec 13, 2024
b6a3a8a
denoise
ludamad Dec 13, 2024
8a24701
denoise
ludamad Dec 13, 2024
97eb6c4
denoise
ludamad Dec 13, 2024
4d53769
up
ludamad Dec 13, 2024
bccbe59
changes (need to upstream)
ludamad Dec 13, 2024
e0d29db
todo
ludamad Dec 13, 2024
5ca1adb
bb sync
ludamad Dec 13, 2024
c71b614
Merge branch 'master' into ad/ci2.5-source-only
ludamad Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ terraform.tfstate*
# tmux
tmux-client-*.log
.supermavenignore

# parallel
joblog.txt
1 change: 0 additions & 1 deletion .supermavenignore

This file was deleted.

18 changes: 17 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,21 @@
"files.trimTrailingWhitespace": true,
"cmake.sourceDirectory": "${workspaceFolder}/barretenberg/cpp",
"typescript.tsserver.maxTsServerMemory": 4096,
"markdown.extension.toc.levels": "2..6"
"markdown.extension.toc.levels": "2..6",
"cSpell.userWords": [
"anytype",
"barretenberg",
"deinit",
"denoise",
"endgroup",
"napi",
"setsid",
"pgid",
"DCMAKE",
"toplevel",
"grumpkin",
"gtest",
"wasi",
"memfree"
]
}
49 changes: 31 additions & 18 deletions avm-transpiler/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
#!/usr/bin/env bash
set -eu
# Use ci3 script base.
source $(git rev-parse --show-toplevel)/ci3/source_bootstrap

cd $(dirname "$0")
cmd=${1:-}

CMD=${1:-}
hash=$(cache_content_hash ../noir/.rebuild_patterns .rebuild_patterns)

if [ -n "$CMD" ]; then
if [ "$CMD" = "clean" ]; then
cargo clean
git clean -fdx
exit 0
else
echo "Unknown command: $CMD"
exit 1
function build {
github_group "avm-transpiler build"
artifact=avm-transpiler-$hash.tar.gz
if ! cache_download $artifact; then
denoise ./scripts/bootstrap_native.sh
cache_upload $artifact target/release
fi
fi

# Attempt to just pull artefacts from CI and exit on success.
if [[ "$OSTYPE" != "darwin"* ]] && [ -n "${USE_CACHE:-}" ]; then
./bootstrap_cache.sh && exit
fi
github_endgroup
}

./scripts/bootstrap_native.sh
case "$cmd" in
"clean")
git clean -fdx
;;
""|"fast"|"full")
build
;;
"test")
;;
"ci")
build
;;
"hash")
echo $hash
;;
*)
echo "Unknown command: $cmd"
exit 1
esac
8 changes: 0 additions & 8 deletions avm-transpiler/bootstrap_cache.sh

This file was deleted.

5 changes: 3 additions & 2 deletions aztec-nargo/compile_then_postprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ if [ "${1:-}" != "compile" ]; then
fi
shift # remove the compile arg so we can inject --show-artifact-paths

# Forward all arguments to nargo, tee output to console
artifacts_to_process=$($NARGO compile --inliner-aggressiveness 0 --show-artifact-paths $@ | tee /dev/tty | grep -oP 'Saved contract artifact to: \K.*')
# Forward all arguments to nargo, tee output to console.
# Nargo should be outputing errors to stderr, but it doesn't. So tee to stdout to display errors.
artifacts_to_process=$($NARGO compile --inliner-aggressiveness 0 --show-artifact-paths $@ | tee >(cat >&2) | grep -oP 'Saved contract artifact to: \K.*')

# NOTE: the output that is teed to /dev/tty will normally not be redirectable by the caller.
# If the script is run via docker, however, the user will see this output on stdout and will be able to redirect.
Expand Down
28 changes: 0 additions & 28 deletions barretenberg/acir_tests/bash_helpers/catch.sh

This file was deleted.

2 changes: 1 addition & 1 deletion barretenberg/acir_tests/bench_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

cd "$(dirname "$0")"

./clone_test_vectors.sh
USE_CACHE=1 ./bootstrap.sh full

TEST_NAMES=("$@")
THREADS=(1 4 16 32 64)
Expand Down
178 changes: 176 additions & 2 deletions barretenberg/acir_tests/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,178 @@
#!/bin/bash
source $(git rev-parse --show-toplevel)/ci3/source_bootstrap

(cd headless-test && yarn && npx playwright install && npx playwright install-deps)
(cd browser-test-app && yarn && yarn build)
cmd=${1:-}
export CRS_PATH=$HOME/.bb-crs

function build {
if [ ! -d acir_tests ]; then
cp -R ../../noir/noir-repo/test_programs/execution_success acir_tests
# Running these requires extra gluecode so they're skipped.
rm -rf acir_tests/{diamond_deps_0,workspace,workspace_default_member}
# TODO(https://github.com/AztecProtocol/barretenberg/issues/1108): problem regardless the proof system used
rm -rf acir_tests/regression_5045
if [ "${CI25:-0}" = 0 ]; then
# These just started failing.
rm -rf acir_tests/{reference_counts,schnorr,regression}
fi
fi

# COMPILE=2 only compiles the test.
github_group "acir_tests compiling"
parallel --joblog joblog.txt --line-buffered 'COMPILE=2 ./run_test.sh $(basename {})' ::: ./acir_tests/*
github_endgroup

# TODO: This actually breaks things, but shouldn't. We want to do it here and not maintain manually.
# Regenerate verify_honk_proof recursive input.
# local bb=$(realpath ../cpp/build/bin/bb)
# (cd ./acir_tests/assert_statement && \
# $bb write_recursion_inputs_honk -b ./target/program.json -o ../verify_honk_proof --recursive)

github_group "acir_tests updating yarn"
# Update yarn.lock so it can be committed.
# Be lenient about bb.js hash changing, even if we try to minimize the occurrences.
(cd browser-test-app && yarn add --dev @aztec/bb.js@../../ts && yarn)
(cd headless-test && yarn)
(cd sol-test && yarn)
# The md5sum of everything is the same after each yarn call.
# Yet seemingly yarn's content hash will churn unless we reset timestamps
find {headless-test,browser-test-app} -exec touch -t 197001010000 {} + 2>/dev/null || true
github_endgroup

github_group "acir_tests building browser-test-app"
# Keep build as part of CI only.
(cd browser-test-app && yarn build)
github_endgroup
}

function hash {
cache_content_hash ../../noir/.rebuild_patterns ../../noir/.rebuild_patterns_tests ../../barretenberg/cpp/.rebuild_patterns ../../barretenberg/ts/.rebuild_patterns
}
function test {
local hash=$(hash)
if ! test_should_run barretenberg-acir-tests-$hash; then
return
fi

export HARDWARE_CONCURRENCY=${HARDWARE_CONCURRENCY:-8}
# local jobs=$(($(nproc) / HARDWARE_CONCURRENCY))
local jobs=64

# Create temporary file descriptor 3, and redirects anything written to it, to parallels stdin.
exec 3> >(parallel -j$jobs --tag --line-buffered --joblog joblog.txt)
local pid=$!
trap "kill -SIGTERM $pid 2>/dev/null || true" EXIT

# Run function for syntactic simplicity.
run() {
echo "$*" >&3
}

local plonk_tests=$(find ./acir_tests -maxdepth 1 -mindepth 1 -type d | \
grep -vE 'verify_honk_proof|double_verify_honk_proof')
local honk_tests=$(find ./acir_tests -maxdepth 1 -mindepth 1 -type d | \
grep -vE 'single_verify_proof|double_verify_proof|double_verify_nested_proof')

# barretenberg-acir-tests-sol:
run FLOW=sol ./run_test.sh assert_statement
run FLOW=sol ./run_test.sh double_verify_proof
run FLOW=sol ./run_test.sh double_verify_nested_proof
run FLOW=sol_honk ./run_test.sh assert_statement
run FLOW=sol_honk ./run_test.sh 1_mul
run FLOW=sol_honk ./run_test.sh slices
run FLOW=sol_honk ./run_test.sh verify_honk_proof

# barretenberg-acir-tests-bb.js:
# Browser tests.
run BROWSER=chrome THREAD_MODEL=mt PORT=8080 ./run_test_browser.sh verify_honk_proof
run BROWSER=chrome THREAD_MODEL=st PORT=8081 ./run_test_browser.sh 1_mul
run BROWSER=webkit THREAD_MODEL=mt PORT=8082 ./run_test_browser.sh verify_honk_proof
run BROWSER=webkit THREAD_MODEL=st PORT=8083 ./run_test_browser.sh 1_mul
# Run ecdsa_secp256r1_3x through bb.js on node to check 256k support.
run BIN=../ts/dest/node/main.js FLOW=prove_then_verify ./run_test.sh ecdsa_secp256r1_3x
# Run the prove then verify flow for UltraHonk. This makes sure we have the same circuit for different witness inputs.
run BIN=../ts/dest/node/main.js SYS=ultra_honk FLOW=prove_then_verify ./run_test.sh 6_array
# Run a single arbitrary test not involving recursion through bb.js for MegaHonk
run BIN=../ts/dest/node/main.js SYS=mega_honk FLOW=prove_and_verify ./run_test.sh 6_array
# Run 1_mul through bb.js build, all_cmds flow, to test all cli args.
run BIN=../ts/dest/node/main.js FLOW=all_cmds ./run_test.sh 1_mul

# barretenberg-acir-tests-bb:
# Fold and verify an ACIR program stack using ClientIvc
# run INPUT_TYPE=compiletime_stack FLOW=prove_and_verify_client_ivc ./run_test.sh fold_basic
# Fold and verify an ACIR program stack using ClientIvc, then natively verify the ClientIVC proof.
run INPUT_TYPE=compiletime_stack FLOW=prove_then_verify_client_ivc ./run_test.sh fold_basic
# Fold and verify an ACIR program stack using ClientIvc, recursively verify as part of the Tube circuit and produce and verify a Honk proof
# TODO: Requires 2GB CRS. Discuss...
# run FLOW=prove_then_verify_tube ./run_test.sh fold_basic
# Run 1_mul through native bb build, all_cmds flow, to test all cli args.
run FLOW=all_cmds ./run_test.sh 1_mul

# barretenberg-acir-tests-bb-ultra-plonk:
# Exclude honk tests.
for t in $plonk_tests; do
run FLOW=prove_then_verify ./run_test.sh $(basename $t)
done
run FLOW=prove_then_verify RECURSIVE=true ./run_test.sh assert_statement
run FLOW=prove_then_verify RECURSIVE=true ./run_test.sh double_verify_proof

# barretenberg-acir-tests-bb-ultra-honk:
# Exclude plonk tests.
for t in $honk_tests; do
run SYS=ultra_honk FLOW=prove_then_verify ./run_test.sh $(basename $t)
done
run SYS=ultra_honk FLOW=prove_then_verify RECURSIVE=true ./run_test.sh assert_statement
run SYS=ultra_honk FLOW=prove_then_verify RECURSIVE=true ./run_test.sh double_verify_honk_proof
run SYS=ultra_honk FLOW=prove_and_verify_program ./run_test.sh merkle_insert

# barretenberg-acir-tests-bb-client-ivc:
# At least for now, skip folding tests that fail when run against ClientIVC.
# This is not a regression--folding was not being properly tested.
# TODO(https://github.com/AztecProtocol/barretenberg/issues/1164): Resolve this
# The reason for failure is that compile-time folding, as initially conceived, is
# only supported by ClientIVC through hacks. ClientIVC in Aztec is ultimately to be
# used through runtime folding, since the kernels that are needed are detected and
# constructed at runtime in Aztec's typescript proving interface. ClientIVC appends
# folding verifiers and does databus and Goblin merge work depending on its inputs,
# detecting which circuits are Aztec kernels. These tests may simple fail for trivial
# reasons, e.g. because the number of circuits in the stack is odd.
local civc_tests=$(find ./acir_tests -maxdepth 1 -mindepth 1 -type d | \
grep -vE 'fold_basic_nested_call|fold_fibonacci|fold_numeric_generic_poseidon|ram_blowup_regression')
for t in $civc_tests; do
run FLOW=prove_then_verify_client_ivc ./run_test.sh $(basename $t)
done

# Close parallels input file descriptor and wait for completion.
exec 3>&-
wait $pid

cache_upload_flag barretenberg-acir-tests-$hash
github_endgroup
}

export -f build test

case "$cmd" in
"clean")
git clean -fdx
(cd ../../noir/noir-repo/test_programs/execution_success && git clean -fdx)
;;
""|"fast")
;;
"full")
denoise build
;;
"ci")
denoise build
denoise test
;;
"hash")
hash
;;
"test")
denoise test
;;
*)
echo "Unknown command: $cmd"
exit 1
esac
3 changes: 2 additions & 1 deletion barretenberg/acir_tests/browser-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.3"
}
},
"packageManager": "[email protected]"
}
7 changes: 4 additions & 3 deletions barretenberg/acir_tests/browser-test-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ __metadata:
cacheKey: 10c0

"@aztec/bb.js@file:../../ts::locator=browser-test-app%40workspace%3A.":
version: 0.62.0
resolution: "@aztec/bb.js@file:../../ts#../../ts::hash=c1171c&locator=browser-test-app%40workspace%3A."
version: 0.66.0
resolution: "@aztec/bb.js@file:../../ts#../../ts::hash=3f855e&locator=browser-test-app%40workspace%3A."
dependencies:
comlink: "npm:^4.4.1"
commander: "npm:^10.0.1"
debug: "npm:^4.3.4"
fflate: "npm:^0.8.0"
pako: "npm:^2.1.0"
tslib: "npm:^2.4.0"
bin:
bb.js: ./dest/node/main.js
checksum: 10c0/fca8b1500ed2ddbb39cbfd7ef81c55cf0cb9272ad40f28f92691f6d8b7e50f070d622cee9ff4ce4f3a55f748afd949842482cf2e8907d64d2d69cc106ad71aec
checksum: 10c0/52ba849919b3ca5778bef8df60598d7feb3700a369683bd995d8da0caf3b8a2bf276a0efece7d4218f6922ff87b6a2dd11ec4e8e3ad2ef059f729f7d1a3e6206
languageName: node
linkType: hard

Expand Down
8 changes: 0 additions & 8 deletions barretenberg/acir_tests/clone_test_vectors.sh

This file was deleted.

4 changes: 4 additions & 0 deletions barretenberg/acir_tests/flows/fail.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Fails, for testing the harness.
echo Forced failure.
false
4 changes: 2 additions & 2 deletions barretenberg/acir_tests/flows/honk_sol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export PROOF_AS_FIELDS="$(pwd)/proof_fields.json"
# Create a proof, write the solidity contract, write the proof as fields in order to extract the public inputs
$BIN prove_ultra_keccak_honk -o proof $FLAGS $BFLAG
$BIN write_vk_ultra_keccak_honk -o vk $FLAGS $BFLAG
$BIN verify_ultra_keccak_honk -k vk -p proof $FLAGS
$BIN proof_as_fields_honk $FLAGS -p $PROOF -o proof_fields.json
$BIN verify_ultra_keccak_honk -k vk -p proof $FLAGS $BFLAG
$BIN proof_as_fields_honk -k vk $FLAGS -p $PROOF
Copy link
Member

Choose a reason for hiding this comment

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

conflict here due to the file rename to sol_honk.sh

$BIN contract_ultra_honk -k vk $FLAGS -o Verifier.sol

# Export the paths to the environment variables for the js test runner
Expand Down
9 changes: 9 additions & 0 deletions barretenberg/acir_tests/flows/prove_and_verify_program.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# prove_and_verify produces no output, so is parallel safe.
set -eu

VFLAG=${VERBOSE:+-v}
FLAGS="-c $CRS_PATH $VFLAG"
[ "${RECURSIVE}" = "true" ] && FLAGS+=" --recursive"

$BIN prove_and_verify_${SYS}_program $FLAGS -b ./target/program.json
Loading
Loading