Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5e205d0
add wasm build step to circleci
spypsy Mar 28, 2023
8c8860b
update wasm proj name
spypsy Mar 28, 2023
5572e48
local build
spypsy Mar 28, 2023
455bbac
add defaults config to wasm build
spypsy Mar 29, 2023
00546dc
try cond_spot_run_build again
spypsy Mar 29, 2023
b798b7a
64 not 4
spypsy Mar 29, 2023
98aaa2e
cp instead of COPY
spypsy Mar 29, 2023
2d7f86c
cp as part of yarn bb.js yarn build
spypsy Mar 29, 2023
165e83f
Merge branch 'master' into sp/wasm-build
spypsy Mar 29, 2023
3681a4d
fix dirs
spypsy Mar 29, 2023
5abb83e
merge conflicts
spypsy Mar 29, 2023
4504a61
update merkle-tree dockerfile
spypsy Mar 29, 2023
4fc0c17
fix formatting
spypsy Mar 29, 2023
acfe99e
fix yarn.lock
spypsy Mar 29, 2023
2ebc74a
add bb.js to build_manifest
spypsy Mar 29, 2023
1589553
trying to force rebuild on everything
spypsy Mar 29, 2023
e2d187f
force rebuild...
spypsy Mar 29, 2023
854176b
force rebuild on dockerfiles
spypsy Mar 29, 2023
f190c13
use correct images, build e2e
spypsy Mar 29, 2023
f2152de
fix circuits img ref
spypsy Mar 29, 2023
31d681b
add merkle-tree job
spypsy Mar 29, 2023
05e9775
fix tag in build_manifest
spypsy Mar 29, 2023
aedb4be
fix name in config.yml
spypsy Mar 29, 2023
6889e54
try specific img tag
spypsy Mar 29, 2023
bcbf9e7
revert to eu-west-2
spypsy Mar 29, 2023
d6d0043
fix formatting issues
spypsy Mar 29, 2023
ba91938
appease merkle-tree linter
spypsy Mar 29, 2023
03069b9
try yarn install inside e2e dockerfile
spypsy Mar 29, 2023
7b4cf8e
revert build manifest
spypsy Mar 29, 2023
191c68c
merge with master
spypsy Mar 29, 2023
1f297be
fix config yml
spypsy Mar 29, 2023
c323998
remove force rebuild
spypsy Mar 29, 2023
cbf90c6
fix: style
ludamad Mar 29, 2023
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
14 changes: 13 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build circuits-wasm-linux-clang 64
command: cond_spot_run_build aztec3-circuits-wasm-linux-clang 64
yarn-project-base:
machine:
image: ubuntu-2004:202010-01
Expand Down Expand Up @@ -135,6 +135,17 @@ jobs:
name: "Build and test"
command: build world-state

merkle-tree:
machine:
image: ubuntu-2004:202010-01
resource_class: large
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: build merkle-tree

end-to-end:
machine:
image: ubuntu-2004:202010-01
Expand Down Expand Up @@ -208,4 +219,5 @@ workflows:
<<: *defaults
- e2e-deploy-contract: *e2e_test
- world-state: *yarn_project
- merkle-tree: *yarn_project
- noir-contracts: *yarn_project
13 changes: 10 additions & 3 deletions build_manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"circuits-wasm-linux-clang": {
"aztec3-circuits-wasm-linux-clang": {
"buildDir": "circuits/cpp",
"dockerfile": "dockerfiles/Dockerfile.wasm-linux-clang",
"rebuildPatterns": ["^circuits/"],
Expand Down Expand Up @@ -73,11 +73,18 @@
"rebuildPatterns": ["^yarn-project/aztec.js/"],
"dependencies": ["aztec-rpc"]
},
"barretenberg.js": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/barretenberg.js",
"dockerfile": "aztec.js/Dockerfile",
"rebuildPatterns": ["^yarn-project/barretenberg.js/"],
"dependencies": []
},
"end-to-end": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/end-to-end",
"dockerfile": "end-to-end/Dockerfile",
"rebuildPatterns": ["^yarn-project/end-to-end/"],
"rebuildPatterns": ["^yarn-project/end-to-end/"],
"dependencies": ["aztec.js", "noir-contracts"]
},
"ethereum.js": {
Expand Down Expand Up @@ -120,7 +127,7 @@
"projectDir": "yarn-project/merkle-tree",
"dockerfile": "merkle-tree/Dockerfile",
"rebuildPatterns": ["^yarn-project/merkle-tree/"],
"dependencies": ["foundation"]
"dependencies": ["foundation", "barretenberg.js"]
},
"noir-contracts": {
"buildDir": "yarn-project",
Expand Down
2 changes: 1 addition & 1 deletion circuits
10 changes: 9 additions & 1 deletion yarn-project/end-to-end/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder

COPY . .
RUN cd merkle-tree && yarn build
RUN cd aztec.js && yarn build
RUN cd noir-contracts && yarn build
WORKDIR /usr/src/yarn-project/end-to-end
RUN yarn formatting
RUN yarn build
# RUN yarn formatting

# copy bb.js wasm binaries
WORKDIR /usr/src/yarn-project/barretenberg.js
RUN cp /usr/src/aztec3-circuits/cpp/build-wasm/bin/aztec3-circuits.wasm dest/wasm/barretenberg.wasm

# copy bb.js wasm binaries
WORKDIR /usr/src/yarn-project/barretenberg.js
Expand All @@ -17,5 +23,7 @@ RUN yarn workspaces focus --production > /dev/null
FROM node:18-alpine
RUN apk update && apk add --no-cache curl jq bash
COPY --from=builder /usr/src/yarn-project /usr/src/yarn-project
WORKDIR /usr/src/yarn-project/
RUN yarn install
WORKDIR /usr/src/yarn-project/end-to-end
ENTRYPOINT ["yarn", "test"]
6 changes: 3 additions & 3 deletions yarn-project/merkle-tree/src/indexed_tree/indexed_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ export class IndexedTree implements MerkleTree {
: undefined;
}

public async getLeafValue(index: bigint): Promise<Buffer | undefined> {
public getLeafValue(index: bigint): Promise<Buffer | undefined> {
const leaf = this.getLatestLeafDataCopy(Number(index));
if (!leaf) return undefined;
return toBufferBE(leaf.value, 32);
if (!leaf) return Promise.resolve(undefined);
return Promise.resolve(toBufferBE(leaf.value, 32));
}
}
4 changes: 2 additions & 2 deletions yarn-project/merkle-tree/src/standard_tree/standard_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ export class StandardMerkleTree implements MerkleTree {
return Promise.resolve();
}

public async getLeafValue(index: bigint): Promise<Buffer | undefined> {
return this.getLatestValueAtIndex(this.depth, index);
public getLeafValue(index: bigint): Promise<Buffer | undefined> {
return Promise.resolve(this.getLatestValueAtIndex(this.depth, index));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/yarn-project-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/circuits-x86_64-linux-clang
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/circuits-wasm-linux-clang
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/aztec3-circuits-wasm-linux-clang
# FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/l1-contracts

FROM node:18-alpine
Expand Down
62 changes: 31 additions & 31 deletions yarn-project/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1137,33 +1137,33 @@ __metadata:
linkType: hard

"@eslint-community/regexpp@npm:^4.4.0":
version: 4.4.1
resolution: "@eslint-community/regexpp@npm:4.4.1"
checksum: db97d8d08e784147b55ab0dda5892503c1a0eebad94d1c4646d89a94f02ca70b25f05d8e021fc05a075e7eb312e03e21f63d84f0b327719f8cf3bb64e66917cb
version: 4.5.0
resolution: "@eslint-community/regexpp@npm:4.5.0"
checksum: 99c01335947dbd7f2129e954413067e217ccaa4e219fe0917b7d2bd96135789384b8fedbfb8eb09584d5130b27a7b876a7150ab7376f51b3a0c377d5ce026a10
languageName: node
linkType: hard

"@eslint/eslintrc@npm:^2.0.1":
version: 2.0.1
resolution: "@eslint/eslintrc@npm:2.0.1"
"@eslint/eslintrc@npm:^2.0.2":
version: 2.0.2
resolution: "@eslint/eslintrc@npm:2.0.2"
dependencies:
ajv: ^6.12.4
debug: ^4.3.2
espree: ^9.5.0
espree: ^9.5.1
globals: ^13.19.0
ignore: ^5.2.0
import-fresh: ^3.2.1
js-yaml: ^4.1.0
minimatch: ^3.1.2
strip-json-comments: ^3.1.1
checksum: 56b9192a687a450db53a7b883daf9f0f447c43b3510189cf88808a7a2467c2a302a42a50f184cc6d5a9faf3d1df890a2ef0fd0d60b751f32a3e9dfea717c6b48
checksum: cfcf5e12c7b2c4476482e7f12434e76eae16fcd163ee627309adb10b761e5caa4a4e52ed7be464423320ff3d11eca5b50de5bf8be3e25834222470835dd5c801
languageName: node
linkType: hard

"@eslint/js@npm:8.36.0":
version: 8.36.0
resolution: "@eslint/js@npm:8.36.0"
checksum: b7d6b84b823c8c7784be390741196617565527b1f7c0977fde9455bfb57fd88f81c074a03dd878757d2c33fa29f24291e9ecbc1425710f067917324b55e1bf3a
"@eslint/js@npm:8.37.0":
version: 8.37.0
resolution: "@eslint/js@npm:8.37.0"
checksum: 7a07fb085c94ce1538949012c292fd3a6cd734f149bc03af6157dfbd8a7477678899ef57b4a27e15b36470a997389ad79a0533d5880c71e67720ae1a7de7c62d
languageName: node
linkType: hard

Expand Down Expand Up @@ -2318,9 +2318,9 @@ __metadata:
linkType: hard

"@types/node@npm:*, @types/node@npm:^18.14.6, @types/node@npm:^18.15.0, @types/node@npm:^18.15.2, @types/node@npm:^18.15.3, @types/node@npm:^18.7.23":
version: 18.15.10
resolution: "@types/node@npm:18.15.10"
checksum: 9aeae0b683eda82892def5315812bdee3f1a28c4898b7e70f8e2514564538b16c4dccbe8339c1266f8fc1d707a48f152689264a854f5ebc2eba5011e793612d9
version: 18.15.11
resolution: "@types/node@npm:18.15.11"
checksum: 977b4ad04708897ff0eb049ecf82246d210939c82461922d20f7d2dcfd81bbc661582ba3af28869210f7e8b1934529dcd46bff7d448551400f9d48b9d3bddec3
languageName: node
linkType: hard

Expand Down Expand Up @@ -3710,9 +3710,9 @@ __metadata:
linkType: hard

"electron-to-chromium@npm:^1.4.284":
version: 1.4.341
resolution: "electron-to-chromium@npm:1.4.341"
checksum: b97377e4e622266953da2c92276b9c0a948ab7e8a0a9c9947da340269f8eb959b8678f76158b78b473a56912c697d89e37a93d82b4d2db84f622e9be7850a540
version: 1.4.342
resolution: "electron-to-chromium@npm:1.4.342"
checksum: 61ecf9f3ea65a6044cdcea092dd56b42d0961fdb8fb3942ba808c6aa6ab3213d3218e599748d6d6ae8b43ddc9f76f428af0b96eaee2f0b4b2f0195c643f36f3d
languageName: node
linkType: hard

Expand Down Expand Up @@ -3961,21 +3961,21 @@ __metadata:
languageName: node
linkType: hard

"eslint-visitor-keys@npm:^3.3.0":
"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.0":
version: 3.4.0
resolution: "eslint-visitor-keys@npm:3.4.0"
checksum: 33159169462d3989321a1ec1e9aaaf6a24cc403d5d347e9886d1b5bfe18ffa1be73bdc6203143a28a606b142b1af49787f33cff0d6d0813eb5f2e8d2e1a6043c
languageName: node
linkType: hard

"eslint@npm:^8.21.0, eslint@npm:^8.35.0":
version: 8.36.0
resolution: "eslint@npm:8.36.0"
version: 8.37.0
resolution: "eslint@npm:8.37.0"
dependencies:
"@eslint-community/eslint-utils": ^4.2.0
"@eslint-community/regexpp": ^4.4.0
"@eslint/eslintrc": ^2.0.1
"@eslint/js": 8.36.0
"@eslint/eslintrc": ^2.0.2
"@eslint/js": 8.37.0
"@humanwhocodes/config-array": ^0.11.8
"@humanwhocodes/module-importer": ^1.0.1
"@nodelib/fs.walk": ^1.2.8
Expand All @@ -3986,8 +3986,8 @@ __metadata:
doctrine: ^3.0.0
escape-string-regexp: ^4.0.0
eslint-scope: ^7.1.1
eslint-visitor-keys: ^3.3.0
espree: ^9.5.0
eslint-visitor-keys: ^3.4.0
espree: ^9.5.1
esquery: ^1.4.2
esutils: ^2.0.2
fast-deep-equal: ^3.1.3
Expand All @@ -4014,18 +4014,18 @@ __metadata:
text-table: ^0.2.0
bin:
eslint: bin/eslint.js
checksum: e9a961fc3b3de5cff5a1cb2c92eeffaa7e155a715489e30b3e1e76f186bd1255e0481e09564f2094733c0b1dbd3453499fb72ae7c043c83156e11e6d965b2304
checksum: 80f3d5cdce2d671f4794e392d234a78d039c347673defb0596268bd481e8f30a53d93c01ff4f66a546c87d97ab4122c0e9cafe1371f87cb03cee6b7d5aa97595
languageName: node
linkType: hard

"espree@npm:^9.5.0":
version: 9.5.0
resolution: "espree@npm:9.5.0"
"espree@npm:^9.5.1":
version: 9.5.1
resolution: "espree@npm:9.5.1"
dependencies:
acorn: ^8.8.0
acorn-jsx: ^5.3.2
eslint-visitor-keys: ^3.3.0
checksum: a7f110aefb6407e0d3237aa635ab3cea87106ae63748dd23c67031afccc640d04c4209fca2daf16e2233c82efb505faead0fb84097478fd9cc6e8f8dd80bf99d
eslint-visitor-keys: ^3.4.0
checksum: cdf6e43540433d917c4f2ee087c6e987b2063baa85a1d9cdaf51533d78275ebd5910c42154e7baf8e3e89804b386da0a2f7fad2264d8f04420e7506bf87b3b88
languageName: node
linkType: hard

Expand Down