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

Aztec.js and AztecRPCServer. #80

Merged
merged 29 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
380d22f
Update e2e test.
LeilaWang Mar 22, 2023
4518add
Aztec.js and AztecRPCServer. (#67)
LeilaWang Mar 23, 2023
4d1a273
Use pre-generated abi in e2e.
LeilaWang Mar 23, 2023
3737921
Merge branch 'master' into milestone/1_1
LeilaWang Mar 23, 2023
b079ab9
Update yarn.lock.
LeilaWang Mar 23, 2023
032f3b9
Use aztec-node in aztec-rpc.
LeilaWang Mar 23, 2023
a33b6a0
Update dockerfiles.
LeilaWang Mar 23, 2023
a1a9b3f
Fix dependencies.
LeilaWang Mar 23, 2023
f0da189
Update dockerfile.
LeilaWang Mar 24, 2023
275edd4
Update build manifest.
LeilaWang Mar 24, 2023
6200935
Cleanup.
LeilaWang Mar 24, 2023
6abfaea
Merge remote-tracking branch 'origin/master' into milestone/1_1
LeilaWang Mar 24, 2023
5c8f451
Interface changes.
LeilaWang Mar 24, 2023
70d149f
Merge remote-tracking branch 'origin/master' into milestone/1_1
LeilaWang Mar 24, 2023
70a0d5c
Fix.
LeilaWang Mar 24, 2023
876e6a0
Fix.
LeilaWang Mar 24, 2023
9fb10ec
Update eslintrc source.
LeilaWang Mar 24, 2023
f8be5b3
feat(sim): added skeleton of simulators to the aztec rpc server (#73)
sirasistant Mar 24, 2023
b9f1420
chore: master => milestone1-1 (#78)
ludamad Mar 25, 2023
1714f9d
Fix merge.
LeilaWang Mar 25, 2023
5247fc8
Remove formatting from build script.
LeilaWang Mar 25, 2023
abae68f
Merge remote-tracking branch 'origin/master' into milestone/1_1
LeilaWang Mar 25, 2023
442c265
Mark contract as deployed when block is settled.
LeilaWang Mar 26, 2023
6003f81
Update ts ref.
LeilaWang Mar 26, 2023
5a23e3f
Revert test.
LeilaWang Mar 26, 2023
174e080
Update build manifest.
LeilaWang Mar 26, 2023
d6a1970
Fix.
LeilaWang Mar 26, 2023
14bc946
Fix.
LeilaWang Mar 26, 2023
92b1f9a
Empty test.
LeilaWang Mar 26, 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ The Aztec 3 system consists of the following sub projects.
- `acir-simulator`
- `archiver`
- `aztec-cli`
- `aztec-rpc`
- `aztec.js`
- `ethereum.js`
- `kernel-simulator`
- `kernel-prover`
- `key-store`
- `l1-contracts`
- `p2p`
- `prover-client`
- `aztec-node`
- `sequencer-client`
- `wallet`
17 changes: 7 additions & 10 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,20 @@ cd ../..

# We only bootstrap projects that produce artefacts needed for running end-to-end tests.
PROJECTS=(
# "circuits:./bootstrap.sh db_cli rollup_cli"
# "yarn-project/acir-simulator:yarn build"
# "yarn-project/aztec-cli:yarn build"
"yarn-project/foundation:yarn build"
"yarn-project/l1-contracts:yarn build"
"yarn-project/aztec.js:yarn build"
"yarn-project/ethereum.js:yarn build"
"yarn-project/archiver:yarn build"
# "yarn-project/kernel-simulator:yarn build"
"yarn-project/key-store:yarn build"
"yarn-project/merkle-tree:yarn build"
"yarn-project/p2p:yarn build"
# "yarn-project/prover-client:yarn build"
# "yarn-project/wallet:yarn build"
"yarn-project/archiver:yarn build"
"yarn-project/world-state:yarn build"
"yarn-project/p2p:yarn build"
"yarn-project/sequencer-client:yarn build"
"yarn-project/aztec-node:yarn build"
"yarn-project/key-store:yarn build"
"yarn-project/acir-simulator:yarn build"
"yarn-project/kernel-prover:yarn build"
"yarn-project/aztec-rpc:yarn build"
"yarn-project/aztec.js:yarn build"
)

for E in "${PROJECTS[@]}"; do
Expand Down
45 changes: 22 additions & 23 deletions build_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,28 @@
"projectDir": "yarn-project/aztec-cli",
"dockerfile": "aztec-cli/Dockerfile",
"rebuildPatterns": ["^yarn-project/aztec-cli/"],
"dependencies": ["yarn-project-base"]
"dependencies": ["aztec.js"]
},
"aztec-rpc": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/aztec-rpc",
"dockerfile": "aztec-rpc/Dockerfile",
"rebuildPatterns": ["^yarn-project/aztec-rpc/"],
"dependencies": ["aztec-node"]
},
"aztec.js": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/aztec.js",
"dockerfile": "aztec.js/Dockerfile",
"rebuildPatterns": ["^yarn-project/aztec.js/"],
"dependencies": ["yarn-project-base", "foundation"]
"dependencies": ["aztec-rpc"]
},
"end-to-end": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/end-to-end",
"dockerfile": "end-to-end/Dockerfile",
"rebuildPatterns": ["^yarn-project/end-to-end/"],
"dependencies": ["yarn-project-base", "foundation"]
"dependencies": ["aztec.js"]
},
"ethereum.js": {
"buildDir": "yarn-project",
Expand All @@ -80,11 +87,18 @@
"rebuildPatterns": ["^yarn-project/ethereum.js/"],
"dependencies": ["yarn-project-base", "foundation"]
},
"kernel-simulator": {
"foundation": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/foundation",
"dockerfile": "foundation/Dockerfile",
"rebuildPatterns": ["^yarn-project/foundation/"],
"dependencies": []
},
"kernel-prover": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/kernel-simulator",
"dockerfile": "kernel-simulator/Dockerfile",
"rebuildPatterns": ["^yarn-project/kernel-simulator/"],
"projectDir": "yarn-project/kernel-prover",
"dockerfile": "kernel-prover/Dockerfile",
"rebuildPatterns": ["^yarn-project/kernel-prover/"],
"dependencies": ["yarn-project-base"]
},
"key-store": {
Expand All @@ -94,13 +108,6 @@
"rebuildPatterns": ["^yarn-project/key-store/"],
"dependencies": ["yarn-project-base"]
},
"foundation": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/foundation",
"dockerfile": "foundation/Dockerfile",
"rebuildPatterns": ["^yarn-project/foundation/"],
"dependencies": ["yarn-project-base"]
},
"merkle-tree": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/merkle-tree",
Expand Down Expand Up @@ -140,8 +147,7 @@
"world-state",
"p2p",
"sequencer-client",
"ethereum.js",
"circuits.js"
"ethereum.js"
]
},
"sequencer-client": {
Expand All @@ -157,13 +163,6 @@
"archiver"
]
},
"wallet": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/wallet",
"dockerfile": "wallet/Dockerfile",
"rebuildPatterns": ["^yarn-project/wallet/"],
"dependencies": ["yarn-project-base"]
},
"world-state": {
"buildDir": "yarn-project",
"projectDir": "yarn-project/world-state",
Expand Down
4 changes: 2 additions & 2 deletions build_manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ PROJECTS=(
# acir-simulator:yarn-project
# archiver:yarn-project
# aztec-cli:yarn-project
# aztec-rpc:yarn-project
# aztec.js:yarn-project
# end-to-end:yarn-project
# ethereum.js:yarn-project
# kernel-simulator:yarn-project
# kernel-prover:yarn-project
# key-store:yarn-project
# merkle-tree:yarn-project
# p2p:yarn-project
# prover-client:yarn-project
# aztec-node:yarn-project
# sequencer-client:yarn-project
# wallet:yarn-project
# world-state:yarn-project
)
2 changes: 1 addition & 1 deletion yarn-project/acir-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tsconfig": "./tsconfig.dest.json"
},
"scripts": {
"build": "yarn clean && yarn formatting && tsc -b tsconfig.dest.json",
"build": "yarn clean && tsc -b tsconfig.dest.json",
"build:dev": "tsc -b tsconfig.dest.json --watch",
"clean": "rm -rf ./dest .tsbuildinfo",
"formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src",
Expand Down
31 changes: 31 additions & 0 deletions yarn-project/acir-simulator/src/acvm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { AztecAddress, CallContext, ContractDeploymentData } from './circuits.js';
import { NoteLoadOracleInputs } from './db_oracle.js';

export interface ACIRCallback {
getSecretKey(keyId: Buffer): Promise<Buffer>;
getNotes(storageSlot: Buffer): Promise<NoteLoadOracleInputs[]>;
getRandomField(): Promise<Buffer>;
privateFunctionCall(
contractAddress: AztecAddress,
functionSelector: string,
args: Array<Buffer>,
): Promise<Array<Buffer>>;
}

export interface ExecutionPreimages {
newNotes: Buffer[];
nullifiedNotes: Buffer[];
}

export interface ACIRExecutionResult {
preimages: ExecutionPreimages;
partialWitness: Buffer;
}

export type execute = (
acir: Buffer,
args: Array<Buffer>,
callContext: CallContext,
contractDeploymentData: ContractDeploymentData,
oracle: ACIRCallback,
) => Promise<ACIRExecutionResult>;
Loading