From 8e8daffcaacbe25e6d1aeb299bf6e7fef86409e6 Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 17 Apr 2023 15:45:38 -0400 Subject: [PATCH] chore: force build --- .gitmodules | 8 +- bootstrap.sh | 30 +-- build_manifest.sh | 2 +- circuits/LICENSE | 201 ------------------ circuits/PROJECT | 1 - circuits/README.md | 142 +++++++------ circuits/VERSION | 1 - circuits/bootstrap_docker.sh | 1 + circuits/build-system | 1 - circuits/cpp/CMakeLists.txt | 2 +- .../dockerfiles/Dockerfile.arm64-linux-gcc | 2 +- .../dockerfiles/Dockerfile.wasm-linux-clang | 10 +- .../Dockerfile.wasm-linux-clang-assert | 8 +- .../dockerfiles/Dockerfile.x86_64-linux-clang | 4 +- .../Dockerfile.x86_64-linux-clang-assert | 6 +- .../dockerfiles/Dockerfile.x86_64-linux-gcc | 4 +- circuits/cpp/scripts/run_tests | 10 +- .../cpp/src/aztec3/circuits/abis/c_bind.cpp | 2 - .../aztec3/circuits/rollup/merge/utils.cpp | 1 + scripts/tmux-splits | 2 +- yarn-project/circuits.js/README.md | 3 +- yarn-project/yarn-project-base/Dockerfile | 9 +- 22 files changed, 113 insertions(+), 337 deletions(-) delete mode 100644 circuits/LICENSE delete mode 100644 circuits/PROJECT delete mode 100644 circuits/VERSION delete mode 160000 circuits/build-system diff --git a/.gitmodules b/.gitmodules index 241af58f6f0..49f18b7f55c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "build-system"] path = build-system url = git@github.com:AztecProtocol/build-system.git -[submodule "circuits"] - path = circuits - url = git@github.com:AztecProtocol/aztec3-circuits.git [submodule "l1-contracts"] path = l1-contracts url = git@github.com:AztecProtocol/aztec3-l1-contracts.git [submodule "barretenberg"] - path = barretenberg + path = circuits/cpp/barretenberg url = git@github.com:AztecProtocol/barretenberg.git +[submodule "legacy-nested-build-system"] + path = circuits/build-system + url = git@github.com:AztecProtocol/build-system.git \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh index e4eb6b01ce3..ba245880ae9 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -47,37 +47,9 @@ nvm install # Until we push .yarn/cache, we still need to install. cd yarn-project yarn install --immutable +# We do not need to build individual packages, yarn build will build the root tsconfig.json yarn build cd .. -PROJECTS=( - "yarn-project/foundation:yarn build" - "yarn-project/ethereum.js:yarn build" - "yarn-project/l1-contracts:yarn build" - "yarn-project/types:yarn build" - "yarn-project/merkle-tree: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" - "yarn-project/noir-contracts:yarn build" -) - -for E in "${PROJECTS[@]}"; do - ARR=(${E//:/ }) - DIR=${ARR[0]} - COMMAND=${ARR[@]:1} - echo "Bootstrapping $DIR: $COMMAND" - pushd $DIR > /dev/null - $COMMAND - popd > /dev/null -done - echo echo "Success! You could now run e.g.: ./scripts/tmux-splits e2e_deploy_contract" diff --git a/build_manifest.sh b/build_manifest.sh index be49f674bc3..c40d19cb5b9 100755 --- a/build_manifest.sh +++ b/build_manifest.sh @@ -13,7 +13,7 @@ # commit them, so that the most important build path remains fast and simple. PROJECTS=( - circuits:circuits/cpp:./dockerfiles/Dockerfile.wasm-linux-clang:aztec3-circuits-wasm-linux-clang + circuits:circuits/cpp:./dockerfiles/Dockerfile.wasm-linux-clang:circuits-wasm-linux-clang yarn-project-base:yarn-project # barretenberg.js:yarn-project end-to-end:yarn-project diff --git a/circuits/LICENSE b/circuits/LICENSE deleted file mode 100644 index 261eeb9e9f8..00000000000 --- a/circuits/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/circuits/PROJECT b/circuits/PROJECT deleted file mode 100644 index 8767aaf2272..00000000000 --- a/circuits/PROJECT +++ /dev/null @@ -1 +0,0 @@ -aztec3-circuits \ No newline at end of file diff --git a/circuits/README.md b/circuits/README.md index 4543cc57a76..bb2577d9d75 100644 --- a/circuits/README.md +++ b/circuits/README.md @@ -4,39 +4,41 @@ ## Repository Overview -The [`aztec3-circuits`](https://github.com/AztecProtocol/aztec3-circuits) repository contains circuits and related C++ code (`cpp/`) for Aztec3 along with Typescript wrappers (`ts/`). +The [`aztec3-circpuits`](https://github.com/AztecProtocol/aztec3-packages) circuits folder contains circuits and related C++ code (`cpp/`) for Aztec3 along with Typescript wrappers (`ts/`). ### Resources -* [Circuits project board](https://github.com/orgs/AztecProtocol/projects/22/views/2) -* [[DO NOT EDIT] Diagram with pseudocode for circuits](https://miro.com/app/board/uXjVPlafJWM=/) - * This diagram's contents are likely more up-to-date than code and than the other links below -* Kernel circuits - * [Slides - Dive into Kernel Circuits](https://drive.google.com/file/d/1BaspihHDUgny6MHAKMtTkWKvfah7PYtv/view?usp=share_link) - * [Recording of presentation](https://drive.google.com/file/d/1Uh-vLdc1_rsMUHL_c4HZ93jrjpuDsqD3/view?usp=share_link) - * [Kernel circuit mentioned in M1.1 Contract Deployment document](https://hackmd.io/ouVCnacHQRq2o1oRc5ksNA#Kernel-Circuit-functionality) - * [More info on the kernel circuit for Contract Creation](https://hackmd.io/@aztec-network/rkyRaXqPj#Kernel-Circuit-Logic) - * _Note:_ [Base rollup circuits in Aztec Connect](https://github.com/AztecProtocol/aztec-connect-cpp/tree/defi-bridge-project/src/rollup/proofs/rollup) are relevant to kernel circuits -* Rollup circuits - * [Rollup circuit mentioned in M1.1 Contract Deployment document](https://hackmd.io/ouVCnacHQRq2o1oRc5ksNA#Rollup-Circuit-functionality) - * [More info on the rollup circuit for Contract Creation](https://hackmd.io/@aztec-network/rkyRaXqPj#Rollup-Circuit-Logic) - * [Rollup circuits in Aztec Connect](https://github.com/AztecProtocol/aztec-connect-cpp/tree/defi-bridge-project/src/rollup/proofs) - * [[DO NOT EDIT] Diagram with different options for merkle insertions in rollup circuits](https://miro.com/app/board/uXjVMfITC3c=/) -* [Outdated specs](https://github.com/AztecProtocol/aztec2-internal/blob/3.0/markdown/specs/aztec3/src/SUMMARY.md) -* [Explanation of Indexed Merkle Tree (for nullifiers)](https://hackmd.io/AjR1uGh8SzSc7k3Gcu02mQ) +- [Circuits project board](https://github.com/orgs/AztecProtocol/projects/22/views/2) +- [[DO NOT EDIT] Diagram with pseudocode for circuits](https://miro.com/app/board/uXjVPlafJWM=/) + - This diagram's contents are likely more up-to-date than code and than the other links below +- Kernel circuits + - [Slides - Dive into Kernel Circuits](https://drive.google.com/file/d/1BaspihHDUgny6MHAKMtTkWKvfah7PYtv/view?usp=share_link) + - [Recording of presentation](https://drive.google.com/file/d/1Uh-vLdc1_rsMUHL_c4HZ93jrjpuDsqD3/view?usp=share_link) + - [Kernel circuit mentioned in M1.1 Contract Deployment document](https://hackmd.io/ouVCnacHQRq2o1oRc5ksNA#Kernel-Circuit-functionality) + - [More info on the kernel circuit for Contract Creation](https://hackmd.io/@aztec-network/rkyRaXqPj#Kernel-Circuit-Logic) + - _Note:_ [Base rollup circuits in Aztec Connect](https://github.com/AztecProtocol/aztec-connect-cpp/tree/defi-bridge-project/src/rollup/proofs/rollup) are relevant to kernel circuits +- Rollup circuits + - [Rollup circuit mentioned in M1.1 Contract Deployment document](https://hackmd.io/ouVCnacHQRq2o1oRc5ksNA#Rollup-Circuit-functionality) + - [More info on the rollup circuit for Contract Creation](https://hackmd.io/@aztec-network/rkyRaXqPj#Rollup-Circuit-Logic) + - [Rollup circuits in Aztec Connect](https://github.com/AztecProtocol/aztec-connect-cpp/tree/defi-bridge-project/src/rollup/proofs) + - [[DO NOT EDIT] Diagram with different options for merkle insertions in rollup circuits](https://miro.com/app/board/uXjVMfITC3c=/) +- [Outdated specs](https://github.com/AztecProtocol/aztec2-internal/blob/3.0/markdown/specs/aztec3/src/SUMMARY.md) +- [Explanation of Indexed Merkle Tree (for nullifiers)](https://hackmd.io/AjR1uGh8SzSc7k3Gcu02mQ) ### Getting Started with C++ Clone the repo and build the C++: + ``` -git clone git@github.com:AztecProtocol/aztec3-circuits.git -cd aztec3-circuits +git clone git@github.com:AztecProtocol/aztec3-packages.git +cd circuits git submodule update --init --recursive cd cpp ./bootstrap.sh ``` Here is an example of rapidly rebuilding and running all tests in `src/aztec3/circuits/abis/tests`: + ``` cmake --preset clang15 cmake --build --preset clang15 --target aztec3_circuits_abis_tests @@ -44,6 +46,7 @@ cmake --build --preset clang15 --target aztec3_circuits_abis_tests ``` You can also limit it to run only specific test cases using a gtest filter: + ``` (cd build && ./bin/aztec3_circuits_abis_tests --gtest_filter=*hash_tx_request*) ``` @@ -51,38 +54,44 @@ You can also limit it to run only specific test cases using a gtest filter: --- Here's a list of the tests currently available (conveniently combined with the command to build, then execute them, for easy copy-pasta): - - aztec3_circuits_abis_tests - - `cmake --build --preset clang15 --target aztec3_circuits_abis_tests && (cd build && ./bin/aztec3_circuits_abis_tests --gtest_filter=*)` - - aztec3_circuits_apps_tests - - `cmake --build --preset clang15 --target aztec3_circuits_apps_tests && (cd build && ./bin/aztec3_circuits_apps_tests --gtest_filter=*)` +- aztec3_circuits_abis_tests + + - `cmake --build --preset clang15 --target aztec3_circuits_abis_tests && (cd build && ./bin/aztec3_circuits_abis_tests --gtest_filter=*)` + +- aztec3_circuits_apps_tests + + - `cmake --build --preset clang15 --target aztec3_circuits_apps_tests && (cd build && ./bin/aztec3_circuits_apps_tests --gtest_filter=*)` + +- aztec3_circuits_kernel_tests - - aztec3_circuits_kernel_tests - - `cmake --build --preset clang15 --target aztec3_circuits_kernel_tests && (cd build && ./bin/aztec3_circuits_kernel_tests --gtest_filter=*)` + - `cmake --build --preset clang15 --target aztec3_circuits_kernel_tests && (cd build && ./bin/aztec3_circuits_kernel_tests --gtest_filter=*)` - - aztec3_circuits_recursion_tests - - `cmake --build --preset clang15 --target aztec3_circuits_recursion_tests && (cd build && ./bin/aztec3_circuits_recursion_tests --gtest_filter=*)` +- aztec3_circuits_recursion_tests - - aztec3_circuits_rollup_tests - - `cmake --build --preset clang15 --target aztec3_circuits_rollup_tests && (cd build && ./bin/aztec3_circuits_rollup_tests --gtest_filter=*)` + - `cmake --build --preset clang15 --target aztec3_circuits_recursion_tests && (cd build && ./bin/aztec3_circuits_recursion_tests --gtest_filter=*)` + +- aztec3_circuits_rollup_tests + - `cmake --build --preset clang15 --target aztec3_circuits_rollup_tests && (cd build && ./bin/aztec3_circuits_rollup_tests --gtest_filter=*)` --- ### C++ Repository Layout + This repository submodules [`barretenberg`](https://github.com/AztecProtocol/barretenberg) as a C++ library containing proving systems and utilities at `cpp/barretenberg/`. The core Aztec 3 C++ code lives in `cpp/src/aztec3/`, and is split into the following subdirectories/files: -* `constants.hpp`: top-level constants relevant to Aztec 3 -* `circuits`: circuits and their types and interfaces - * `apps`: infrastructure and early prototypes for application circuits ([more here](https://github.com/AztecProtocol/aztec3-circuits/tree/master/cpp/src/aztec3/circuits/apps)) - * `abis`: types, interfaces, and cbinds for representing/constructing outputs of application circuits that will be fed into kernel circuits ([more here](https://github.com/AztecProtocol/aztec3-circuits/tree/master/cpp/src/aztec3/circuits/abis)) - * `kernel`: kernel circuits, their interfaces, and their tests - * `rollup`: rollup circuits, their interfaces, and thier tests - * `recursion`: types and examples for aggregation of recursive proof objects - * `mock`: mock circuits -* `oracle`: used to fetch external information (like private data notes) and inject them as inputs into the circuit "Composer" during execution of circuit logic ([more here](https://github.com/AztecProtocol/aztec3-circuits/tree/master/cpp/src/aztec3/oracle)) -* `dbs`: database infrastructure (_e.g._ PrivateStateDb) +- `constants.hpp`: top-level constants relevant to Aztec 3 +- `circuits`: circuits and their types and interfaces + - `apps`: infrastructure and early prototypes for application circuits ([more here](https://github.com/AztecProtocol/aztec3-packages/tree/master/circuits/cpp/src/aztec3/circuits/apps)) + - `abis`: types, interfaces, and cbinds for representing/constructing outputs of application circuits that will be fed into kernel circuits ([more here](https://github.com/AztecProtocol/aztec3-packages/tree/master/circuits/cpp/src/aztec3/circuits/abis)) + - `kernel`: kernel circuits, their interfaces, and their tests + - `rollup`: rollup circuits, their interfaces, and thier tests + - `recursion`: types and examples for aggregation of recursive proof objects + - `mock`: mock circuits +- `oracle`: used to fetch external information (like private data notes) and inject them as inputs into the circuit "Composer" during execution of circuit logic ([more here](https://github.com/AztecProtocol/aztec3-packages/tree/master/circuits/cpp/src/aztec3/oracle)) +- `dbs`: database infrastructure (_e.g._ PrivateStateDb) ### Typescript @@ -92,7 +101,7 @@ All typescript code was moved from here into `aztec3-packages/yarn-project/circu The private kernel circuit validates that a particular private function was correctly executed by the user. Therefore, the private kernel circuit is going to be run on the user's device. A private function execution can involve calls to other private functions from the same contract or private functions from other contracts. Each call to another private function needs to be proven that the execution was correct. Therefore, each nested call to another private function will have its own circuit execution proof, and that proof must then be validated by the private kernel circuit. The proof generated by the private kernel circuit will be submitted to the transaction pool, from where rollup providers will include those private kernel proofs in their L2 blocks. -The private kernel circuit in Aztec 3 is implemented in [`circuit/kernel/private`](https://github.com/AztecProtocol/aztec3-circuits/tree/master/cpp/src/aztec3/circuits/kernel/private) directory. The input and output interface of the private kernel circuit is written in [`circuits/abis/private_kernel`](https://github.com/AztecProtocol/aztec3-circuits/tree/master/cpp/src/aztec3/circuits/abis/private_kernel). +The private kernel circuit in Aztec 3 is implemented in [`circuit/kernel/private`](https://github.com/AztecProtocol/aztec3-packages/tree/master/circuits/cpp/src/aztec3/circuits/kernel/private) directory. The input and output interface of the private kernel circuit is written in [`circuits/abis/private_kernel`](https://github.com/AztecProtocol/aztec3-packages/tree/master/circuits/cpp/src/aztec3/circuits/abis/private_kernel). See pseudocode in [this diagram](https://miro.com/app/board/uXjVPlafJWM=/) and the slides [here](https://drive.google.com/file/d/1BaspihHDUgny6MHAKMtTkWKvfah7PYtv/view?usp=share_link) for a deeper dive into the private kernel circuit. @@ -102,10 +111,11 @@ See pseudocode in [this diagram](https://miro.com/app/board/uXjVPlafJWM=/) and t The rollup providers (or sequencers - nomenclature is yet to be decided) pull up transactions from the pool to be rolled up. Each of these transactions is essentially a proof generated by the private kernel circuit including its public inputs. To accumulate several such transactions in a single L2 block, the rollup provider needs to aggregate the private kernel proofs. The base rollup circuit is meant to aggregate these private kernel proofs. In simple words, the rollup circuit validates that the private kernel circuit was correctly executed. -In our design, we allow the rollup providers to only aggregate _two_ private kernel proofs at once. This would mean that if a rollup provider wishes to roll-up 1024 transactions in one L2 block, for example, he would need $\frac{1024}{2} = 512$ invocations of the base rollup circuit. This hard-limit on the number of private kernel proofs that one can aggregate is enable generating rollup proofs on commodity hardware, effectively reducing the entry-barrier for common users to become rollup providers. +In our design, we allow the rollup providers to only aggregate _two_ private kernel proofs at once. This would mean that if a rollup provider wishes to roll-up 1024 transactions in one L2 block, for example, he would need $\frac{1024}{2} = 512$ invocations of the base rollup circuit. This hard-limit on the number of private kernel proofs that one can aggregate is enable generating rollup proofs on commodity hardware, effectively reducing the entry-barrier for common users to become rollup providers. :::info At a very high-level, the rollup circuits need to perform the following checks: + 1. Aggregate the inner proofs (most expensive part taking up appx 75% circuit size) 2. Merkle membership checks (second most expensive part taking up appx 15% circuit size) 3. Public input hashing using SHA-256 (third most expensive part, appx 10%, can blow up if you need to hash tons of public inputs) @@ -114,7 +124,7 @@ We have a limit on the first point: you can aggregate a maximum of two proofs pe ::: :::warning -**Note**: For the first milestone, we do not include public function execution in our circuit design. +**Note**: For the first milestone, we do not include public function execution in our circuit design. ::: See pseudocode in [this diagram](https://miro.com/app/board/uXjVPlafJWM=/) for a deep dive into the Base Rollup Circuit's functionality. @@ -128,46 +138,44 @@ Furthermore, we can use the same merge rollup circuit to verify two merge rollup See pseudocode in [this diagram](https://miro.com/app/board/uXjVPlafJWM=/) for a deep dive into the Merge Rollup Circuit's functionality. :::warning -**Note**: We might not need the merge rollup circuit for the offsite but its anyway going to be very similar to the base rollup circuit. +**Note**: We might not need the merge rollup circuit for the offsite but its anyway going to be very similar to the base rollup circuit. ::: ### Root Rollup Circuit -The root rollup circuit is the final circuit execution layer before the proof is sent to L1 for on-chain verification. The root rollup circuit verifies that the final merge rollup circuit was correctly executed. The proof from the root rollup circuit is verified by the rollup contract on Ethereum. So effectively, verifying that one proof on-chain gives a final green flag to whatever number of transactions that were included in that particular L2 block. +The root rollup circuit is the final circuit execution layer before the proof is sent to L1 for on-chain verification. The root rollup circuit verifies that the final merge rollup circuit was correctly executed. The proof from the root rollup circuit is verified by the rollup contract on Ethereum. So effectively, verifying that one proof on-chain gives a final green flag to whatever number of transactions that were included in that particular L2 block. It is interesting to note that the root rollup circuit takes _one_ proof and outputs _one_ proof. The reason we do this is to switch the types of the proof: i.e. ultra-plonk/honk to standard-plonk. This is because standard-plonk proofs are cheaper to verify on-chain (in terms of gas costs). - See pseudocode in [this diagram](https://miro.com/app/board/uXjVPlafJWM=/) for a deep dive into the Root Rollup Circuit's functionality. - ## Circuit Logic - ### Private Kernel Circuit Logic The private kernel circuit is recursive in that it will perform validation of a single function call, and then recursively verify its previous iteration along with the next function call. Below is a list of the private kernel circuit's high-level responsibilities: + 1. For the first iteration: - * **[M1.1]** Validate the signature of a signed tx object - * Validate the function in that tx object matches the one currently being processed + - **[M1.1]** Validate the signature of a signed tx object + - Validate the function in that tx object matches the one currently being processed 2. For all subsequent iterations: - * Pop an item off of the kernel's dynamic callstack - * Validate that this function matches the one currently being processed -1. Verify a 'previous' kernel circuit (mock for first iteration, always mocked for **[M1.1]**) -3. Verify the proof of execution for the function (or constructor **[M1.1]**) currently being processed -4. **[M1.1]** If this is a contract deployment, check the contract deployment logic - * _[After M1.1]_ Includes checks for private circuit execution logic -5. **[M1.1]** Generate `contract_address` and its nullifier (inserted in later circuit) -6. **[M1.1]** Generate `new_contract_data` which is the contract tree leaf preimage -7. Copy the current function's callstack into kernel's dynamic callstack -8. Validate the function data against `function_tree_root` - * Includes a membership check of the function leaf -9. Validate the contract data against `contract_tree_root` - * Includes a membership check of the contract leaf -10. Perform membership checks for commitments accessed by this function -11. Collect new commitments, nullifiers, contracts, and messages to L1 -12. Add recursion byproducts to `aggregation_object` -13. TODO: L1 messages -14. Section in progress... \ No newline at end of file + - Pop an item off of the kernel's dynamic callstack + - Validate that this function matches the one currently being processed +3. Verify a 'previous' kernel circuit (mock for first iteration, always mocked for **[M1.1]**) +4. Verify the proof of execution for the function (or constructor **[M1.1]**) currently being processed +5. **[M1.1]** If this is a contract deployment, check the contract deployment logic + - _[After M1.1]_ Includes checks for private circuit execution logic +6. **[M1.1]** Generate `contract_address` and its nullifier (inserted in later circuit) +7. **[M1.1]** Generate `new_contract_data` which is the contract tree leaf preimage +8. Copy the current function's callstack into kernel's dynamic callstack +9. Validate the function data against `function_tree_root` + - Includes a membership check of the function leaf +10. Validate the contract data against `contract_tree_root` + - Includes a membership check of the contract leaf +11. Perform membership checks for commitments accessed by this function +12. Collect new commitments, nullifiers, contracts, and messages to L1 +13. Add recursion byproducts to `aggregation_object` +14. TODO: L1 messages +15. Section in progress... diff --git a/circuits/VERSION b/circuits/VERSION deleted file mode 100644 index aa338688915..00000000000 --- a/circuits/VERSION +++ /dev/null @@ -1 +0,0 @@ -v0.1 \ No newline at end of file diff --git a/circuits/bootstrap_docker.sh b/circuits/bootstrap_docker.sh index c59b9a61528..12569fb7452 100755 --- a/circuits/bootstrap_docker.sh +++ b/circuits/bootstrap_docker.sh @@ -10,6 +10,7 @@ set -e TARGET_PROJECT=$1 +# TODO(AD) fix script after moving towards less repos REPO=aztec3-circuits COMMIT_HASH=$(git rev-parse HEAD) diff --git a/circuits/build-system b/circuits/build-system deleted file mode 160000 index c85b185d917..00000000000 --- a/circuits/build-system +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c85b185d917df423586897fd036275400b7159d9 diff --git a/circuits/cpp/CMakeLists.txt b/circuits/cpp/CMakeLists.txt index 832a811a9f7..9120c4126ea 100644 --- a/circuits/cpp/CMakeLists.txt +++ b/circuits/cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -# aztec3-circuits +# aztec3 circuits package # copyright 2019 Spilsbury Holdings Ltd cmake_minimum_required(VERSION 3.24) diff --git a/circuits/cpp/dockerfiles/Dockerfile.arm64-linux-gcc b/circuits/cpp/dockerfiles/Dockerfile.arm64-linux-gcc index 8ba6d984ada..98a77fe5d04 100644 --- a/circuits/cpp/dockerfiles/Dockerfile.arm64-linux-gcc +++ b/circuits/cpp/dockerfiles/Dockerfile.arm64-linux-gcc @@ -1,6 +1,6 @@ # Unused & not maintained. This probably won't work without changes. FROM aztecprotocol/crosstool-ng-arm64:latest -WORKDIR /usr/src/aztec3-circuits/cpp +WORKDIR /usr/src/circuits/cpp COPY . . RUN cmake --toolchain ./cmake/toolchains/aarch64-linux.cmake --preset gcc -DUSE_TURBO=true && cmake --build --preset gcc RUN cd build && for test in ./bin/*_tests; do qemu-aarch64 $test; done diff --git a/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang b/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang index 00325e48d10..1594ca329e0 100644 --- a/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang +++ b/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang @@ -1,12 +1,12 @@ FROM ubuntu:kinetic AS builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential wget git libssl-dev cmake ninja-build curl binaryen -WORKDIR /usr/src/aztec3-circuits/cpp/barretenberg/cpp/src +WORKDIR /usr/src/circuits/cpp/barretenberg/cpp/src RUN curl -s -L https://github.com/CraneStation/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz | tar zxfv - -WORKDIR /usr/src/aztec3-circuits/cpp +WORKDIR /usr/src/circuits/cpp COPY . . RUN cmake --preset wasm -DUSE_TURBO=true && cmake --build --preset wasm FROM alpine:3.17 -COPY --from=builder /usr/src/aztec3-circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/aztec3-circuits/cpp/build-wasm/bin/aztec3-circuits.wasm -COPY --from=builder /usr/src/aztec3-circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm /usr/src/aztec3-circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm -COPY --from=builder /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db +COPY --from=builder /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm +COPY --from=builder /usr/src/circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm /usr/src/circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm +COPY --from=builder /usr/src/circuits/cpp/barretenberg/cpp/srs_db /usr/src/circuits/cpp/barretenberg/cpp/srs_db diff --git a/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang-assert b/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang-assert index f0ea18ebe4e..461ead4c3f1 100644 --- a/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang-assert +++ b/circuits/cpp/dockerfiles/Dockerfile.wasm-linux-clang-assert @@ -1,8 +1,8 @@ FROM ubuntu:kinetic AS builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git libssl-dev cmake ninja-build curl binaryen -WORKDIR /usr/src/aztec3-circuits/cpp/barretenberg/cpp/src +WORKDIR /usr/src/circuits/cpp/barretenberg/cpp/src RUN curl -s -L https://github.com/CraneStation/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz | tar zxfv - -WORKDIR /usr/src/aztec3-circuits/cpp +WORKDIR /usr/src/circuits/cpp COPY . . RUN cmake --preset wasm -DUSE_TURBO=true && cmake --build --preset wasm @@ -10,5 +10,5 @@ RUN cmake --preset wasm -DUSE_TURBO=true && cmake --build --preset wasm FROM ubuntu:kinetic RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y xz-utils curl RUN curl https://wasmtime.dev/install.sh -sSf | bash /dev/stdin --version v3.0.1 -COPY --from=builder /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db -COPY --from=builder /usr/src/aztec3-circuits/cpp/build-wasm/bin/*_tests /usr/src/aztec3-circuits/cpp/build-wasm/bin/ +COPY --from=builder /usr/src/circuits/cpp/barretenberg/cpp/srs_db /usr/src/circuits/cpp/barretenberg/cpp/srs_db +COPY --from=builder /usr/src/circuits/cpp/build-wasm/bin/*_tests /usr/src/circuits/cpp/build-wasm/bin/ diff --git a/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang b/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang index b2a11c56efa..f06a0e3d7cd 100644 --- a/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang +++ b/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang @@ -11,7 +11,7 @@ RUN apk update \ curl \ perl -WORKDIR /usr/src/aztec3-circuits/cpp +WORKDIR /usr/src/circuits/cpp COPY . . # Build the entire project, as we want to check everything builds under clang @@ -19,4 +19,4 @@ RUN cmake --preset default -DUSE_TURBO=true && cmake --build --preset default FROM alpine:3.17 RUN apk update && apk add openmp -COPY --from=builder /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db \ No newline at end of file +COPY --from=builder /usr/src/circuits/cpp/barretenberg/cpp/srs_db /usr/src/circuits/cpp/barretenberg/cpp/srs_db \ No newline at end of file diff --git a/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang-assert b/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang-assert index 95b212e04a2..346a4f7a215 100644 --- a/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang-assert +++ b/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-clang-assert @@ -11,7 +11,7 @@ RUN apk update \ curl \ perl -WORKDIR /usr/src/aztec3-circuits/cpp +WORKDIR /usr/src/circuits/cpp COPY . . # Build everything to ensure everything builds. All tests will be run from the result of this build. @@ -19,5 +19,5 @@ RUN cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert -DCI=ON -DUSE_TURBO= FROM alpine:3.17 RUN apk update && apk add curl openmp -COPY --from=builder /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db -COPY --from=builder /usr/src/aztec3-circuits/cpp/build/bin/*_tests /usr/src/aztec3-circuits/cpp/build/bin/ \ No newline at end of file +COPY --from=builder /usr/src/circuits/cpp/barretenberg/cpp/srs_db /usr/src/circuits/cpp/barretenberg/cpp/srs_db +COPY --from=builder /usr/src/circuits/cpp/build/bin/*_tests /usr/src/circuits/cpp/build/bin/ \ No newline at end of file diff --git a/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-gcc b/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-gcc index 1e5d89e2583..27034f08ec4 100644 --- a/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-gcc +++ b/circuits/cpp/dockerfiles/Dockerfile.x86_64-linux-gcc @@ -7,11 +7,11 @@ RUN apk update \ ninja \ git \ curl -WORKDIR /usr/src/aztec3-circuits/cpp +WORKDIR /usr/src/circuits/cpp COPY . . # Build the entire project, as we want to check everything builds under gcc. RUN cmake --preset gcc -DCI=ON -DUSE_TURBO=true && cmake --build --preset gcc FROM alpine:3.17 RUN apk update && apk add libstdc++ libgomp -COPY --from=builder /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db +COPY --from=builder /usr/src/circuits/cpp/barretenberg/cpp/srs_db /usr/src/circuits/cpp/barretenberg/cpp/srs_db diff --git a/circuits/cpp/scripts/run_tests b/circuits/cpp/scripts/run_tests index c44c802e308..0af2338f4ba 100755 --- a/circuits/cpp/scripts/run_tests +++ b/circuits/cpp/scripts/run_tests @@ -12,7 +12,7 @@ fi $(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null -IMAGE_URI=278380418400.dkr.ecr.us-east-2.amazonaws.com/aztec3-circuits-x86_64-linux-clang-assert:cache-$COMMIT_HASH +IMAGE_URI=278380418400.dkr.ecr.us-east-2.amazonaws.com/circuits-x86_64-linux-clang-assert:cache-$COMMIT_HASH docker pull $IMAGE_URI @@ -22,16 +22,16 @@ fi if [ -z "$WASM_MODE" ]; then TEST_CMD="./bin/\$BIN $@" - BUILD_DIR=/usr/src/aztec3-circuits/cpp/build + BUILD_DIR=/usr/src/circuits/cpp/build else TEST_CMD="wasmtime --dir .. bin/\$BIN $@" - BUILD_DIR=/usr/src/aztec3-circuits/cpp/build-wasm + BUILD_DIR=/usr/src/circuits/cpp/build-wasm fi docker run --rm -t $IMAGE_URI /bin/sh -c "\ set -e; \ - cd /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db; \ - ln -sf /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db /usr/src/aztec3-circuits/cpp/srs_db; \ + cd /usr/src/circuits/cpp/barretenberg/cpp/srs_db; \ + ln -sf /usr/src/circuits/cpp/barretenberg/cpp/srs_db /usr/src/circuits/cpp/srs_db; \ ./download_ignition.sh $NUM_TRANSCRIPTS; \ cd $BUILD_DIR; \ for BIN in $TESTS; do $TEST_CMD; done" diff --git a/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp b/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp index 9beffd9bfb1..b897b0ac743 100644 --- a/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp +++ b/circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp @@ -105,8 +105,6 @@ compute_partial_left_tree(uint8_t const* leaves_buf, uint8_t num_leaves, NT::fr } // namespace -#define WASM_EXPORT __attribute__((visibility("default"))) - // Note: We don't have a simple way of calling the barretenberg c-bind. // Mimick bbmalloc behaviour. static void* bbmalloc(size_t size) diff --git a/circuits/cpp/src/aztec3/circuits/rollup/merge/utils.cpp b/circuits/cpp/src/aztec3/circuits/rollup/merge/utils.cpp index 62a5bbc5483..35b214cc394 100644 --- a/circuits/cpp/src/aztec3/circuits/rollup/merge/utils.cpp +++ b/circuits/cpp/src/aztec3/circuits/rollup/merge/utils.cpp @@ -3,6 +3,7 @@ #include "aztec3/circuits/abis/rollup/merge/merge_rollup_inputs.hpp" #include "aztec3/circuits/abis/rollup/base/base_or_merge_rollup_public_inputs.hpp" #include "aztec3/constants.hpp" +#include "aztec3/utils/dummy_composer.hpp" #include "barretenberg/plonk/proof_system/verification_key/verification_key.hpp" #include "index.hpp" #include "init.hpp" diff --git a/scripts/tmux-splits b/scripts/tmux-splits index 9c93aa61927..296cdb36632 100755 --- a/scripts/tmux-splits +++ b/scripts/tmux-splits @@ -10,7 +10,7 @@ cd $(git rev-parse --show-toplevel) if tmux has-session -t $SESSION_NAME > /dev/null 2>&1; then tmux attach -t $SESSION_NAME else - tmux new-session -s $SESSION_NAME -d + tmux new-session -s $SESSION_NAME -d \ split-window \; \ select-layout even-vertical \; \ # Give a chance for terminals to start (avoids double command echo). diff --git a/yarn-project/circuits.js/README.md b/yarn-project/circuits.js/README.md index 15c3f5eb258..3340b3e16df 100644 --- a/yarn-project/circuits.js/README.md +++ b/yarn-project/circuits.js/README.md @@ -1,6 +1,7 @@ # Circuits.js -Javascript bindings for aztec3-circuits WASM. +Javascript bindings for the aztec3 circuits WASM. +High-level bindings to the raw C API to our core circuit logic. ## To run: diff --git a/yarn-project/yarn-project-base/Dockerfile b/yarn-project/yarn-project-base/Dockerfile index 2ed7214a24b..97760b5a588 100644 --- a/yarn-project/yarn-project-base/Dockerfile +++ b/yarn-project/yarn-project-base/Dockerfile @@ -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/aztec3-circuits-wasm-linux-clang +FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/circuits-wasm-linux-clang # FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/l1-contracts FROM node:18-alpine @@ -8,10 +8,9 @@ RUN apk update && apk add --no-cache build-base git python3 curl bash jq # COPY --from=1 /usr/src/circuits/build/bin /usr/src/circuits/build-wasm/bin # COPY --from=2 /usr/src/l1-contracts /usr/src/l1-contracts -# TODO: submodule circuits as aztec3-circuits so we don't have two names for the same thing. -COPY --from=0 /usr/src/aztec3-circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm -COPY --from=0 /usr/src/aztec3-circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm /usr/src/circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm -COPY --from=0 /usr/src/aztec3-circuits/cpp/barretenberg/cpp/srs_db/download_ignition.sh /usr/src/circuits/cpp/barretenberg/cpp/srs_db/download_ignition.sh +COPY --from=0 /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm +COPY --from=0 /usr/src/circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm /usr/src/circuits/cpp/barretenberg/cpp/build-wasm/bin/primitives.wasm +COPY --from=0 /usr/src/circuits/cpp/barretenberg/cpp/srs_db/download_ignition.sh /usr/src/circuits/cpp/barretenberg/cpp/srs_db/download_ignition.sh WORKDIR /usr/src/circuits/cpp/barretenberg/cpp/srs_db RUN ./download_ignition.sh 1