Skip to content

Commit

Permalink
Merge branch 'master' into lde/flavor_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 authored Jun 19, 2024
2 parents 92ac90b + 41b21f1 commit aab7b90
Show file tree
Hide file tree
Showing 280 changed files with 17,836 additions and 12,919 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ jobs:
run: earthly-ci --no-output ./noir+packages-test

noir-projects:
needs: [setup, changes]
needs: [setup, changes, build]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: ${{ needs.changes.outputs.barretenberg == 'true' || needs.changes.outputs.noir == 'true' || needs.changes.outputs.noir-projects == 'true' }}
steps:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/mirror-noir-subrepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ jobs:
git config --file="$SUBREPO_PATH/.gitrepo" subrepo.commit "$BASE_NOIR_COMMIT"
# make a new commit with our previous message
git commit -am "$COMMIT_MESSAGE"
# There's various changes which we need to make to account for CI differences so we run this script to apply them.
git checkout origin/master -- noir/scripts/sync-out-fixup.sh
noir/scripts/sync-out-fixup.sh
git commit -am "chore: apply sync fixes"
# Now push to it with subrepo with computed commit messages
if ./scripts/git-subrepo/lib/git-subrepo push $SUBREPO_PATH --squash --branch=$STAGING_BRANCH; then
# We don't push a commit to aztec anymore so that we can maintain the 'commit' as our last pull branch
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-noir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ jobs:
git commit -am "[$LINES changes] $COMMIT_MESSAGE"
# There's various changes which we need to make to account for CI differences so we run this script to apply them.
git checkout origin/master -- noir/scripts/sync-fixup.sh
noir/scripts/sync-fixup.sh
git checkout origin/master -- noir/scripts/sync-in-fixup.sh
noir/scripts/sync-in-fixup.sh
git commit -am "chore: apply sync fixes"
git push origin $STAGING_BRANCH --force
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/vm_full_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: AVM Full Tests

on:
schedule:
- cron: "15 4 * * 1-5" # Monday to Friday at 4:15 AM UTC
workflow_dispatch:
inputs:
username:
description: "Username (optional)"
required: false
action:
description: "Default to 'start'"
required: false
default: "start"

concurrency:
# force parallelism in master
group: avm-full-tests-${{ github.ref }}
cancel-in-progress: true

env:
DOCKERHUB_PASSWORD: "${{ secrets.DOCKERHUB_PASSWORD }}"
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
USERNAME: ${{ github.event.pull_request.user.login || github.actor }}
GITHUB_TOKEN: ${{ github.token }}
GH_SELF_HOSTED_RUNNER_TOKEN: ${{ secrets.GH_SELF_HOSTED_RUNNER_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
# kludge until we move away from runners
WAIT_FOR_RUNNERS: false

jobs:
setup:
uses: ./.github/workflows/setup-runner.yml
with:
username: ${{ github.event.pull_request.user.login || github.actor }}
runner_type: builder-x86
secrets: inherit

# barretenberg (prover) native and AVM (public VM) tests
# only ran on x86 for resource reasons (memory intensive)
avm-full-tests:
needs: [setup]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
# Only allow one memory-hunger prover test to use this runner
- uses: ./.github/ci-setup-action
with:
# must be globally unique for build x runner
concurrency_key: avm-full-tests-x86
- name: "AVM Full Tests"
working-directory: ./barretenberg/cpp/
timeout-minutes: 90
# limit our parallelism to half our cores
run: earthly-ci --no-output +vm-full-test --hardware_concurrency=64
8 changes: 4 additions & 4 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
".": "0.42.0",
".": "0.43.0",
"yarn-project/cli": "0.35.1",
"yarn-project/aztec": "0.42.0",
"barretenberg": "0.42.0",
"barretenberg/ts": "0.42.0"
"yarn-project/aztec": "0.43.0",
"barretenberg": "0.43.0",
"barretenberg/ts": "0.43.0"
}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,4 @@
"**/noir/noir-repo/docs/versioned_docs/**": true
},
"cmake.sourceDirectory": "${workspaceFolder}/barretenberg/cpp",
"noir.nargoPath": "./noir/noir-repo/target/release/nargo"
}
214 changes: 214 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions avm-transpiler/src/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub enum AvmOpcode {
SHA256, // temp - may be removed, but alot of contracts rely on it
PEDERSEN, // temp - may be removed, but alot of contracts rely on it
ECADD,
MSM,
// Conversions
TORADIXLE,
}
Expand Down Expand Up @@ -165,6 +166,7 @@ impl AvmOpcode {
AvmOpcode::SHA256 => "SHA256 ",
AvmOpcode::PEDERSEN => "PEDERSEN",
AvmOpcode::ECADD => "ECADD",
AvmOpcode::MSM => "MSM",
// Conversions
AvmOpcode::TORADIXLE => "TORADIXLE",
}
Expand Down
24 changes: 24 additions & 0 deletions avm-transpiler/src/transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,30 @@ fn handle_black_box_function(avm_instrs: &mut Vec<AvmInstruction>, operation: &B
],
..Default::default()
}),
// Temporary while we dont have efficient noir implementations
BlackBoxOp::MultiScalarMul { points, scalars, outputs } => {
// The length of the scalars vector is 2x the length of the points vector due to limb
// decomposition
let points_offset = points.pointer.0;
let num_points = points.size.0;
let scalars_offset = scalars.pointer.0;
// Output array is fixed to 3
assert_eq!(outputs.size, 3, "Output array size must be equal to 3");
let outputs_offset = outputs.pointer.0;
avm_instrs.push(AvmInstruction {
opcode: AvmOpcode::MSM,
indirect: Some(
ZEROTH_OPERAND_INDIRECT | FIRST_OPERAND_INDIRECT | SECOND_OPERAND_INDIRECT,
),
operands: vec![
AvmOperand::U32 { value: points_offset as u32 },
AvmOperand::U32 { value: scalars_offset as u32 },
AvmOperand::U32 { value: outputs_offset as u32 },
AvmOperand::U32 { value: num_points as u32 },
],
..Default::default()
});
}
_ => panic!("Transpiler doesn't know how to process {:?}", operation),
}
}
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = f0aaa876777a37e99fdb98d5fa2d8a502e67c4a0
parent = cea0b3b29c2f7c37eb07c226a06534f92518cea6
commit = cb8df49c666a8e9c739583e0422e99818845a40d
parent = 7f62a901c848020058a58f6e772d495566416e0b
method = merge
cmdver = 0.4.6
Loading

0 comments on commit aab7b90

Please sign in to comment.