Skip to content

Commit

Permalink
merge conflicts w/ master
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Mar 12, 2024
2 parents 5ce2b3e + 24749d9 commit c6cc631
Show file tree
Hide file tree
Showing 68 changed files with 11,481 additions and 2,250 deletions.
214 changes: 113 additions & 101 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,103 +92,6 @@ jobs:
- continuation/continue:
configuration_path: .circleci/generated_config.yml

# Noir
noir-x86_64:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir 32
aztec_manifest_key: noir

noir-arm64:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir 32 arm64
aztec_manifest_key: noir

noir-ecr-manifest:
machine:
image: default
resource_class: medium
steps:
- *checkout
- *setup_env
- run:
name: "Create ECR manifest"
command: create_ecr_manifest noir x86_64,arm64
aztec_manifest_key: noir

noir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-tests 32
aztec_manifest_key: noir-tests

noir-packages:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-packages 32
aztec_manifest_key: noir-packages

noir-packages-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-packages-tests 32
aztec_manifest_key: noir-packages-tests

noir-compile-acir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-compile-acir-tests 32
aztec_manifest_key: noir-compile-acir-tests

avm-transpiler:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build avm-transpiler 32
aztec_manifest_key: avm-transpiler

# Barretenberg
barretenberg-wasm-linux-clang:
docker:
Expand Down Expand Up @@ -356,17 +259,17 @@ jobs:
command: cond_spot_run_test barretenberg-x86_64-linux-clang-assert 32 ./scripts/run_tests 3 stdlib_recursion_tests --gtest_filter=-*turbo*
aztec_manifest_key: barretenberg-x86_64-linux-clang-assert

barretenberg-acir-tests-bb:
barretenberg-join-split-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: cond_spot_run_build barretenberg-acir-tests-bb 32
aztec_manifest_key: barretenberg-acir-tests-bb
name: "Test"
command: cond_spot_run_test barretenberg-x86_64-linux-clang-assert 32 ./scripts/run_tests 3 join_split_example_proofs_join_split_tests --gtest_filter=-*full_proof*
aztec_manifest_key: barretenberg-x86_64-linux-clang-assert

barretenberg-acir-tests-bb-sol:
docker:
Expand Down Expand Up @@ -403,6 +306,115 @@ jobs:
name: "Build and test"
command: cond_spot_run_test bb.js 32 ./scripts/run_tests
aztec_manifest_key: bb.js

# Noir
noir-x86_64:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir 32
aztec_manifest_key: noir

noir-arm64:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir 32 arm64
aztec_manifest_key: noir

noir-ecr-manifest:
machine:
image: default
resource_class: medium
steps:
- *checkout
- *setup_env
- run:
name: "Create ECR manifest"
command: create_ecr_manifest noir x86_64,arm64
aztec_manifest_key: noir

noir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-tests 32
aztec_manifest_key: noir-tests

noir-packages:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-packages 32
aztec_manifest_key: noir-packages

noir-packages-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-packages-tests 32
aztec_manifest_key: noir-packages-tests

noir-compile-acir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-compile-acir-tests 32
aztec_manifest_key: noir-compile-acir-tests

avm-transpiler:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build avm-transpiler 32
aztec_manifest_key: avm-transpiler

barretenberg-acir-tests-bb:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: cond_spot_run_build barretenberg-acir-tests-bb 32
aztec_manifest_key: barretenberg-acir-tests-bb

bb-js-acir-tests:
docker:
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"C_Cpp.default.includePath": ["barretenberg/cpp/src"],
"rust-analyzer.linkedProjects": [
"noir/noir-repo/Cargo.toml",
"noir/noir-repo/acvm-repo/acvm_js/Cargo.toml",
"avm-transpiler/Cargo.toml"
]
}
13 changes: 7 additions & 6 deletions avm-transpiler/src/transpile_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use log::info;
use regex::Regex;
use serde::{Deserialize, Serialize};

use acvm::acir::circuit::Circuit;
use acvm::acir::circuit::Program;
use noirc_driver::ContractFunctionType;

use crate::transpile::brillig_to_avm;
use crate::utils::extract_brillig_from_acir;
Expand Down Expand Up @@ -55,10 +56,10 @@ pub struct AcirContractFunction {
pub custom_attributes: Vec<String>,
pub abi: serde_json::Value,
#[serde(
serialize_with = "Circuit::serialize_circuit_base64",
deserialize_with = "Circuit::deserialize_circuit_base64"
serialize_with = "Program::serialize_program_base64",
deserialize_with = "Program::deserialize_program_base64"
)]
pub bytecode: Circuit,
pub bytecode: Program,
pub debug_symbols: serde_json::Value,
}

Expand Down Expand Up @@ -91,8 +92,8 @@ impl From<CompiledAcirContract> for TranspiledContract {
function.name, contract.name
);
// Extract Brillig Opcodes from acir
let acir_circuit = function.bytecode.clone();
let brillig = extract_brillig_from_acir(&acir_circuit.opcodes);
let acir_program = function.bytecode;
let brillig = extract_brillig_from_acir(&acir_program.functions[0].opcodes);

// Transpile to AVM
let avm_bytecode = brillig_to_avm(brillig);
Expand Down
7 changes: 7 additions & 0 deletions barretenberg/acir_tests/flows/write_contract.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -eu

export TEST_NAME=$(basename $(pwd))

$BIN write_vk -o vk
$BIN contract -k vk -c $CRS_PATH -b ./target/acir.gz -o $TEST_NAME.sol
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export BIN CRS_PATH VERBOSE BRANCH
cd acir_tests

# Convert them to array
SKIP_ARRAY=(diamond_deps_0 workspace workspace_default_member)
SKIP_ARRAY=(diamond_deps_0 workspace workspace_default_member recursion)

function test() {
cd $1
Expand Down
Loading

0 comments on commit c6cc631

Please sign in to comment.