Skip to content

Commit

Permalink
Merge branch 'master' into get-nullified-notes
Browse files Browse the repository at this point in the history
  • Loading branch information
nventuro committed Jan 29, 2024
2 parents 1680997 + 80be57d commit c084d7a
Show file tree
Hide file tree
Showing 580 changed files with 18,813 additions and 5,525 deletions.
33 changes: 23 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ jobs:
name: Test
command: cond_spot_run_container yarn-project 64 test | add_timestamps

aztec-sandbox:
aztec-package:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
Expand All @@ -420,7 +420,7 @@ jobs:
- *setup_env
- run:
name: "Build and test"
command: build aztec-sandbox
command: build aztec

cli:
machine:
Expand Down Expand Up @@ -521,6 +521,17 @@ jobs:
name: "Test"
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml TEST=e2e_2_pxes.test.ts

e2e-note-getter:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml TEST=e2e_note_getter.test.ts

e2e-multiple-accounts-1-enc-key:
docker:
- image: aztecprotocol/alpine-build-image
Expand Down Expand Up @@ -982,7 +993,7 @@ jobs:
command: |
should_release || exit 0
deploy_dockerhub noir
deploy_dockerhub aztec-sandbox
deploy_dockerhub aztec
deploy_dockerhub cli
deploy_dockerhub aztec-faucet
deploy_dockerhub mainnet-fork
Expand Down Expand Up @@ -1034,7 +1045,7 @@ jobs:
# Export variables for Terraform.
export TF_VAR_BOOTNODE_1_PRIVATE_KEY=$BOOTNODE_1_PRIVATE_KEY
export TF_VAR_BOOTNODE_2_PRIVATE_KEY=$BOOTNODE_2_PRIVATE_KEY
deploy_terraform_services yarn-project/p2p-bootstrap aztec-sandbox
deploy_terraform_services yarn-project/p2p-bootstrap aztec
- run:
name: "Deploy Aztec Nodes to AWS"
command: |
Expand All @@ -1048,16 +1059,16 @@ jobs:
# Check if l1-contracts have changed
if [ "$CONTRACTS_DEPLOYED" -eq 1 ]; then
echo "Contracts have changed, taint nodes to force redeploy.."
deploy_terraform_services yarn-project/aztec-node aztec-sandbox aztec-node "aws_ecs_task_definition.aztec-node[0],aws_ecs_task_definition.aztec-node[1]"
deploy_terraform_services yarn-project/aztec-node aztec aztec-node "aws_ecs_task_definition.aztec-node[0],aws_ecs_task_definition.aztec-node[1]"
else
deploy_terraform_services yarn-project/aztec-node aztec-sandbox
deploy_terraform_services yarn-project/aztec-node aztec
fi
- run:
name: "Deploy Aztec Faucet to AWS"
command: |
should_deploy 0 || exit 0
export TF_VAR_FAUCET_PRIVATE_KEY=$FAUCET_PRIVATE_KEY
deploy_terraform_services yarn-project/aztec-faucet aztec-sandbox
deploy_terraform_services yarn-project/aztec-faucet aztec
# Repeatable config for defining the workflow below.
defaults: &defaults
Expand Down Expand Up @@ -1191,14 +1202,14 @@ workflows:
- build-docs: *defaults_yarn_project

# Artifacts
- aztec-sandbox: *defaults_yarn_project_prod
- aztec-package: *defaults_yarn_project_prod
- cli: *defaults_yarn_project_prod
- aztec-faucet: *defaults_yarn_project_prod

# Boxes.
- boxes:
requires:
- aztec-sandbox
- aztec-package
<<: *defaults
- boxes-blank:
requires:
Expand All @@ -1217,10 +1228,11 @@ workflows:
- e2e-join:
requires:
- end-to-end
- aztec-sandbox
- aztec-package
- cli
<<: *defaults
- e2e-2-pxes: *e2e_test
- e2e-note-getter: *e2e_test
- e2e-deploy-contract: *e2e_test
- e2e-lending-contract: *e2e_test
- e2e-token-contract: *e2e_test
Expand Down Expand Up @@ -1260,6 +1272,7 @@ workflows:
requires:
- mainnet-fork
- e2e-2-pxes
- e2e-note-getter
- e2e-deploy-contract
- e2e-lending-contract
- e2e-token-contract
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All the packages that make up [Aztec](https://docs.aztec.network).
## Popular packages

- [Aztec.nr](./yarn-project/aztec-nr/): A [Noir](https://noir-lang.org) framework for smart contracts on Aztec.
- [Aztec Sandbox](./yarn-project/aztec-sandbox/): A package for setting up a local dev net, including a local Ethereum network, deployed rollup contracts and Aztec execution environment.
- [Aztec](./yarn-project/aztec/): A package for starting up local dev net modules, including a local 'sandbox' devnet, an Ethereum network, deployed rollup contracts and Aztec execution environment.
- [Aztec.js](./yarn-project/aztec.js/): A tool for interacting with the Aztec network. It communicates via the [Private Execution Environment (PXE)](./yarn-project/pxe/).
- [Example contracts](./yarn-project/noir-contracts/): Example contracts for the Aztec network, written in Noir.
- [End to end tests](./yarn-project/end-to-end/): Integration tests written in Typescript--a good reference for how to use the packages for specific tasks.
Expand Down
19 changes: 18 additions & 1 deletion aztec-up/bin/aztec
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail

$(dirname $0)/.aztec-run aztecprotocol/aztec-sandbox $@
# Call cli image if used with `aztec cli ...args`
if [ -n "${1-}" ] && [ "$1" != "--help" ]; then
if [ "$1" == "cli" ]; then
shift
$(dirname $0)/.aztec-run aztecprotocol/cli "$@"
elif [ "$1" == "sandbox" ]; then
$(dirname $0)/aztec-sandbox
else
$(dirname $0)/.aztec-run aztecprotocol/aztec "$@"
fi
else
# TODO - display help message
echo
echo "Using 'aztec' CLI:"
echo " aztec start <args> - Start aztec infrastructure components. See 'aztec start --help' for detailed command info."
echo " aztec sandbox - Run a local sandbox network (same as aztec-sandbox)."
echo " aztec cli <args> - Run the aztec client CLI. See 'aztec cli --help' for detailed command info."
fi
3 changes: 2 additions & 1 deletion aztec-up/bin/aztec-cli
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ set -euo pipefail

export ENV_VARS_TO_INJECT="PXE_URL PRIVATE_KEY DEBUG"
export PXE_URL=${PXE_URL:-"http://host.docker.internal:8080"}
export ETHEREUM_HOST=${ETHEREUM_HOST:-"http://host.docker.internal:8545"}

$(dirname $0)/.aztec-run aztecprotocol/cli $@
$(dirname $0)/.aztec-run aztecprotocol/cli $@
6 changes: 3 additions & 3 deletions aztec-up/bin/aztec-install
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function title() {
echo -e "${r}"
fi
echo -e "This will install the following scripts and update your PATH if necessary:"
echo -e " ${bold}${g}aztec${r} - launches various infrastructure subsystems (sequencer, prover, pxe, etc)."
echo -e " ${bold}${g}aztec${r} - launches various infrastructure subsystems (node, sequencer, prover, pxe, etc)."
echo -e " ${bold}${g}aztec-cli${r} - a command line tool for interfacing and experimenting with infrastructure."
echo -e " ${bold}${g}aztec-nargo${r} - aztec's build of nargo, the noir compiler toolchain."
echo -e " ${bold}${g}aztec-sandbox${r} - a wrapper around docker-compose that launches services needed for sandbox testing."
Expand Down Expand Up @@ -106,12 +106,12 @@ export DOCKER_CLI_HINTS=false

if [ -z "${SKIP_PULL:-}" ]; then
info "Pulling aztec version $VERSION..."
pull_container aztec-sandbox
pull_container aztec
pull_container cli
pull_container noir
fi

# Download the Docker Compose file. Used by aztec-sandbox.
# Download the Docker Compose file. Used by aztec.
curl -fsSL http://$INSTALL_HOST/docker-compose.yml -o $AZTEC_PATH/docker-compose.yml

function install_bin {
Expand Down
6 changes: 2 additions & 4 deletions aztec-up/bin/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ services:
ANVIL_PORT: ${ANVIL_PORT:-8545}

aztec:
image: "aztecprotocol/aztec-sandbox"
image: "aztecprotocol/aztec"
ports:
- "${AZTEC_NODE_PORT:-8079}:${AZTEC_NODE_PORT:-8079}"
- "${PXE_PORT:-8080}:${PXE_PORT:-8080}"
environment:
DEBUG: # Loaded from the user shell if explicitly set
Expand All @@ -32,7 +31,6 @@ services:
WS_BLOCK_CHECK_INTERVAL_MS: 50
PXE_BLOCK_POLLING_INTERVAL_MS: 50
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500
AZTEC_NODE_PORT: ${AZTEC_NODE_PORT:-8079}
PXE_PORT: ${PXE_PORT:-8080}
volumes:
- ./log:/usr/src/yarn-project/aztec-sandbox/log:rw
- ./log:/usr/src/yarn-project/aztec/log:rw
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 = 519fb4b40794eddecd686643b5ab62dacbb71d9e
parent = 88e7923ed2ecd747b65f72c5955016c6a1b80b9f
commit = 74d4bbd1c283af2f2c3b034c002fea3740c32705
parent = 9e6250aacbe2d47aa71dee9fa5e43c66eec73e75
method = merge
cmdver = 0.4.6
4 changes: 2 additions & 2 deletions boxes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Builds the boxes (they were copied into yarn-project-base so the cli can unbox).
# Produces a container that can be run to test a specific box. See docker-compose.yml.
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/aztec-sandbox AS aztec-sandbox
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/aztec AS aztec
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir as noir

# We need yarn. Start fresh container.
FROM node:18.19.0
COPY --from=aztec-sandbox /usr/src /usr/src
COPY --from=aztec /usr/src /usr/src
COPY --from=noir /usr/src/noir/target/release/nargo /usr/src/noir/target/release/nargo
WORKDIR /usr/src/boxes
ENV AZTEC_NARGO=/usr/src/noir/target/release/nargo
Expand Down
1 change: 1 addition & 0 deletions boxes/blank/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default (_, argv) => ({
crypto: false,
fs: false,
path: false,
events: require.resolve('events/'),
stream: require.resolve('stream-browserify'),
tty: require.resolve('tty-browserify'),
util: require.resolve('util/'),
Expand Down
2 changes: 1 addition & 1 deletion boxes/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
command: "'anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337'"

aztec:
image: aztecprotocol/aztec-sandbox
image: aztecprotocol/aztec
environment:
ETHEREUM_HOST: http://ethereum:8545
CHAIN_ID: 31337
Expand Down
5 changes: 2 additions & 3 deletions boxes/token/src/contracts/src/types/transparent_note.nr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use dep::aztec::{
note::{
note_header::NoteHeader,
note_interface::NoteInterface,
utils::compute_siloed_note_hash,
utils::compute_note_hash_for_read_or_nullify,
},
hash::{compute_secret_hash, pedersen_hash},
context::PrivateContext,
Expand Down Expand Up @@ -75,8 +75,7 @@ impl TransparentNote {
}

pub fn compute_nullifier_without_context(self) -> Field {
// TODO(#1386): should use `compute_note_hash_for_read_or_nullify` once public functions inject nonce!
let siloed_note_hash = compute_siloed_note_hash(TransparentNoteMethods, self);
let siloed_note_hash = compute_note_hash_for_read_or_nullify(TransparentNoteMethods, self);
// TODO(#1205) Should use a non-zero generator index.
pedersen_hash([self.secret, siloed_note_hash],0)
}
Expand Down
1 change: 1 addition & 0 deletions boxes/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ __metadata:
resolution: "@aztec/types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A."
dependencies:
"@aztec/ethereum": "workspace:^"
"@aztec/foundation": "workspace:^"
languageName: node
linkType: soft

Expand Down
10 changes: 5 additions & 5 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ yarn-project-prod:
- yarn-project
multiarch: buildx

aztec-sandbox:
aztec:
buildDir: yarn-project
projectDir: yarn-project/aztec-sandbox
projectDir: yarn-project/aztec
dependencies:
- yarn-project-prod
multiarch: buildx
Expand All @@ -175,18 +175,18 @@ cli:
boxes:
buildDir: boxes
dependencies:
- aztec-sandbox
- aztec
- noir
runDependencies:
- aztec-sandbox
- aztec

end-to-end:
buildDir: yarn-project
projectDir: yarn-project/end-to-end
dependencies:
- yarn-project
runDependencies:
- aztec-sandbox
- aztec

mainnet-fork:
buildDir: iac/mainnet-fork
Expand Down
15 changes: 0 additions & 15 deletions docs/docs/about_aztec/history/differences_to_aztec_connect.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/concepts/advanced/circuits/kernels/main.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/concepts/advanced/data_structures/main.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/concepts/advanced/main.md

This file was deleted.

Loading

0 comments on commit c084d7a

Please sign in to comment.