From da74f580e83e7b220573354203e93d756175353d Mon Sep 17 00:00:00 2001
From: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
Date: Mon, 7 Aug 2023 18:40:58 +0200
Subject: [PATCH] chore: Restructure documentation (#1437)
Restructures the documentation and add some placeholders.
---
...ORIAL-TEMPLATE.md => TUTORIAL_TEMPLATE.md} | 0
.../history/differences_to_aztec_connect.md} | 0
.../history/history.mdx | 4 +
.../how_to_contribute.md} | 2 +-
docs/docs/{aztec => about_aztec}/overview.mdx | 4 +-
.../roadmap/cryptography_roadmap.md} | 0
.../roadmap/features_initial_ldt.md} | 2 +-
.../roadmap/main.md} | 0
.../roadmap/milestone1_1.md} | 4 +-
.../roadmap}/milestones.md | 4 +-
docs/docs/{ => about_aztec}/vision.md | 2 +-
.../aztec/contributing-to-aztec/README.md | 5 -
docs/docs/aztec/developer/README.md | 7 -
.../noir-contracts/getting-started.md | 26 --
.../noir-contracts/noir-contracts.md | 14 -
.../developer/noir-contracts/workflow.md | 21 --
.../portal-contracts/portal-contracts.md | 5 -
.../wallet-providers/building-a-wallet.md | 3 -
docs/docs/aztec/protocol/README.md | 9 -
docs/docs/aztec/protocol/key-management.md | 96 -----
.../aztec/protocol/lifecycle-of-a-note.md | 15 -
.../advanced/circuits/kernels/main.md | 0
.../circuits/kernels/private_kernel.md} | 4 +-
.../circuits/kernels/public_kernel.md} | 2 +-
.../advanced/circuits/main.md} | 8 +-
.../circuits/rollup_circuits/base_rollup.md | 0
.../circuits/rollup_circuits/main.md} | 2 +-
.../circuits/rollup_circuits/merge_rollup.md | 0
.../circuits/rollup_circuits/root_rollup.md | 0
.../advanced/contract_creation.md} | 2 +-
.../data_structures/indexed_merkle_tree.md} | 2 +-
.../concepts/advanced/data_structures/main.md | 0
.../advanced/data_structures/trees.md} | 4 +-
docs/docs/concepts/advanced/main.md | 0
.../advanced/public_vm.md} | 2 +-
.../docs/concepts/advanced/rollup_contract.md | 0
.../foundation/accounts}/keys.md | 8 +-
.../foundation/accounts/main.md} | 4 +-
.../concepts/foundation/block_production.md | 0
docs/docs/concepts/foundation/blocks.md | 0
.../communication/cross_chain_calls.md} | 2 +-
.../concepts/foundation/communication/main.md | 9 +
.../communication/public_private_calls.md} | 2 +-
.../foundation/contracts.md} | 4 +-
docs/docs/concepts/foundation/globals.md | 0
docs/docs/concepts/foundation/main.md | 0
.../nodes_clients/execution_client.md | 0
.../concepts/foundation/nodes_clients/main.md | 3 +
.../foundation/nodes_clients/prover_client.md | 0
.../nodes_clients/sequencer_client.md | 0
.../foundation/state_model.md} | 25 +-
.../foundation/transactions.md} | 4 +-
.../concepts/foundation/upgrade_mechanism.md | 0
docs/docs/cryptography/main.md | 3 +
docs/docs/dev_docs/contracts/abi.md | 0
.../contracts/common_errors.md} | 0
.../contracts/compiling.md} | 2 +-
.../contracts}/concepts.md | 2 +-
docs/docs/dev_docs/contracts/constrain.md | 0
.../dev_docs/contracts/control_structure.md | 14 +
docs/docs/dev_docs/contracts/deploying.md | 0
docs/docs/dev_docs/contracts/events.md | 0
docs/docs/dev_docs/contracts/functions.md | 0
docs/docs/dev_docs/contracts/globals.md | 0
docs/docs/dev_docs/contracts/layout.md | 0
docs/docs/dev_docs/contracts/main.md | 43 +++
.../common_patterns/access_control.md | 0
.../common_patterns/common_patterns.md | 0
.../common_patterns/interacting_with_l1.md | 0
.../resources/common_patterns/main.md | 0
.../sending_tokens_to_contract.md | 0
.../common_patterns/sending_tokens_to_user.md | 0
.../docs/dev_docs/contracts/resources/main.md | 0
.../contracts/resources/style_guide.md | 0
.../security/breaking_changes/main.md | 0
.../contracts/security/breaking_changes/v0.md | 0
docs/docs/dev_docs/contracts/security/main.md | 0
docs/docs/dev_docs/contracts/storage.md | 0
docs/docs/dev_docs/contracts/types.md | 0
docs/docs/dev_docs/contracts/visibility.md | 0
.../dapps/main.md} | 8 +-
docs/docs/dev_docs/getting_started/main.md | 0
.../{ => dev_docs/getting_started}/noir.md | 0
docs/docs/dev_docs/getting_started/sandbox.md | 0
.../sandbox/common_errors.md} | 21 +-
.../sandbox/components.md | 2 +-
.../sandbox.md => dev_docs/sandbox/main.md} | 13 +-
docs/docs/dev_docs/testing/cheat_codes.md | 0
.../testing/main.md} | 8 +-
docs/docs/dev_docs/testing/writing_a_test.md | 0
.../dev_docs/wallets/building_a_wallet.md | 3 +
docs/docs/dev_docs/wallets/main.md | 0
.../wallets/writing_an_account_contract.md} | 2 +-
...ithub-code.md => embedding_github_code.md} | 0
docs/docs/{what-is-aztec.md => intro.md} | 6 +-
.../aztec_connect_sunset.mdx} | 0
.../{aztec => misc}/common/_disclaimer.mdx | 0
docs/docs/{ => misc}/glossary.md | 6 +-
docs/package.json | 2 +-
docs/sidebars.js | 331 +++++++++++++-----
docs/src/css/custom.css | 23 ++
101 files changed, 437 insertions(+), 362 deletions(-)
rename docs/docs/{aztec/TUTORIAL-TEMPLATE.md => TUTORIAL_TEMPLATE.md} (100%)
rename docs/docs/{aztec/history/differences-to-aztec-connect.md => about_aztec/history/differences_to_aztec_connect.md} (100%)
rename docs/docs/{aztec => about_aztec}/history/history.mdx (97%)
rename docs/docs/{aztec/participate/participate.md => about_aztec/how_to_contribute.md} (92%)
rename docs/docs/{aztec => about_aztec}/overview.mdx (96%)
rename docs/docs/{aztec/milestones/cryptography-roadmap.md => about_aztec/roadmap/cryptography_roadmap.md} (100%)
rename docs/docs/{aztec/milestones/features-initial-ldt.md => about_aztec/roadmap/features_initial_ldt.md} (98%)
rename docs/docs/{aztec/cryptography/cryptography.md => about_aztec/roadmap/main.md} (100%)
rename docs/docs/{aztec/milestones/milestone1-1.md => about_aztec/roadmap/milestone1_1.md} (99%)
rename docs/docs/{aztec/milestones => about_aztec/roadmap}/milestones.md (99%)
rename docs/docs/{ => about_aztec}/vision.md (96%)
delete mode 100644 docs/docs/aztec/contributing-to-aztec/README.md
delete mode 100644 docs/docs/aztec/developer/README.md
delete mode 100644 docs/docs/aztec/developer/noir-contracts/getting-started.md
delete mode 100644 docs/docs/aztec/developer/noir-contracts/noir-contracts.md
delete mode 100644 docs/docs/aztec/developer/noir-contracts/workflow.md
delete mode 100644 docs/docs/aztec/developer/portal-contracts/portal-contracts.md
delete mode 100644 docs/docs/aztec/developer/wallet-providers/building-a-wallet.md
delete mode 100644 docs/docs/aztec/protocol/README.md
delete mode 100644 docs/docs/aztec/protocol/key-management.md
delete mode 100644 docs/docs/aztec/protocol/lifecycle-of-a-note.md
create mode 100644 docs/docs/concepts/advanced/circuits/kernels/main.md
rename docs/docs/{aztec/protocol/circuits/private-kernel.md => concepts/advanced/circuits/kernels/private_kernel.md} (95%)
rename docs/docs/{aztec/protocol/circuits/public-kernel.md => concepts/advanced/circuits/kernels/public_kernel.md} (83%)
rename docs/docs/{aztec/protocol/circuits/circuits.md => concepts/advanced/circuits/main.md} (94%)
create mode 100644 docs/docs/concepts/advanced/circuits/rollup_circuits/base_rollup.md
rename docs/docs/{aztec/protocol/circuits/rollup.md => concepts/advanced/circuits/rollup_circuits/main.md} (97%)
create mode 100644 docs/docs/concepts/advanced/circuits/rollup_circuits/merge_rollup.md
create mode 100644 docs/docs/concepts/advanced/circuits/rollup_circuits/root_rollup.md
rename docs/docs/{aztec/protocol/contract-creation.md => concepts/advanced/contract_creation.md} (99%)
rename docs/docs/{aztec/protocol/trees/indexed-merkle-tree.mdx => concepts/advanced/data_structures/indexed_merkle_tree.md} (99%)
create mode 100644 docs/docs/concepts/advanced/data_structures/main.md
rename docs/docs/{aztec/protocol/trees/trees.mdx => concepts/advanced/data_structures/trees.md} (98%)
create mode 100644 docs/docs/concepts/advanced/main.md
rename docs/docs/{aztec/protocol/circuits/public-vm.md => concepts/advanced/public_vm.md} (99%)
create mode 100644 docs/docs/concepts/advanced/rollup_contract.md
rename docs/docs/{aztec/developer/wallet-providers => concepts/foundation/accounts}/keys.md (94%)
rename docs/docs/{aztec/developer/wallet-providers/account-abstraction.md => concepts/foundation/accounts/main.md} (99%)
create mode 100644 docs/docs/concepts/foundation/block_production.md
create mode 100644 docs/docs/concepts/foundation/blocks.md
rename docs/docs/{aztec/how-it-works/l1-l2-messaging.md => concepts/foundation/communication/cross_chain_calls.md} (99%)
create mode 100644 docs/docs/concepts/foundation/communication/main.md
rename docs/docs/{aztec/how-it-works/private-public-execution.mdx => concepts/foundation/communication/public_private_calls.md} (99%)
rename docs/docs/{aztec/how-it-works/private-smart-contracts.md => concepts/foundation/contracts.md} (96%)
create mode 100644 docs/docs/concepts/foundation/globals.md
create mode 100644 docs/docs/concepts/foundation/main.md
create mode 100644 docs/docs/concepts/foundation/nodes_clients/execution_client.md
create mode 100644 docs/docs/concepts/foundation/nodes_clients/main.md
create mode 100644 docs/docs/concepts/foundation/nodes_clients/prover_client.md
create mode 100644 docs/docs/concepts/foundation/nodes_clients/sequencer_client.md
rename docs/docs/{aztec/how-it-works/private-state.md => concepts/foundation/state_model.md} (78%)
rename docs/docs/{aztec/protocol/lifecycle-of-a-tx.md => concepts/foundation/transactions.md} (84%)
create mode 100644 docs/docs/concepts/foundation/upgrade_mechanism.md
create mode 100644 docs/docs/cryptography/main.md
create mode 100644 docs/docs/dev_docs/contracts/abi.md
rename docs/docs/{aztec/developer/noir-contracts/errors.md => dev_docs/contracts/common_errors.md} (100%)
rename docs/docs/{aztec/developer/noir-contracts/compiling-contracts.md => dev_docs/contracts/compiling.md} (95%)
rename docs/docs/{aztec/developer/noir-contracts => dev_docs/contracts}/concepts.md (99%)
create mode 100644 docs/docs/dev_docs/contracts/constrain.md
create mode 100644 docs/docs/dev_docs/contracts/control_structure.md
create mode 100644 docs/docs/dev_docs/contracts/deploying.md
create mode 100644 docs/docs/dev_docs/contracts/events.md
create mode 100644 docs/docs/dev_docs/contracts/functions.md
create mode 100644 docs/docs/dev_docs/contracts/globals.md
create mode 100644 docs/docs/dev_docs/contracts/layout.md
create mode 100644 docs/docs/dev_docs/contracts/main.md
create mode 100644 docs/docs/dev_docs/contracts/resources/common_patterns/access_control.md
create mode 100644 docs/docs/dev_docs/contracts/resources/common_patterns/common_patterns.md
create mode 100644 docs/docs/dev_docs/contracts/resources/common_patterns/interacting_with_l1.md
create mode 100644 docs/docs/dev_docs/contracts/resources/common_patterns/main.md
create mode 100644 docs/docs/dev_docs/contracts/resources/common_patterns/sending_tokens_to_contract.md
create mode 100644 docs/docs/dev_docs/contracts/resources/common_patterns/sending_tokens_to_user.md
create mode 100644 docs/docs/dev_docs/contracts/resources/main.md
create mode 100644 docs/docs/dev_docs/contracts/resources/style_guide.md
create mode 100644 docs/docs/dev_docs/contracts/security/breaking_changes/main.md
create mode 100644 docs/docs/dev_docs/contracts/security/breaking_changes/v0.md
create mode 100644 docs/docs/dev_docs/contracts/security/main.md
create mode 100644 docs/docs/dev_docs/contracts/storage.md
create mode 100644 docs/docs/dev_docs/contracts/types.md
create mode 100644 docs/docs/dev_docs/contracts/visibility.md
rename docs/docs/{aztec/developer/dapps/building-dapps.md => dev_docs/dapps/main.md} (84%)
create mode 100644 docs/docs/dev_docs/getting_started/main.md
rename docs/docs/{ => dev_docs/getting_started}/noir.md (100%)
create mode 100644 docs/docs/dev_docs/getting_started/sandbox.md
rename docs/docs/{aztec/developer/sandbox/errors.md => dev_docs/sandbox/common_errors.md} (89%)
rename docs/docs/{aztec/developer => dev_docs}/sandbox/components.md (99%)
rename docs/docs/{aztec/developer/sandbox/sandbox.md => dev_docs/sandbox/main.md} (81%)
create mode 100644 docs/docs/dev_docs/testing/cheat_codes.md
rename docs/docs/{aztec/developer/noir-contracts/testing-contracts.md => dev_docs/testing/main.md} (69%)
create mode 100644 docs/docs/dev_docs/testing/writing_a_test.md
create mode 100644 docs/docs/dev_docs/wallets/building_a_wallet.md
create mode 100644 docs/docs/dev_docs/wallets/main.md
rename docs/docs/{aztec/developer/wallet-providers/writing-an-account-contract.md => dev_docs/wallets/writing_an_account_contract.md} (50%)
rename docs/docs/{embedding-github-code.md => embedding_github_code.md} (100%)
rename docs/docs/{what-is-aztec.md => intro.md} (89%)
rename docs/docs/{aztec-connect-sunset.mdx => misc/aztec_connect_sunset.mdx} (100%)
rename docs/docs/{aztec => misc}/common/_disclaimer.mdx (100%)
rename docs/docs/{ => misc}/glossary.md (93%)
diff --git a/docs/docs/aztec/TUTORIAL-TEMPLATE.md b/docs/docs/TUTORIAL_TEMPLATE.md
similarity index 100%
rename from docs/docs/aztec/TUTORIAL-TEMPLATE.md
rename to docs/docs/TUTORIAL_TEMPLATE.md
diff --git a/docs/docs/aztec/history/differences-to-aztec-connect.md b/docs/docs/about_aztec/history/differences_to_aztec_connect.md
similarity index 100%
rename from docs/docs/aztec/history/differences-to-aztec-connect.md
rename to docs/docs/about_aztec/history/differences_to_aztec_connect.md
diff --git a/docs/docs/aztec/history/history.mdx b/docs/docs/about_aztec/history/history.mdx
similarity index 97%
rename from docs/docs/aztec/history/history.mdx
rename to docs/docs/about_aztec/history/history.mdx
index 7ff5d2e6c94..4a037c9cf8b 100644
--- a/docs/docs/aztec/history/history.mdx
+++ b/docs/docs/about_aztec/history/history.mdx
@@ -1,3 +1,7 @@
+---
+title: History of blockchain privacy
+---
+
import Image from "@theme/IdealImage";
# A brief history of blockchain privacy
diff --git a/docs/docs/aztec/participate/participate.md b/docs/docs/about_aztec/how_to_contribute.md
similarity index 92%
rename from docs/docs/aztec/participate/participate.md
rename to docs/docs/about_aztec/how_to_contribute.md
index cb25325d060..1b359c64454 100644
--- a/docs/docs/aztec/participate/participate.md
+++ b/docs/docs/about_aztec/how_to_contribute.md
@@ -1,5 +1,5 @@
---
-title: Participate
+title: How to Participate?
---
- Talk about how we want the Aztec network to be as decentralised as possible, hence we want to actively encourage participation.
diff --git a/docs/docs/aztec/overview.mdx b/docs/docs/about_aztec/overview.mdx
similarity index 96%
rename from docs/docs/aztec/overview.mdx
rename to docs/docs/about_aztec/overview.mdx
index 2cd7f8c7e2f..8b3c419890a 100644
--- a/docs/docs/aztec/overview.mdx
+++ b/docs/docs/about_aztec/overview.mdx
@@ -52,7 +52,7 @@ Contributors to Aztec uphold many of the values of the Ethereum community -- bui
Noir is a domain specific programming language for writing zero knowledge circuits. On Aztec a smart contract is a collection of circuits that developers write using Noir.
-You can find more information and resources for learning about Noir on [this page](../noir).
+You can find more information and resources for learning about Noir on [this page](../dev_docs/getting_started/noir).
## Cryptography
@@ -63,5 +63,5 @@ To support Aztec's rollup, our cryptography team is building [Honk](https://gith
Keep up with the latest discussion and join the conversation in the [Aztec forum](https://discourse.aztec.network).
-import Disclaimer from "./common/\_disclaimer.mdx";
+import Disclaimer from "../misc/common/\_disclaimer.mdx";
\ No newline at end of file
diff --git a/docs/docs/aztec/milestones/cryptography-roadmap.md b/docs/docs/about_aztec/roadmap/cryptography_roadmap.md
similarity index 100%
rename from docs/docs/aztec/milestones/cryptography-roadmap.md
rename to docs/docs/about_aztec/roadmap/cryptography_roadmap.md
diff --git a/docs/docs/aztec/milestones/features-initial-ldt.md b/docs/docs/about_aztec/roadmap/features_initial_ldt.md
similarity index 98%
rename from docs/docs/aztec/milestones/features-initial-ldt.md
rename to docs/docs/about_aztec/roadmap/features_initial_ldt.md
index 5b87f5f53de..223eecb410e 100644
--- a/docs/docs/aztec/milestones/features-initial-ldt.md
+++ b/docs/docs/about_aztec/roadmap/features_initial_ldt.md
@@ -89,5 +89,5 @@ A bundle of packages which emulate the actions of all eventual Aztec network par
Keep up with the latest discussion and join the conversation in the [Aztec forum](https://discourse.aztec.network).
-import Disclaimer from "../common/\_disclaimer.mdx";
+import Disclaimer from "../../misc/common/\_disclaimer.mdx";
\ No newline at end of file
diff --git a/docs/docs/aztec/cryptography/cryptography.md b/docs/docs/about_aztec/roadmap/main.md
similarity index 100%
rename from docs/docs/aztec/cryptography/cryptography.md
rename to docs/docs/about_aztec/roadmap/main.md
diff --git a/docs/docs/aztec/milestones/milestone1-1.md b/docs/docs/about_aztec/roadmap/milestone1_1.md
similarity index 99%
rename from docs/docs/aztec/milestones/milestone1-1.md
rename to docs/docs/about_aztec/roadmap/milestone1_1.md
index 5f39d166ab1..289e4b1afa5 100644
--- a/docs/docs/aztec/milestones/milestone1-1.md
+++ b/docs/docs/about_aztec/roadmap/milestone1_1.md
@@ -6,7 +6,7 @@ See [here](./) for draft milestones.
See [here](https://drive.google.com/file/d/1riqr23R-VOAwOAzpgRj40tsAfq0ZA5yO/view?usp=share_link) for an unfinished (but maybe helpful) contract deployment sequence diagram, and other tabs for other useful diagrams.
-See [here](../protocol/contract-creation) for more on Contract Creation.
+See [here](../../concepts/advanced/contract_creation) for more on Contract Creation.
## Reminder of the milestone:
@@ -525,5 +525,5 @@ For `offchainData`:
Keep up with the latest discussion and join the conversation in the [Aztec forum](https://discourse.aztec.network).
-import Disclaimer from "../common/\_disclaimer.mdx";
+import Disclaimer from "../../misc/common/\_disclaimer.mdx";
\ No newline at end of file
diff --git a/docs/docs/aztec/milestones/milestones.md b/docs/docs/about_aztec/roadmap/milestones.md
similarity index 99%
rename from docs/docs/aztec/milestones/milestones.md
rename to docs/docs/about_aztec/roadmap/milestones.md
index 75eef71dbb6..842a3f7fe7e 100644
--- a/docs/docs/aztec/milestones/milestones.md
+++ b/docs/docs/about_aztec/roadmap/milestones.md
@@ -28,7 +28,7 @@ Create a monorepo (`aztec3-packages`) for the Local Developer Testnet codebase.
### 1.1 - Deploy a contract ✅
-See granular tasks [here](milestones/milestone1-1).
+See granular tasks [here](./milestone1_1).
As a developer, I can write a Noir `contract` scope, which contains a collection of pure functions (circuits) and a noop `constructor` function (no state variables yet).
@@ -489,5 +489,5 @@ As a Prover I can be paid for generating proofs for the current Sequencer.
Keep up with the latest discussion and join the conversation in the [Aztec forum](https://discourse.aztec.network).
-import Disclaimer from "../common/\_disclaimer.mdx";
+import Disclaimer from "../../misc/common/\_disclaimer.mdx";
diff --git a/docs/docs/vision.md b/docs/docs/about_aztec/vision.md
similarity index 96%
rename from docs/docs/vision.md
rename to docs/docs/about_aztec/vision.md
index 03664b12e1f..505c29794f5 100644
--- a/docs/docs/vision.md
+++ b/docs/docs/about_aztec/vision.md
@@ -22,5 +22,5 @@ We are building the [Aztec Network](https://aztec.network/), a fully programmabl
To achieve these goals, we are pioneering the cryptography and research needed to bring our next generation, privacy-preserving zk-roll-up to mainnet.
-import Disclaimer from "./aztec/common/\_disclaimer.mdx";
+import Disclaimer from "../misc/common/\_disclaimer.mdx";
diff --git a/docs/docs/aztec/contributing-to-aztec/README.md b/docs/docs/aztec/contributing-to-aztec/README.md
deleted file mode 100644
index c6d462d6cb1..00000000000
--- a/docs/docs/aztec/contributing-to-aztec/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Goal of this dir
-
-Teach external people everything about the Aztec codebase.
-
-After reading this dir, a dev should be able to contribute to the `aztec-packages` codebase.
\ No newline at end of file
diff --git a/docs/docs/aztec/developer/README.md b/docs/docs/aztec/developer/README.md
deleted file mode 100644
index e6ec8a82c9d..00000000000
--- a/docs/docs/aztec/developer/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Goal of this dir
-
-Teach dapp developers everything they need to write Aztec dapps.
-
-Teach wallet providers everything they need to write an Aztec wallet.
-
-Teach developers everything they need to use the Aztec Sandbox.
\ No newline at end of file
diff --git a/docs/docs/aztec/developer/noir-contracts/getting-started.md b/docs/docs/aztec/developer/noir-contracts/getting-started.md
deleted file mode 100644
index f7e13f64d4c..00000000000
--- a/docs/docs/aztec/developer/noir-contracts/getting-started.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Getting started
-
-Please consider using the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
-
-## Installing Noir
-
-To write a Noir Contract, you need to write Noir, and to write Noir, you need to [install Nargo](https://noir-lang.org/getting_started/nargo_installation).
-
-## Installing Noir tooling
-
-There are a number of tools to make writing Noir Contracts more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding).
-
-## Quick start
-
-Download an Aztec Box. (Josh / Ze to build :) ).
-
-Or, if you don't want to do that, here's more detail on doing it all yourself:
-
-:::danger TODO
-TODO
-:::
-
-## Creating a new contract package
-
-See [here](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts#creating-a-new-contract-package)
-
diff --git a/docs/docs/aztec/developer/noir-contracts/noir-contracts.md b/docs/docs/aztec/developer/noir-contracts/noir-contracts.md
deleted file mode 100644
index a305094aec7..00000000000
--- a/docs/docs/aztec/developer/noir-contracts/noir-contracts.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Noir Contracts
-
-## What is a Noir Contract?
-
-**Noir** is a domain specific language for creating and verifying proofs. It's design choices are influenced heavily by Rust.
-
-We've extended the Noir language to understand the notion of an **'Aztec smart contract'**.
-
-- A **smart contract** is just a collection of persistent state variables, and a collection of functions which may edit those state variables.
-- An **Aztec smart contract** is a smart contract with **private** state variables and **private** functions.
-- A **Noir Contract** is just an Aztec smart contract, written in Noir syntax.
-
-
-> Throughout these docs, we'll refer to "regular Noir" as being the version of Noir without the Noir Contract syntax.
\ No newline at end of file
diff --git a/docs/docs/aztec/developer/noir-contracts/workflow.md b/docs/docs/aztec/developer/noir-contracts/workflow.md
deleted file mode 100644
index ab184457dad..00000000000
--- a/docs/docs/aztec/developer/noir-contracts/workflow.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Noir contract workflow
-
-## Write
-
-[Write a contract](./concepts.md)
-
-## Compile
-
-[Compile a contract](./compiling-contracts.md).
-
-## Test
-
-[Test individual noir functions](https://noir-lang.org/nargo/testing).
-
-## Deploy
-
-[Deploy a contract].
-
-## Test
-
-[Test a deployed contract]. See [dapps](../dapps/building-dapps.md).
\ No newline at end of file
diff --git a/docs/docs/aztec/developer/portal-contracts/portal-contracts.md b/docs/docs/aztec/developer/portal-contracts/portal-contracts.md
deleted file mode 100644
index c11709fb10f..00000000000
--- a/docs/docs/aztec/developer/portal-contracts/portal-contracts.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Portal Contracts
-
-
-
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
\ No newline at end of file
diff --git a/docs/docs/aztec/developer/wallet-providers/building-a-wallet.md b/docs/docs/aztec/developer/wallet-providers/building-a-wallet.md
deleted file mode 100644
index 9f0aaab91d6..00000000000
--- a/docs/docs/aztec/developer/wallet-providers/building-a-wallet.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Building a wallet
-
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
\ No newline at end of file
diff --git a/docs/docs/aztec/protocol/README.md b/docs/docs/aztec/protocol/README.md
deleted file mode 100644
index 42a5f6654cb..00000000000
--- a/docs/docs/aztec/protocol/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Goal of this dir
-
-Describe the protocol.
-
-Justify protocol decisions.
-
-Outline outstanding features, and any problems with the protocol.
-
-Describe limitations of the protocol.
\ No newline at end of file
diff --git a/docs/docs/aztec/protocol/key-management.md b/docs/docs/aztec/protocol/key-management.md
deleted file mode 100644
index a33f9aed043..00000000000
--- a/docs/docs/aztec/protocol/key-management.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# Keys!
-
-
-THIS IS OUT OF DATE
-
-## Types of Keys
-
-In order to read data from and send data to the Aztec Network, a user will need to have the following keys:
-
-- **Ethereum key**: Used for signing the `TxRequest`.
-- **Decryption key**: Used for decrypting data.
-- **Nullifier key**: Used for creating nullifier.
-
-> Q: not sure about dictating the derivation of a nullifier key in the way shown in this diagram.
-
-![](https://hackmd.io/_uploads/BJUkpupz3.png)
-
-
-## Ethereum Key
-
-A user will use an Ethereum key to sign the `TxRequest`. And the `callContext.msgSender` should be the public key of that Ethereum key. Kernel circuit checks that `TxRequest.signer == callContext.msgSender`. This ensures the `msgSender` is what it claims to be.
-
-A contract can then refer to `msgSender` and perform crucial checks. For example:
-
-```rust
-fn my_function() {
- require(whitelist[call_context.msg_sender] == true);
-}
-```
-
-An Ethereum key never leaves the Ethereum wallet. A dapp and the AztecRPCServer only see the signature and the public key.
-
-
-## Decryption Key
-
-Each account has one decryption key. It will try to decrypt all encrypted notes using this decryption key. If it successfully decrypts a piece of data, it can see the contract address, storage slot, and the decrypted information.
-
-When sending a note to an account, the sender will need to know the public key of the recipient's decryption key in order to encrypt the data for that account.
-
-Decryption keys are derived and managed by the key store. The AztecRPCServer requests the key from the injected key store when an account is connected. The key should never leave the AztecRPCServer (the account state, to be more specific), and it should never be exposed to the contracts.
-
-> Open Q: could we use the Ethereum secret key as the decryption key (which can then be used to derive a shared secret, which can then be used as an AES encryption key)?
-
-> Open Q: should we use AES encryption?
-
-
-## Nullifier Key
-
-Most privacy protocols use a secret key when generating a nullifier for a note. In applications such as zk.money or zcash, this ensures that only relevant parties who know the secret key can spend a note. In protocols like zexe, such a nullifier is used more generally to nullify a note (what they call 'records'). And so, we want contracts on Aztec to have the option of using a secret key to generate a nullifer.
-
-In Aztec, a contract can get a secret key (for some public key) from the data oracle. It can then use the given key, or modify it, to create a nullifier. For example:
-
-```rust
-global Generator = [0x1234, 0x5678];
-
-fn compute_nullifier(self, note_hash: Field) -> Field {
- let secret_key = oracle.get_secret_key(self.owner);
- let nullifier_key = secret_key * Generator;
- pedersen_hash([note_hash, nullifier_key])
-}
-```
-
-Because a contract can see the secret key, it's recommended to use a different secret key for each contract. If a malfunctioning contract exposes that secret key to the outputted public inputs, the user doesn't have to abandon their entire account just because this key is compromised.
-
-A key store can create one master secret key for an account, and then derives a new key using the contract address when requested by a contract.
-
-Note that not all nullifiers need to use a secret key. A contract can create a constant nullifier, for example, to guarantee that an action has been executed and can't be done again. Some nullifier schemes are now designed to not need a 'hot' secret key within the circuit (e.g. [plume](https://eprint.iacr.org/2022/1255.pdf)).
-
-
-## How to link the Ethereum key and other keys?
-
-A contract can define a state variable that maps an Ethereum key to a decryption public key:
-
-```rust
-global key_mappings: Mapping>;
-
-fn register(public_key: Field) {
- let eth_address = derive_eth_address(call_data.msg_sender);
- key_mappings[eth_address] = public_key;
-}
-```
-
-A function can then look up the public key using an Ethereum address:
-
-```rust
-fn transfer(amount: Field, recipient: EthAddress) {
- let note_recipient_public_key = key_mappings[recipient];
- // Use that public key when constructing the new note.
-
- let note_sender_public_key = key_mappings[call_context.msg_sender];
- let secret_key = oracle.get_secret_key(note_sender_public_key);
- // Use that secret key to compute the nullifier.
-}
-```
-
-What `key_mappings[recipient]` does is calling the oracle to get the public key for the recipient, from the public/private data tree (depending on whether the mapping is public or private). A membership check will happen to ensure an account note (public_key, recipient) has been created via the above `register` function.
\ No newline at end of file
diff --git a/docs/docs/aztec/protocol/lifecycle-of-a-note.md b/docs/docs/aztec/protocol/lifecycle-of-a-note.md
deleted file mode 100644
index c257af3d8ed..00000000000
--- a/docs/docs/aztec/protocol/lifecycle-of-a-note.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# The lifecycle of a note
-
-## Custom notes
-
-## Injection of data by the kernel
-
-Nonce & contract address
-
-## Custom nullifiers
-
-## Emission of custom note data to L1
-
-## Decrypting and storing encrypted note data
-
-Decryption and storing data and validating Note exists and computing nullifier
diff --git a/docs/docs/concepts/advanced/circuits/kernels/main.md b/docs/docs/concepts/advanced/circuits/kernels/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/protocol/circuits/private-kernel.md b/docs/docs/concepts/advanced/circuits/kernels/private_kernel.md
similarity index 95%
rename from docs/docs/aztec/protocol/circuits/private-kernel.md
rename to docs/docs/concepts/advanced/circuits/kernels/private_kernel.md
index 168b90e22d2..d079a3deaa8 100644
--- a/docs/docs/aztec/protocol/circuits/private-kernel.md
+++ b/docs/docs/concepts/advanced/circuits/kernels/private_kernel.md
@@ -16,10 +16,10 @@ This circuit is executed by the user, on their own device. This is to ensure pri
- public call stacks: hashes representing calls to other public functions;
- events;
- all data accumulated by all previous private kernel circuit recursions of this tx;
-- Hides which private function has been executed, by performing a zero-knowledge proof of membership against the [contract tree](../trees).
+- Hides which private function has been executed, by performing a zero-knowledge proof of membership against the [contract tree](../../data_structures/trees).
- Ensures the entire stack trace of private functions (for a particular tx) adheres to function execution rules.
- Verifies a previous 'Private Kernel Proof', recursively, when verifying transactions which are composed of many private function calls.
-- Optionally can [deploy](../contract-creation) a new private contract.
+- Optionally can [deploy](../../contract_creation) a new private contract.
> Note: **This is the only core protocol circuit which actually needs to be "zk" (zero knowledge)!!!** That's because this is the only core protocol circuit which handles private data, and hence the only circuit for which proofs must not leak any information about witnesses! (The private data being handled includes: details of the Noir Contract function which has been executed; the address of the user who executed the function; the intelligible inputs and outputs of that function).
> This is a really interesting point. Most so-called "zk-Rollups" do not make use of this "zero knowledge" property. Their snarks are "snarks"; with no need for zero-knowledge, because they don't seek privacy; they only seek the 'succinct' computation-compression properties of snarks. Aztec's "zk-Rollup" actually makes use of "zero knowledge" snarks. That's why we sometimes call it a "zk-zk-Rollup", or "_actual_ zk-Rollup".
diff --git a/docs/docs/aztec/protocol/circuits/public-kernel.md b/docs/docs/concepts/advanced/circuits/kernels/public_kernel.md
similarity index 83%
rename from docs/docs/aztec/protocol/circuits/public-kernel.md
rename to docs/docs/concepts/advanced/circuits/kernels/public_kernel.md
index 7dd9b7ca00c..0bd2c0b7870 100644
--- a/docs/docs/aztec/protocol/circuits/public-kernel.md
+++ b/docs/docs/concepts/advanced/circuits/kernels/public_kernel.md
@@ -2,7 +2,7 @@
title: Public Kernel Circuit
---
-This circuit is executed by a Sequencer, since only a Sequencer knows the current state of the [public data tree](../trees) at any time. A Sequencer might choose to delegate proof generation to the Prover pool.
+This circuit is executed by a Sequencer, since only a Sequencer knows the current state of the [public data tree](../../data_structures/trees) at any time. A Sequencer might choose to delegate proof generation to the Prover pool.
- Exposes (forwards) the following data to the next recursive circuit:
- all data accumulated by all previous private kernel circuit recursions of this tx;
diff --git a/docs/docs/aztec/protocol/circuits/circuits.md b/docs/docs/concepts/advanced/circuits/main.md
similarity index 94%
rename from docs/docs/aztec/protocol/circuits/circuits.md
rename to docs/docs/concepts/advanced/circuits/main.md
index ab098de8dbc..b959287941a 100644
--- a/docs/docs/aztec/protocol/circuits/circuits.md
+++ b/docs/docs/concepts/advanced/circuits/main.md
@@ -45,7 +45,7 @@ In other words, since neither the EVM nor other rollups have rules for how to pr
What kind of extra rules / checks does a rollup need, to enforce notions of private states and private functions? Stuff like:
-- "Perform state reads and writes using new tree structures which prevent tx linkability" (see [trees](trees)).
+- "Perform state reads and writes using new tree structures which prevent tx linkability" (see [trees](../data_structures/trees)).
- "Hide which function was just executed, by wrapping it in a zk-snark"
- "Hide all functions which were executed as part of this tx's stack trace, by wrapping the whole tx in a zk-snark"
@@ -55,12 +55,12 @@ So what kinds of core protocol circuits does Aztec have?
### Kernel Circuits
-- [Private Kernel Circuit](./circuits/private-kernel)
-- [Public Kernel Circuit](./circuits/public-kernel)
+- [Private Kernel Circuit](./kernels/private_kernel)
+- [Public Kernel Circuit](./kernels/public_kernel)
### Rollup Circuits
-- [Rollup Circuits](./circuits/rollup)
+- [Rollup Circuits](./rollup_circuits/main)
#### Squisher Circuits
diff --git a/docs/docs/concepts/advanced/circuits/rollup_circuits/base_rollup.md b/docs/docs/concepts/advanced/circuits/rollup_circuits/base_rollup.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/protocol/circuits/rollup.md b/docs/docs/concepts/advanced/circuits/rollup_circuits/main.md
similarity index 97%
rename from docs/docs/aztec/protocol/circuits/rollup.md
rename to docs/docs/concepts/advanced/circuits/rollup_circuits/main.md
index 42ca5b75016..6f76754b97d 100644
--- a/docs/docs/aztec/protocol/circuits/rollup.md
+++ b/docs/docs/concepts/advanced/circuits/rollup_circuits/main.md
@@ -24,7 +24,7 @@ For both transactions, it:
- Performs public state read membership checks.
- Updates the public data tree in line with the requested state transitions.
-- Checks that the nullifiers haven't previously been inserted into the [indexed nullifier tree](../trees/indexed-merkle-tree).
+- Checks that the nullifiers haven't previously been inserted into the [indexed nullifier tree](../../data_structures/indexed_merkle_tree).
- Batch-inserts new nullifiers into the nullifier tree.
- Batch-inserts new commitments into the private data tree
- Batch-inserts any new contract deployments into the contract tree.
diff --git a/docs/docs/concepts/advanced/circuits/rollup_circuits/merge_rollup.md b/docs/docs/concepts/advanced/circuits/rollup_circuits/merge_rollup.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/concepts/advanced/circuits/rollup_circuits/root_rollup.md b/docs/docs/concepts/advanced/circuits/rollup_circuits/root_rollup.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/protocol/contract-creation.md b/docs/docs/concepts/advanced/contract_creation.md
similarity index 99%
rename from docs/docs/aztec/protocol/contract-creation.md
rename to docs/docs/concepts/advanced/contract_creation.md
index 443fec241e7..b71962f3069 100644
--- a/docs/docs/aztec/protocol/contract-creation.md
+++ b/docs/docs/concepts/advanced/contract_creation.md
@@ -4,7 +4,7 @@ title: Contract Creation
-import Disclaimer from '../common/\_disclaimer.mdx';
+import Disclaimer from '../../misc/common/\_disclaimer.mdx';
diff --git a/docs/docs/aztec/protocol/trees/indexed-merkle-tree.mdx b/docs/docs/concepts/advanced/data_structures/indexed_merkle_tree.md
similarity index 99%
rename from docs/docs/aztec/protocol/trees/indexed-merkle-tree.mdx
rename to docs/docs/concepts/advanced/data_structures/indexed_merkle_tree.md
index 26c00027ce7..6448599ae9f 100644
--- a/docs/docs/aztec/protocol/trees/indexed-merkle-tree.mdx
+++ b/docs/docs/concepts/advanced/data_structures/indexed_merkle_tree.md
@@ -3,7 +3,7 @@ title: Indexed Merkle Tree
---
import Image from "@theme/IdealImage";
-import Disclaimer from "../../common/_disclaimer.mdx";
+import Disclaimer from "../../../misc/common/_disclaimer.mdx";
diff --git a/docs/docs/concepts/advanced/data_structures/main.md b/docs/docs/concepts/advanced/data_structures/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/protocol/trees/trees.mdx b/docs/docs/concepts/advanced/data_structures/trees.md
similarity index 98%
rename from docs/docs/aztec/protocol/trees/trees.mdx
rename to docs/docs/concepts/advanced/data_structures/trees.md
index 5264a72c6b0..75cbcdddf45 100644
--- a/docs/docs/aztec/protocol/trees/trees.mdx
+++ b/docs/docs/concepts/advanced/data_structures/trees.md
@@ -2,7 +2,7 @@
title: Trees
---
-import Disclaimer from "../../common/\_disclaimer.mdx";
+import Disclaimer from "../../../misc/common/\_disclaimer.mdx";
import Image from "@theme/IdealImage";
@@ -71,7 +71,7 @@ Instead of the term 'Note', other protocols might refer to a blob of data repres
## Nullifier Tree
-A nullifier tree is basically a tree whose leaf values must be unique. An attempt to insert a duplicate leaf value will be rejected. (See [indexed merkle tree](./trees/indexed-merkle-tree) for technical implementation details).
+A nullifier tree is basically a tree whose leaf values must be unique. An attempt to insert a duplicate leaf value will be rejected. (See [indexed merkle tree](./indexed_merkle_tree) for technical implementation details).
diff --git a/docs/docs/concepts/advanced/main.md b/docs/docs/concepts/advanced/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/protocol/circuits/public-vm.md b/docs/docs/concepts/advanced/public_vm.md
similarity index 99%
rename from docs/docs/aztec/protocol/circuits/public-vm.md
rename to docs/docs/concepts/advanced/public_vm.md
index 7f0fe39715d..39f584fc0bc 100644
--- a/docs/docs/aztec/protocol/circuits/public-vm.md
+++ b/docs/docs/concepts/advanced/public_vm.md
@@ -1,5 +1,5 @@
---
-title: Public VM Architecture
+title: Public VM
---
## Objectives
diff --git a/docs/docs/concepts/advanced/rollup_contract.md b/docs/docs/concepts/advanced/rollup_contract.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/developer/wallet-providers/keys.md b/docs/docs/concepts/foundation/accounts/keys.md
similarity index 94%
rename from docs/docs/aztec/developer/wallet-providers/keys.md
rename to docs/docs/concepts/foundation/accounts/keys.md
index 606b2cb03a1..d1545434a72 100644
--- a/docs/docs/aztec/developer/wallet-providers/keys.md
+++ b/docs/docs/concepts/foundation/accounts/keys.md
@@ -8,7 +8,7 @@ Typically, each account in Aztec is backed by two separate keys:
Signing keys allow their holder to act as their corresponding account in Aztec, similarly to the keys used for an Ethereum account. If a signing key is leaked, the user can potentially lose all their funds.
-Since Aztec implements full [signature abstraction](./account-abstraction.md), signing keys depend on the account contract implementation for each user. Usually, an account contract will validate a signature of the incoming payload against a known public key.
+Since Aztec implements full [signature abstraction](./main.md), signing keys depend on the account contract implementation for each user. Usually, an account contract will validate a signature of the incoming payload against a known public key.
```noir
fn entrypoint(
@@ -32,7 +32,7 @@ fn entrypoint(
}
```
-Still, different accounts may use different signing schemes, may require multi-factor authentication, or _may not even use signing keys_ and instead rely on other authentication mechanisms. Read [how to write an account contract](./writing-an-account-contract.md) for a full example of how to manage authentication.
+Still, different accounts may use different signing schemes, may require multi-factor authentication, or _may not even use signing keys_ and instead rely on other authentication mechanisms. Read [how to write an account contract](../../../dev_docs/wallets/writing_an_account_contract.md) for a full example of how to manage authentication.
Furthermore, and since signatures are fully abstracted, how the key is stored in the contract is abstracted as well and left to the developer of the account contract. Here are a few ideas on how to store them, each with their pros and cons.
@@ -76,7 +76,7 @@ This public key corresponds to the privacy master key of the account. In order t
Contracts that are not meant to represent a user who handles private state, usually non-account contracts such as applications, do not need to provide a valid public key, and can instead just use zero to denote that they are not expected to receive private notes.
:::info
-A side effect of enshrining and encoding encryption keys into the account address is that these keys cannot be rotated if they are leaked. Read more about this in the [account abstraction section](./account-abstraction.md#encryption-and-nullifying-keys).
+A side effect of enshrining and encoding encryption keys into the account address is that these keys cannot be rotated if they are leaked. Read more about this in the [account abstraction section](./main.md#encryption-and-nullifying-keys).
:::
### Encryption keys
@@ -120,8 +120,6 @@ This allows per-application auditability. A user may choose to disclose their in
In the case of nullifier secrets, there is also a security reason involved. Since the nullifier secret is exposed in plain text to the application contract, the contract may accidentally or maliciously leak it. If that happens, only the nullifier secret for that application is compromised.
-You can read more about key derivation in the [protocol section](../../protocol/key-management.md).
-
### Security considerations
A leaked privacy master key means a loss of privacy for the affected user. An attacker who holds the privacy private key of a user can derive the encryption private keys to decrypt all past inbound and outbound private notes, and can derive the nullifier secrets to determine when these notes were consumed.
diff --git a/docs/docs/aztec/developer/wallet-providers/account-abstraction.md b/docs/docs/concepts/foundation/accounts/main.md
similarity index 99%
rename from docs/docs/aztec/developer/wallet-providers/account-abstraction.md
rename to docs/docs/concepts/foundation/accounts/main.md
index cd18b141c08..9b994fc2f35 100644
--- a/docs/docs/aztec/developer/wallet-providers/account-abstraction.md
+++ b/docs/docs/concepts/foundation/accounts/main.md
@@ -1,4 +1,4 @@
-# Account Abstraction
+# Accounts
**Every account in Aztec is a smart contract** which defines the rules for whether a transaction is or not valid. This allows implementing different schemes for transaction signing, nonce management, and fee payments. However, encryption and nullifying keys, which are specific to private blockchains, are still enshrined at the protocol level.
@@ -60,7 +60,7 @@ def entryPoint(payload):
enqueueCall(to, data, value, gasLimit);
```
-Read more about how to write an account contract [here](./writing-an-account-contract.md).
+Read more about how to write an account contract [here](../../../dev_docs/wallets/writing_an_account_contract.md).
### Accounts and wallets
diff --git a/docs/docs/concepts/foundation/block_production.md b/docs/docs/concepts/foundation/block_production.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/concepts/foundation/blocks.md b/docs/docs/concepts/foundation/blocks.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/how-it-works/l1-l2-messaging.md b/docs/docs/concepts/foundation/communication/cross_chain_calls.md
similarity index 99%
rename from docs/docs/aztec/how-it-works/l1-l2-messaging.md
rename to docs/docs/concepts/foundation/communication/cross_chain_calls.md
index d94d6d38a9c..27d4f945744 100644
--- a/docs/docs/aztec/how-it-works/l1-l2-messaging.md
+++ b/docs/docs/concepts/foundation/communication/cross_chain_calls.md
@@ -4,7 +4,7 @@ title: L1 <--> L2 communication
import Image from "@theme/IdealImage";
-import Disclaimer from "../common/_disclaimer.mdx";
+import Disclaimer from "../../../misc/common/_disclaimer.mdx";
diff --git a/docs/docs/concepts/foundation/communication/main.md b/docs/docs/concepts/foundation/communication/main.md
new file mode 100644
index 00000000000..3dcd7fb7f5b
--- /dev/null
+++ b/docs/docs/concepts/foundation/communication/main.md
@@ -0,0 +1,9 @@
+---
+title: Contract Communication
+---
+
+This section will walk over communication types that behaves differently than normal function calls from.
+
+Namely, if functions are in different domains, private vs. public, their execution behaves a little differently to what you might expect! See [Private <--> Public execution](./public_private_calls.md).
+
+Likewise, executing a function on a different domain than its origin needs a bit extra thought. See [L1 <--> L2 communication](./cross_chain_calls.md).
\ No newline at end of file
diff --git a/docs/docs/aztec/how-it-works/private-public-execution.mdx b/docs/docs/concepts/foundation/communication/public_private_calls.md
similarity index 99%
rename from docs/docs/aztec/how-it-works/private-public-execution.mdx
rename to docs/docs/concepts/foundation/communication/public_private_calls.md
index 6e1cc4b1a86..1e259b58535 100644
--- a/docs/docs/aztec/how-it-works/private-public-execution.mdx
+++ b/docs/docs/concepts/foundation/communication/public_private_calls.md
@@ -4,7 +4,7 @@ title: Private <--> Public execution
import Image from "@theme/IdealImage";
-import Disclaimer from "../common/\_disclaimer.mdx";
+import Disclaimer from "../../../misc/common/\_disclaimer.mdx";
diff --git a/docs/docs/aztec/how-it-works/private-smart-contracts.md b/docs/docs/concepts/foundation/contracts.md
similarity index 96%
rename from docs/docs/aztec/how-it-works/private-smart-contracts.md
rename to docs/docs/concepts/foundation/contracts.md
index bdb3e3f9a2b..f4b6014b971 100644
--- a/docs/docs/aztec/how-it-works/private-smart-contracts.md
+++ b/docs/docs/concepts/foundation/contracts.md
@@ -1,8 +1,8 @@
---
-title: Private Smart Contracts
+title: Smart Contracts
---
-import Disclaimer from '../common/\_disclaimer.mdx';
+import Disclaimer from '../../misc/common/\_disclaimer.mdx';
diff --git a/docs/docs/concepts/foundation/globals.md b/docs/docs/concepts/foundation/globals.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/concepts/foundation/main.md b/docs/docs/concepts/foundation/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/concepts/foundation/nodes_clients/execution_client.md b/docs/docs/concepts/foundation/nodes_clients/execution_client.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/concepts/foundation/nodes_clients/main.md b/docs/docs/concepts/foundation/nodes_clients/main.md
new file mode 100644
index 00000000000..ed570a8d6f1
--- /dev/null
+++ b/docs/docs/concepts/foundation/nodes_clients/main.md
@@ -0,0 +1,3 @@
+---
+title: Nodes and Client
+---
\ No newline at end of file
diff --git a/docs/docs/concepts/foundation/nodes_clients/prover_client.md b/docs/docs/concepts/foundation/nodes_clients/prover_client.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/concepts/foundation/nodes_clients/sequencer_client.md b/docs/docs/concepts/foundation/nodes_clients/sequencer_client.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/how-it-works/private-state.md b/docs/docs/concepts/foundation/state_model.md
similarity index 78%
rename from docs/docs/aztec/how-it-works/private-state.md
rename to docs/docs/concepts/foundation/state_model.md
index b63391a5ab9..e29d1350849 100644
--- a/docs/docs/aztec/how-it-works/private-state.md
+++ b/docs/docs/concepts/foundation/state_model.md
@@ -1,12 +1,14 @@
---
-title: Private State
+title: State Model
---
-import Disclaimer from '../common/\_disclaimer.mdx';
+import Disclaimer from '../../misc/common/\_disclaimer.mdx';
-## Private state semantics and the UTXO model
+## Public State
+
+## Private State
Private state must be treated differently from public state and this must be expressed in the semantics of the Noir language.
@@ -26,3 +28,20 @@ This is achieved with two main features:
1. Users sign over transactions, not over specific UTXO's
2. Noir contracts support developer defined `unconstrained` getter functions to help dApp's make sense of UTXO's. e.g `getBalance()`. These functions can be called outside of a transaction context to read private state.
+
+
+### The lifecycle of a note
+
+#### Custom notes
+
+#### Injection of data by the kernel
+
+Nonce & contract address
+
+#### Custom nullifiers
+
+#### Emission of custom note data to L1
+
+#### Decrypting and storing encrypted note data
+
+Decryption and storing data and validating Note exists and computing nullifier
diff --git a/docs/docs/aztec/protocol/lifecycle-of-a-tx.md b/docs/docs/concepts/foundation/transactions.md
similarity index 84%
rename from docs/docs/aztec/protocol/lifecycle-of-a-tx.md
rename to docs/docs/concepts/foundation/transactions.md
index ed7738f7951..1eba93f6dc2 100644
--- a/docs/docs/aztec/protocol/lifecycle-of-a-tx.md
+++ b/docs/docs/concepts/foundation/transactions.md
@@ -1,8 +1,8 @@
---
-title: Lifecycle of an Aztec tx
+title: Transactions
---
-import Disclaimer from '../common/\_disclaimer.mdx';
+import Disclaimer from '../../misc/common/\_disclaimer.mdx';
diff --git a/docs/docs/concepts/foundation/upgrade_mechanism.md b/docs/docs/concepts/foundation/upgrade_mechanism.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/cryptography/main.md b/docs/docs/cryptography/main.md
new file mode 100644
index 00000000000..789bbe27104
--- /dev/null
+++ b/docs/docs/cryptography/main.md
@@ -0,0 +1,3 @@
+---
+title: Cryptography
+---
\ No newline at end of file
diff --git a/docs/docs/dev_docs/contracts/abi.md b/docs/docs/dev_docs/contracts/abi.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/developer/noir-contracts/errors.md b/docs/docs/dev_docs/contracts/common_errors.md
similarity index 100%
rename from docs/docs/aztec/developer/noir-contracts/errors.md
rename to docs/docs/dev_docs/contracts/common_errors.md
diff --git a/docs/docs/aztec/developer/noir-contracts/compiling-contracts.md b/docs/docs/dev_docs/contracts/compiling.md
similarity index 95%
rename from docs/docs/aztec/developer/noir-contracts/compiling-contracts.md
rename to docs/docs/dev_docs/contracts/compiling.md
index ec5156a8fb0..8f3fa83e6a6 100644
--- a/docs/docs/aztec/developer/noir-contracts/compiling-contracts.md
+++ b/docs/docs/dev_docs/contracts/compiling.md
@@ -1,6 +1,6 @@
# Compiling contracts
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
+Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
:::danger TODO
TODO: this entire page
diff --git a/docs/docs/aztec/developer/noir-contracts/concepts.md b/docs/docs/dev_docs/contracts/concepts.md
similarity index 99%
rename from docs/docs/aztec/developer/noir-contracts/concepts.md
rename to docs/docs/dev_docs/contracts/concepts.md
index 9789ea5fc75..8eaf513c77a 100644
--- a/docs/docs/aztec/developer/noir-contracts/concepts.md
+++ b/docs/docs/dev_docs/contracts/concepts.md
@@ -1,4 +1,4 @@
-# Concepts
+# Concepts [OLD BY MIKE, TO SPLIT]
diff --git a/docs/docs/dev_docs/contracts/constrain.md b/docs/docs/dev_docs/contracts/constrain.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/control_structure.md b/docs/docs/dev_docs/contracts/control_structure.md
new file mode 100644
index 00000000000..b769854fbe9
--- /dev/null
+++ b/docs/docs/dev_docs/contracts/control_structure.md
@@ -0,0 +1,14 @@
+---
+title: Control Structures
+---
+
+# Function Calls
+
+## Private Function Calls
+
+## Public Function Calls
+
+## Private to Public Function Calls
+
+## Public to Private Function Calls
+
diff --git a/docs/docs/dev_docs/contracts/deploying.md b/docs/docs/dev_docs/contracts/deploying.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/events.md b/docs/docs/dev_docs/contracts/events.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/functions.md b/docs/docs/dev_docs/contracts/functions.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/globals.md b/docs/docs/dev_docs/contracts/globals.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/layout.md b/docs/docs/dev_docs/contracts/layout.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/main.md b/docs/docs/dev_docs/contracts/main.md
new file mode 100644
index 00000000000..3750c0d661b
--- /dev/null
+++ b/docs/docs/dev_docs/contracts/main.md
@@ -0,0 +1,43 @@
+# Contracts
+
+## What is a Noir Contract?
+
+**Noir** is a domain specific language for creating and verifying proofs. It's design choices are influenced heavily by Rust.
+
+We've extended the Noir language to understand the notion of an **'Aztec smart contract'**.
+
+- A **smart contract** is just a collection of persistent state variables, and a collection of functions which may edit those state variables.
+- An **Aztec smart contract** is a smart contract with **private** state variables and **private** functions.
+- A **Noir Contract** is just an Aztec smart contract, written in Noir syntax.
+
+
+> Throughout these docs, we'll refer to "regular Noir" as being the version of Noir without the Noir Contract syntax.
+
+
+
+# Getting started
+
+Please consider using the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
+
+## Installing Noir
+
+To write a Noir Contract, you need to write Noir, and to write Noir, you need to [install Nargo](https://noir-lang.org/getting_started/nargo_installation).
+
+## Installing Noir tooling
+
+There are a number of tools to make writing Noir Contracts more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding).
+
+## Quick start
+
+Download an Aztec Box. (Josh / Ze to build :) ).
+
+Or, if you don't want to do that, here's more detail on doing it all yourself:
+
+:::danger TODO
+TODO
+:::
+
+## Creating a new contract package
+
+See [here](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts#creating-a-new-contract-package)
+
diff --git a/docs/docs/dev_docs/contracts/resources/common_patterns/access_control.md b/docs/docs/dev_docs/contracts/resources/common_patterns/access_control.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/common_patterns/common_patterns.md b/docs/docs/dev_docs/contracts/resources/common_patterns/common_patterns.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/common_patterns/interacting_with_l1.md b/docs/docs/dev_docs/contracts/resources/common_patterns/interacting_with_l1.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/common_patterns/main.md b/docs/docs/dev_docs/contracts/resources/common_patterns/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/common_patterns/sending_tokens_to_contract.md b/docs/docs/dev_docs/contracts/resources/common_patterns/sending_tokens_to_contract.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/common_patterns/sending_tokens_to_user.md b/docs/docs/dev_docs/contracts/resources/common_patterns/sending_tokens_to_user.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/main.md b/docs/docs/dev_docs/contracts/resources/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/resources/style_guide.md b/docs/docs/dev_docs/contracts/resources/style_guide.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/security/breaking_changes/main.md b/docs/docs/dev_docs/contracts/security/breaking_changes/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/security/breaking_changes/v0.md b/docs/docs/dev_docs/contracts/security/breaking_changes/v0.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/security/main.md b/docs/docs/dev_docs/contracts/security/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/storage.md b/docs/docs/dev_docs/contracts/storage.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/types.md b/docs/docs/dev_docs/contracts/types.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/contracts/visibility.md b/docs/docs/dev_docs/contracts/visibility.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/developer/dapps/building-dapps.md b/docs/docs/dev_docs/dapps/main.md
similarity index 84%
rename from docs/docs/aztec/developer/dapps/building-dapps.md
rename to docs/docs/dev_docs/dapps/main.md
index 51316d161f6..65a7b601d62 100644
--- a/docs/docs/aztec/developer/dapps/building-dapps.md
+++ b/docs/docs/dev_docs/dapps/main.md
@@ -1,6 +1,6 @@
# Building dapps
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
+Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
Explain how to write a dapp using [`aztec.js`](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js). Maybe that readme is enough?
@@ -17,7 +17,7 @@ Explain how to write a dapp using [`aztec.js`](https://github.com/AztecProtocol/
- Example of the function being used in a wider context?
- Walk-throughs / examples of using aztec.js for different use-cases
- Hopefully we can pull large code snippets directly from the e2e tests for this.
- - We could even add way more comments to the e2e test files directly, and then use the [#include_code](../../../../README.md#include_code-macro) to pull code snippets into the docs.
+ - We could even add way more comments to the e2e test files directly, and then use the include_code (see root README.md) to pull code snippets into the docs.
- Use the e2e tests as inspiration.
- Instantiate a contract
- Deploy a contract
@@ -32,10 +32,10 @@ Explain how to write a dapp using [`aztec.js`](https://github.com/AztecProtocol/
- How to filter for historic data in the historic block tree?
- How to query data from any of the trees (advanced)
-FOR INSTRUCTIONS FOR BUILDING A WALLET, WE SHOULD WRITE DOCS [HERE](../wallet-providers/building-a-wallet.md)
+FOR INSTRUCTIONS FOR BUILDING A WALLET, WE SHOULD WRITE DOCS [HERE](../wallets/building_a_wallet.md)
ERRORS:
-- Add any error explanations to [errors.md](./errors.md) (and break that file into multiple files if it's too unwieldy).
+- Add any error explanations to [errors.md](../contracts/common_errors.md) (and break that file into multiple files if it's too unwieldy).
## Testing a dapp
diff --git a/docs/docs/dev_docs/getting_started/main.md b/docs/docs/dev_docs/getting_started/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/noir.md b/docs/docs/dev_docs/getting_started/noir.md
similarity index 100%
rename from docs/docs/noir.md
rename to docs/docs/dev_docs/getting_started/noir.md
diff --git a/docs/docs/dev_docs/getting_started/sandbox.md b/docs/docs/dev_docs/getting_started/sandbox.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/developer/sandbox/errors.md b/docs/docs/dev_docs/sandbox/common_errors.md
similarity index 89%
rename from docs/docs/aztec/developer/sandbox/errors.md
rename to docs/docs/dev_docs/sandbox/common_errors.md
index 5a616f7704f..5552601ff65 100644
--- a/docs/docs/aztec/developer/sandbox/errors.md
+++ b/docs/docs/dev_docs/sandbox/common_errors.md
@@ -2,13 +2,16 @@
title: Aztec Sandbox Errors
---
-This section contains a list of errors you may encounter when using Aztec Sanbox and an explanation of each of them.
+import Disclaimer from '../../misc/common/\_disclaimer.mdx';
+
+
+This section contains a list of errors you may encounter when using Aztec Sandbox and an explanation of each of them.
## Circuit Errors
**To prevent bloating this doc, here is a list of some of the common errors. Feel free to have a look at [circuit_errors.hpp](https://github.com/AztecProtocol/aztec-packages/blob/master/circuits/cpp/src/aztec3/utils/circuit_errors.hpp) for a list of all possible circuit errors.**
### Kernel Circuits
-We have several versions of public and private kernels as explained in [our circuits section](../../protocol/circuits/circuits.md). Certain things are only possible in certain versions of the circuits. So always ensure that the right version is being used for proof generation. For example, there is a specific version of the public kernel that only works if the previous kernel iteration was a private kernel. Similarly there is one that only works if the previous kernel was public.
+We have several versions of public and private kernels as explained in [our circuits section](../../concepts/advanced/circuits/main.md). Certain things are only possible in certain versions of the circuits. So always ensure that the right version is being used for proof generation. For example, there is a specific version of the public kernel that only works if the previous kernel iteration was a private kernel. Similarly there is one that only works if the previous kernel was public.
Remember that for each function call (i.e. each item in the call stack), there is a new kernel iteration that gets run.
@@ -65,7 +68,7 @@ You are trying to do something that is currently unsupported in the public kerne
Calling a private noir function in a public kernel is not allowed.
#### 3005 - PUBLIC_KERNEL__NON_EMPTY_PRIVATE_CALL_STACK
-Public functions are executed after all the private functions are (see [private-public execution](../../how-it-works/private-public-execution.mdx)). As such, private call stack must be empty when executing in the public kernel.
+Public functions are executed after all the private functions are (see [private-public execution](../../concepts/foundation/communication/public_private_calls.md)). As such, private call stack must be empty when executing in the public kernel.
#### 3011 - PUBLIC_KERNEL__CALCULATED_PRIVATE_CALL_HASH_AND_PROVIDED_PRIVATE_CALL_HASH_MISMATCH
When the hash stored at the top most of the call stack is different to the call stack item expected by the public kernel's inputs.
@@ -98,7 +101,7 @@ For static calls, no new commitments or nullifiers can be added to the state.
For static calls, no new commitments or nullifiers can be added to the state.
### Rollup circuit errors
-These are errors that occur when kernel proofs (transaction proofs) are sent to the rollup circuits to create an L2 block. See [rollup circuits](../../protocol/circuits/rollup.md) for more information.
+These are errors that occur when kernel proofs (transaction proofs) are sent to the rollup circuits to create an L2 block. See [rollup circuits](../../concepts/advanced/circuits/rollup_circuits/main.md) for more information.
#### 4007 - BASE__INVALID_CHAIN_ID
The L1 chain ID you used in your proof generation (for your private transaction) is different to what the rollup circuits expected. Double check against the global variables passed to noir and the config set in [Aztec's rollup contract](https://github.com/AztecProtocol/aztec-packages/blob/master/l1-contracts/src/core/Rollup.sol) which are [read in by sequencer](https://github.com/AztecProtocol/aztec3-packages/blob/master/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts#L32) and subsequently passed in as inputs to the base rollup. When the sequencer submits the block to the rollup contracts, this is again sanity checked so ensure this is the same everywhere.
@@ -106,7 +109,7 @@ The L1 chain ID you used in your proof generation (for your private transaction)
#### 4008 - BASE__INVALID_VERSION
Same as [section 4007](#4007---base__invalid_chain_id) except the `version` refers to the version of the Aztec L2 instance.
-Some scary bugs like `4003 - BASE__INVALID_NULLIFIER_SUBTREE` and `4004 - BASE__INVALID_NULLIFIER_RANGE` which are to do malformed nullifier trees (see [Indexed Merkle Trees](../../protocol/trees/indexed-merkle-tree.mdx)) etc may seem unrelated at a glance, but at a closer look may be because of some bug in an application's Noir code. Same is true for certain instances of `7008 - MEMBERSHIP_CHECK_FAILED`.
+Some scary bugs like `4003 - BASE__INVALID_NULLIFIER_SUBTREE` and `4004 - BASE__INVALID_NULLIFIER_RANGE` which are to do malformed nullifier trees (see [Indexed Merkle Trees](../../concepts/advanced/data_structures/indexed_merkle_tree.md)) etc may seem unrelated at a glance, but at a closer look may be because of some bug in an application's Noir code. Same is true for certain instances of `7008 - MEMBERSHIP_CHECK_FAILED`.
### Generic circuit errors
@@ -136,7 +139,7 @@ Users may create a proof against a historic state in Aztec. The rollup circuits
* using invalid historic L1 to L2 message data tree state
* inserting a subtree into the greater tree
- we make a smaller merkle tree of all the new commitments/nullifiers etc that were created in a transaction or in a rollup and add it to the bigger state tree. Before inserting, we do a merkle membership check to ensure that the index to insert at is indeed an empty subtree (otherwise we would be overwriting state). This can happen when `next_available_leaf_index` in the state tree's snapshot is wrong (it is fetched by the sequencer from the archiver). The error message should reveal which tree is causing this issue
- - nullifier tree related errors - The nullifier tree uses an [Indexed Merkle Tree](../../protocol/trees/indexed-merkle-tree.mdx). It requires additional data from the archiver to know which is the nullifier in the tree that is just below the current nullifier before it can perform batch insertion. If the low nullifier is wrong, or the nullifier is in incorrect range, you may receive this error.
+ - nullifier tree related errors - The nullifier tree uses an [Indexed Merkle Tree](../../concepts/advanced/data_structures/indexed_merkle_tree.md). It requires additional data from the archiver to know which is the nullifier in the tree that is just below the current nullifier before it can perform batch insertion. If the low nullifier is wrong, or the nullifier is in incorrect range, you may receive this error.
---
@@ -154,7 +157,7 @@ Users may create a proof against a historic state in Aztec. The rollup circuits
* "${treeName} tree next available leaf index mismatch" - validating a tree's root is not enough. It also checks that the `next_avaliable_leaf_index` is as expected. This is the next index we can insert new values into. Note that for the public data tree, this test is skipped since as it is a sparse tree unlike the others.
-* "Public call stack size exceeded" - In Aztec, the sequencer executes all enqueued public functions in a transaction (to prevent race conditions - see [private-public execution](../../how-it-works/private-public-execution.mdx)). This error says there are too many public functions requested.
+* "Public call stack size exceeded" - In Aztec, the sequencer executes all enqueued public functions in a transaction (to prevent race conditions - see [private-public execution](../../concepts/foundation/communication/public_private_calls.md)). This error says there are too many public functions requested.
* "Array size exceeds target length" - happens if you add more items than allowed by the constants set due to our circuit limitations (eg sending too many L2 to L1 messages or creating a function that exceeds the call stack length or return more values than what Noir functions allows)
@@ -162,7 +165,3 @@ Users may create a proof against a historic state in Aztec. The rollup circuits
## L1 Aztec Contract Errors
Aztec's L1 contracts use custom errors in solidity. While it saves gas, it has a side effect of making it harder to decode when things go wrong. If you get an error when submitting an L2Block into our rollup contract or when interacting with our Inbox/Outbox contracts, you can use the [Errors.sol library](https://github.com/AztecProtocol/aztec-packages/blob/master/l1-contracts/src/core/libraries/Errors.sol) to match the hex encoded error to the error name.
-
-
-import Disclaimer from '../../common/\_disclaimer.mdx';
-
\ No newline at end of file
diff --git a/docs/docs/aztec/developer/sandbox/components.md b/docs/docs/dev_docs/sandbox/components.md
similarity index 99%
rename from docs/docs/aztec/developer/sandbox/components.md
rename to docs/docs/dev_docs/sandbox/components.md
index 7b7fff5e77d..588aeaa016f 100644
--- a/docs/docs/aztec/developer/sandbox/components.md
+++ b/docs/docs/dev_docs/sandbox/components.md
@@ -4,7 +4,7 @@ title: Components
-import Disclaimer from '../../common/\_disclaimer.mdx';
+import Disclaimer from '../../misc/common/\_disclaimer.mdx';
diff --git a/docs/docs/aztec/developer/sandbox/sandbox.md b/docs/docs/dev_docs/sandbox/main.md
similarity index 81%
rename from docs/docs/aztec/developer/sandbox/sandbox.md
rename to docs/docs/dev_docs/sandbox/main.md
index c22a6c4a642..268af818818 100644
--- a/docs/docs/aztec/developer/sandbox/sandbox.md
+++ b/docs/docs/dev_docs/sandbox/main.md
@@ -1,7 +1,10 @@
-# The Aztec Sandbox
+---
+title: Aztec Sandbox
+---
+# The Aztec Sandbox
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
+Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
# GETTING STARTED:
@@ -31,7 +34,7 @@ Very quick, and to the point one-pager: https://github.com/AztecProtocol/aztec-p
- aztec.js
- What is aztec.js?
- When would someone prefer using aztec.js over the cli?
- - We should also have a detailed aztec.js section (see [here](../dapps/building-dapps.md))
+ - We should also have a detailed aztec.js section (see [here](../dapps/main.md))
- RPC calls directly?
- How would an advanced user make rpc calls directly to the sandbox? Can they, even?
@@ -39,10 +42,10 @@ Very quick, and to the point one-pager: https://github.com/AztecProtocol/aztec-p
- Refer directly to the npm package's explanations?
-FOR INSTRUCTIONS FOR BUILDING A WALLET, WE SHOULD WRITE DOCS [HERE](../wallet-providers/building-a-wallet.md)
+FOR INSTRUCTIONS FOR BUILDING A WALLET, WE SHOULD WRITE DOCS [HERE](../wallets/building_a_wallet.md)
ERRORS:
-- Add any error explanations to [errors.md](./errors.md) (and break that file into multiple files if it's too unwieldy).
+- Add any error explanations to [errors.md](./common_errors.md) (and break that file into multiple files if it's too unwieldy).
- RPC calls directly
diff --git a/docs/docs/dev_docs/testing/cheat_codes.md b/docs/docs/dev_docs/testing/cheat_codes.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/developer/noir-contracts/testing-contracts.md b/docs/docs/dev_docs/testing/main.md
similarity index 69%
rename from docs/docs/aztec/developer/noir-contracts/testing-contracts.md
rename to docs/docs/dev_docs/testing/main.md
index 4143c92f606..ca7cd33a835 100644
--- a/docs/docs/aztec/developer/noir-contracts/testing-contracts.md
+++ b/docs/docs/dev_docs/testing/main.md
@@ -1,13 +1,9 @@
# Testing contracts
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
+Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
## Testing in Noir
Individual functions can be tested much like [how 'regular Noir' functions can be tested](https://noir-lang.org/nargo/testing).
-But a Noir Contract typically tracks state variables, so you'll likely need to write more complex tests in TypeScript, using Aztec.js
-
-## Testing in TypeScript
-
-See [testing a dapp](../dapps/building-dapps.md).
\ No newline at end of file
+But a Noir Contract typically tracks state variables, so you'll likely need to write more complex tests in TypeScript, using Aztec.js
\ No newline at end of file
diff --git a/docs/docs/dev_docs/testing/writing_a_test.md b/docs/docs/dev_docs/testing/writing_a_test.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/dev_docs/wallets/building_a_wallet.md b/docs/docs/dev_docs/wallets/building_a_wallet.md
new file mode 100644
index 00000000000..b658a9b9a0b
--- /dev/null
+++ b/docs/docs/dev_docs/wallets/building_a_wallet.md
@@ -0,0 +1,3 @@
+# Building a wallet
+
+Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
\ No newline at end of file
diff --git a/docs/docs/dev_docs/wallets/main.md b/docs/docs/dev_docs/wallets/main.md
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/docs/docs/aztec/developer/wallet-providers/writing-an-account-contract.md b/docs/docs/dev_docs/wallets/writing_an_account_contract.md
similarity index 50%
rename from docs/docs/aztec/developer/wallet-providers/writing-an-account-contract.md
rename to docs/docs/dev_docs/wallets/writing_an_account_contract.md
index 250dce39d35..1cee38c54ec 100644
--- a/docs/docs/aztec/developer/wallet-providers/writing-an-account-contract.md
+++ b/docs/docs/dev_docs/wallets/writing_an_account_contract.md
@@ -1,3 +1,3 @@
# Writing an Account Contract
-Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL-TEMPLATE.md) for standalone guides / tutorials.
\ No newline at end of file
+Please use the [TUTORIAL-TEMPLATE](../../TUTORIAL_TEMPLATE.md) for standalone guides / tutorials.
\ No newline at end of file
diff --git a/docs/docs/embedding-github-code.md b/docs/docs/embedding_github_code.md
similarity index 100%
rename from docs/docs/embedding-github-code.md
rename to docs/docs/embedding_github_code.md
diff --git a/docs/docs/what-is-aztec.md b/docs/docs/intro.md
similarity index 89%
rename from docs/docs/what-is-aztec.md
rename to docs/docs/intro.md
index 2f4346ca4b4..5507b610eaa 100644
--- a/docs/docs/what-is-aztec.md
+++ b/docs/docs/intro.md
@@ -1,6 +1,6 @@
---
slug: "/"
-id: intro
+id: "intro"
title: What is Aztec?
---
@@ -46,9 +46,9 @@ Plus:
# Play!
-[Write a private smart contract today](./aztec/developer/noir-contracts/getting-started.md).
+[Write a private smart contract today](./dev_docs/getting_started/main.md).
-[Deploy to the Aztec Sandbox today](./aztec/developer/sandbox/sandbox.md)
+[Deploy to the Aztec Sandbox today](./dev_docs/sandbox/main.md)
---
diff --git a/docs/docs/aztec-connect-sunset.mdx b/docs/docs/misc/aztec_connect_sunset.mdx
similarity index 100%
rename from docs/docs/aztec-connect-sunset.mdx
rename to docs/docs/misc/aztec_connect_sunset.mdx
diff --git a/docs/docs/aztec/common/_disclaimer.mdx b/docs/docs/misc/common/_disclaimer.mdx
similarity index 100%
rename from docs/docs/aztec/common/_disclaimer.mdx
rename to docs/docs/misc/common/_disclaimer.mdx
diff --git a/docs/docs/glossary.md b/docs/docs/misc/glossary.md
similarity index 93%
rename from docs/docs/glossary.md
rename to docs/docs/misc/glossary.md
index b8580a7c426..85c58459cfa 100644
--- a/docs/docs/glossary.md
+++ b/docs/docs/misc/glossary.md
@@ -36,8 +36,4 @@ Previously in [Aztec Connect](https://medium.com/aztec-protocol/sunsetting-aztec
### Provers
Aztec will be launched with a fully permissionless proving network that anyone can participate in.
-How this works will be discussed via a future RFP process on Discourse, similarly to the Sequencer RFP.
-
-### Misc
-
-For other definitions please see the [components](./aztec/developer/sandbox/components) section.
+How this works will be discussed via a future RFP process on Discourse, similarly to the Sequencer RFP.
\ No newline at end of file
diff --git a/docs/package.json b/docs/package.json
index bee5a533fb5..380b97890e7 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -10,7 +10,7 @@
"build": "yarn preprocess && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
- "clear": "docusaurus clear",
+ "clear": "rm -rf 'processed-docs' 'processed-docs-cache' && docusaurus clear",
"serve": "docusaurus serve",
"preprocess": "yarn node ./src/preprocess/index.js",
"preprocess:dev": "nodemon --config nodemon.json ./src/preprocess/index.js",
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 19b5e3ad421..0f5eefd7a19 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -14,142 +14,305 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docsSidebar: [
- "intro",
+ {
+ type: "html",
+ value: '',
+ },
+ {
+ type: "html",
+ className: "sidebar-title",
+ value: "About Aztec",
+ defaultStyle: true,
+ },
- "embedding-github-code",
+ {
+ label: "What is Aztec?",
+ type: "category",
+ link: { type: "doc", id: "intro" },
+ items: ["about_aztec/history/history", "about_aztec/overview"],
+ },
- "vision",
+ "about_aztec/vision",
{
- label: "Aztec",
+ label: "Roadmap",
type: "category",
link: {
type: "doc",
- id: "aztec/overview",
+ id: "about_aztec/roadmap/main",
},
items: [
+ "about_aztec/roadmap/features_initial_ldt",
+ "about_aztec/roadmap/milestones",
+ "about_aztec/roadmap/cryptography_roadmap",
+ ],
+ },
+
+ "about_aztec/how_to_contribute",
+
+ {
+ type: "html",
+ value: '',
+ },
+ {
+ type: "html",
+ className: "sidebar-title",
+ value: "Specification",
+ defaultStyle: true,
+ },
+
+ {
+ label: "Foundational Concepts",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/foundation/main",
+ },
+ items: [
+ "concepts/foundation/state_model",
+ {
+ label: "Accounts",
+ type: "category",
+ link: { type: "doc", id: "concepts/foundation/accounts/main" },
+ items: ["concepts/foundation/accounts/keys"],
+ },
+ "concepts/foundation/contracts",
+ "concepts/foundation/transactions",
+ "concepts/foundation/blocks",
+ "concepts/foundation/globals",
{
- label: "How it works",
+ label: "Communication",
type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/foundation/communication/main",
+ },
items: [
- "aztec/how-it-works/private-smart-contracts",
- "aztec/how-it-works/private-state",
- "aztec/how-it-works/private-public-execution",
- "aztec/how-it-works/l1-l2-messaging", // TODO: move to protocol?
+ "concepts/foundation/communication/public_private_calls",
+ "concepts/foundation/communication/cross_chain_calls",
],
},
-
{
- label: "Developer",
+ label: "Nodes and Clients",
type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/foundation/nodes_clients/main",
+ },
items: [
- {
- label: "Dapps",
- type: "category",
- items: [
- "aztec/developer/dapps/building-dapps", // TODO
- ],
- },
- {
- label: "Noir Contracts",
- type: "category",
- items: [
- "aztec/developer/noir-contracts/noir-contracts",
- "aztec/developer/noir-contracts/getting-started",
- "aztec/developer/noir-contracts/concepts",
- "aztec/developer/noir-contracts/compiling-contracts",
- "aztec/developer/noir-contracts/testing-contracts",
- "aztec/developer/noir-contracts/errors",
- ],
- },
- {
- label: "Portal Contracts",
- type: "category",
- items: ["aztec/developer/portal-contracts/portal-contracts"],
- },
- {
- label: "Sandbox",
- type: "category",
- items: [
- "aztec/developer/sandbox/sandbox",
- "aztec/developer/sandbox/components",
- "aztec/developer/sandbox/errors",
- ],
- },
- {
- label: "Wallet Providers",
- type: "category",
- items: [
- "aztec/developer/wallet-providers/building-a-wallet",
- "aztec/developer/wallet-providers/keys",
- "aztec/developer/wallet-providers/account-abstraction",
- "aztec/developer/wallet-providers/writing-an-account-contract",
- ],
- },
+ "concepts/foundation/nodes_clients/execution_client",
+ "concepts/foundation/nodes_clients/prover_client",
+ "concepts/foundation/nodes_clients/sequencer_client",
],
},
+ "concepts/foundation/block_production",
+ "concepts/foundation/upgrade_mechanism",
+ ],
+ },
+ {
+ label: "Advanced Concepts",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/advanced/main",
+ },
+ items: [
+ {
+ label: "Data Structures",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/advanced/data_structures/main",
+ },
+ items: [
+ "concepts/advanced/data_structures/trees",
+ "concepts/advanced/data_structures/indexed_merkle_tree",
+ ],
+ },
{
- label: "Protocol",
+ label: "Circuits",
type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/advanced/circuits/main",
+ },
items: [
{
- label: "Trees",
+ label: "Kernels",
type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/advanced/circuits/kernels/main",
+ },
items: [
- "aztec/protocol/trees/trees",
- "aztec/protocol/trees/indexed-merkle-tree",
+ "concepts/advanced/circuits/kernels/private_kernel",
+ "concepts/advanced/circuits/kernels/public_kernel",
],
},
-
{
- label: "Circuits",
+ label: "Rollup Circuits",
type: "category",
+ link: {
+ type: "doc",
+ id: "concepts/advanced/circuits/rollup_circuits/main",
+ },
items: [
- "aztec/protocol/circuits/circuits",
- "aztec/protocol/circuits/private-kernel",
- "aztec/protocol/circuits/public-kernel",
- "aztec/protocol/circuits/rollup",
- "aztec/protocol/circuits/public-vm",
+ "concepts/advanced/circuits/rollup_circuits/base_rollup",
+ "concepts/advanced/circuits/rollup_circuits/merge_rollup",
+ "concepts/advanced/circuits/rollup_circuits/root_rollup",
],
},
-
- "aztec/protocol/contract-creation",
],
},
- {
- label: "Cryptography",
- type: "category",
- items: ["aztec/cryptography/cryptography"],
- },
+ "concepts/advanced/public_vm",
+
+ "concepts/advanced/contract_creation",
+ "concepts/advanced/rollup_contract",
+ ],
+ },
+
+ {
+ type: "html",
+ value: '',
+ },
+ {
+ type: "html",
+ className: "sidebar-title",
+ value: "Developer Documentation",
+ defaultStyle: true,
+ },
+ {
+ label: "Getting Started",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/getting_started/main",
+ },
+ items: [
+ "dev_docs/getting_started/noir",
+ "dev_docs/getting_started/sandbox",
+ ],
+ },
+
+ {
+ label: "Contracts",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/contracts/main",
+ },
+ items: [
+ "dev_docs/contracts/concepts",
+ "dev_docs/contracts/layout",
+ "dev_docs/contracts/control_structure",
+ "dev_docs/contracts/globals",
+ "dev_docs/contracts/events",
+ "dev_docs/contracts/storage",
+ "dev_docs/contracts/types",
+ "dev_docs/contracts/visibility",
+ "dev_docs/contracts/functions",
+ "dev_docs/contracts/constrain",
+ "dev_docs/contracts/compiling",
+ "dev_docs/contracts/deploying",
{
- label: "Roadmap",
+ label: "Resources",
type: "category",
items: [
- "aztec/milestones/features-initial-ldt",
- "aztec/milestones/milestones",
- "aztec/milestones/cryptography-roadmap",
+ "dev_docs/contracts/resources/style_guide",
+ {
+ label: "Common Patterns",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/contracts/resources/common_patterns/main",
+ },
+ items: [
+ "dev_docs/contracts/resources/common_patterns/sending_tokens_to_user",
+ "dev_docs/contracts/resources/common_patterns/sending_tokens_to_contract",
+ "dev_docs/contracts/resources/common_patterns/access_control",
+ "dev_docs/contracts/resources/common_patterns/interacting_with_l1",
+ ],
+ },
],
},
-
{
- label: "History",
+ label: "Security Considerations",
type: "category",
items: [
- "aztec/history/history",
- "aztec/history/differences-to-aztec-connect",
+ {
+ label: "Breaking changes",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/contracts/security/breaking_changes/main",
+ },
+ items: ["dev_docs/contracts/security/breaking_changes/v0"],
+ },
],
},
],
},
- "noir",
+ {
+ label: "Sandbox",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/sandbox/main",
+ },
+ items: ["dev_docs/sandbox/components", "dev_docs/sandbox/common_errors"],
+ },
+
+ {
+ label: "Testing",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/testing/main",
+ },
+ items: [
+ "dev_docs/testing/writing_a_test",
+ "dev_docs/testing/cheat_codes",
+ ],
+ },
+
+ {
+ label: "Wallets",
+ type: "category",
+ link: {
+ type: "doc",
+ id: "dev_docs/wallets/main",
+ },
+ items: [
+ "dev_docs/wallets/building_a_wallet",
+ "dev_docs/wallets/writing_an_account_contract",
+ ],
+ },
+
+ {
+ type: "html",
+ value: '',
+ },
+ {
+ type: "html",
+ className: "sidebar-title",
+ value: "Miscellaneous",
+ defaultStyle: true,
+ },
+
+ "misc/glossary",
+
+ {
+ type: "html",
+ value: '',
+ },
- "aztec-connect-sunset",
+ "misc/aztec_connect_sunset",
- "glossary",
+ "embedding_github_code",
],
};
diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css
index 4d7394f8fbf..211359f11b2 100644
--- a/docs/src/css/custom.css
+++ b/docs/src/css/custom.css
@@ -85,3 +85,26 @@
font-family: 'Plain-Regular';
src: url('../../static/font/Plain-Regular.otf');
}
+
+
+.sidebar-divider {
+ border-top: 1px solid var(--ifm-color-gray-200);
+ display: block;
+ margin: 0.5rem 0 0.25rem 1rem;
+}
+
+html[data-theme='dark'] .sidebar-divider {
+ border-top: 1px solid var(--ifm-color-gray-800);
+}
+
+.sidebar-title {
+ font-size: 0.8rem;
+ letter-spacing: 0.05rem;
+ text-transform: uppercase;
+ font-weight: 600;
+ color: var(--ifm-color-gray-600);
+}
+
+html[data-theme='dark'] .sidebar-divider {
+ color: var(--ifm-color-gray-200);
+}
\ No newline at end of file