Skip to content

Commit

Permalink
docs: enable protocol specs for docs in dev mode (#11219)
Browse files Browse the repository at this point in the history
`yarn dev` or `yarn dev:local` now show protocol specs, but `yarn build`
or `yarn docs` does not. You can also enable via
`SHOW_PROTOCOL_SPECS=1`. Moved protocol specs back to original folder.
  • Loading branch information
dbanks12 authored Jan 14, 2025
1 parent 93ade26 commit 10c8afe
Show file tree
Hide file tree
Showing 100 changed files with 235 additions and 1,606 deletions.
1,603 changes: 0 additions & 1,603 deletions docs/docs/_protocol-specs/public-vm/gen/_instruction-set.mdx

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 11 additions & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ const config = {
);
},
routeBasePath: "/",
include: ["**/*.{md,mdx}"],
include: process.env.SHOW_PROTOCOL_SPECS
? ['**/*.{md,mdx}']
: ['**/*.{md,mdx}', '!protocol-specs/**'],

remarkPlugins: [math],
rehypePlugins: [
[
Expand Down Expand Up @@ -298,6 +301,13 @@ const config = {
label: "Roadmap",
className: "no-external-icon",
},
...(process.env.SHOW_PROTOCOL_SPECS ?
[{
type: "docSidebar",
sidebarId: "protocolSpecSidebar",
label: "Protocol Specification",
className: "no-external-icon",
}] : []),
{
to: "https://noir-lang.org/docs",
label: "Noir docs",
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"scripts": {
"docs": "yarn preprocess && yarn typedoc && docusaurus start --host ${HOST:-localhost}",
"dev": "HOST=0.0.0.0 ENV=dev yarn docs",
"dev:local": "ENV=dev yarn docs",
"dev": "HOST=0.0.0.0 ENV=dev SHOW_PROTOCOL_SPECS=true yarn docs",
"dev:local": "ENV=dev SHOW_PROTOCOL_SPECS=true yarn docs",
"build": "./scripts/build.sh",
"swizzle": "docusaurus swizzle",
"clean": "./scripts/clean.sh",
Expand Down
222 changes: 222 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,226 @@ export default {
dirName: "aztec/roadmap",
},
],

...(process.env.SHOW_PROTOCOL_SPECS ? {
protocolSpecSidebar: [
"protocol-specs/intro",
{
label: "Cryptography",
type: "category",
link: { type: "doc", id: "protocol-specs/cryptography/index" },
items: [
{
label: "Proving System",
type: "category",
items: [
"protocol-specs/cryptography/proving-system/performance-targets",
"protocol-specs/cryptography/proving-system/overview",
"protocol-specs/cryptography/proving-system/data-bus",
],
},
{
label: "Hashing",
type: "category",
items: [
"protocol-specs/cryptography/hashing/hashing",
"protocol-specs/cryptography/hashing/poseidon2",
"protocol-specs/cryptography/hashing/pedersen",
],
},
"protocol-specs/cryptography/merkle-trees",
],
},
{
label: "Addresses & Keys",
type: "category",
link: { type: "doc", id: "protocol-specs/addresses-and-keys/index" },
items: [
"protocol-specs/addresses-and-keys/address",
"protocol-specs/addresses-and-keys/keys-requirements",
"protocol-specs/addresses-and-keys/keys",
{
label: "Example Usage of Keys",
type: "category",
items: [
"protocol-specs/addresses-and-keys/example-usage/nullifier",
"protocol-specs/addresses-and-keys/example-usage/diversified-and-stealth-keys",
"protocol-specs/addresses-and-keys/example-usage/tag-sequence-derivation",
"protocol-specs/addresses-and-keys/example-usage/encrypt-and-tag",
],
},
"protocol-specs/addresses-and-keys/precompiles",
"protocol-specs/addresses-and-keys/diversified-and-stealth",
],
},
{
label: "State",
type: "category",
link: { type: "doc", id: "protocol-specs/state/index" },
items: [
"protocol-specs/state/tree-implementations",
"protocol-specs/state/archive",
"protocol-specs/state/note-hash-tree",
"protocol-specs/state/nullifier-tree",
"protocol-specs/state/public-data-tree",
"protocol-specs/state/wonky-tree",
],
},
{
label: "Transactions",
type: "category",
link: { type: "doc", id: "protocol-specs/transactions/index" },
items: [
"protocol-specs/transactions/local-execution",
"protocol-specs/transactions/public-execution",
"protocol-specs/transactions/tx-object",
"protocol-specs/transactions/validity",
],
},
{
label: "Bytecode",
type: "category",
link: { type: "doc", id: "protocol-specs/bytecode/index" },
items: [],
},
{
label: "Contract Deployment",
type: "category",
link: { type: "doc", id: "protocol-specs/contract-deployment/index" },
items: [
"protocol-specs/contract-deployment/classes",
"protocol-specs/contract-deployment/instances",
],
},
{
label: "Calls",
type: "category",
link: { type: "doc", id: "protocol-specs/calls/index" },
items: [
"protocol-specs/calls/sync-calls",
"protocol-specs/calls/enqueued-calls",
"protocol-specs/calls/batched-calls",
"protocol-specs/calls/static-calls",
"protocol-specs/calls/unconstrained-calls",
"protocol-specs/calls/public-private-messaging",
],
},
{
label: "L1 smart contracts",
type: "category",
link: { type: "doc", id: "protocol-specs/l1-smart-contracts/index" },
items: ["protocol-specs/l1-smart-contracts/frontier"],
},
{
label: "Data availability",
type: "category",
link: {
type: "doc",
id: "protocol-specs/data-publication-and-availability/index",
},
items: [
"protocol-specs/data-publication-and-availability/overview",
"protocol-specs/data-publication-and-availability/published-data",
],
},
{
label: "Logs",
type: "category",
link: { type: "doc", id: "protocol-specs/logs/index" },
items: [],
},
{
label: "Pre-compiled Contracts",
type: "category",
link: { type: "doc", id: "protocol-specs/pre-compiled-contracts/index" },
items: ["protocol-specs/pre-compiled-contracts/registry"],
},
{
label: "Private Message Delivery",
type: "category",
link: {
type: "doc",
id: "protocol-specs/private-message-delivery/index",
},
items: [
"protocol-specs/private-message-delivery/private-msg-delivery", // renamed to avoid routing problems
"protocol-specs/private-message-delivery/send-note-guidelines",
],
},
{
label: "Gas & Fees",
type: "category",
link: { type: "doc", id: "protocol-specs/gas-and-fees/index" },
items: [
"protocol-specs/gas-and-fees/fee-juice",
"protocol-specs/gas-and-fees/specifying-gas-fee-info",
"protocol-specs/gas-and-fees/tx-setup-and-teardown",
"protocol-specs/gas-and-fees/kernel-tracking",
"protocol-specs/gas-and-fees/fee-schedule",
"protocol-specs/gas-and-fees/published-gas-and-fee-data",
],
},
{
label: "Decentralization",
type: "category",
items: [
"protocol-specs/decentralization/actors",
"protocol-specs/decentralization/governance",
"protocol-specs/decentralization/block-production",
"protocol-specs/decentralization/p2p-network",
],
},
{
label: "Circuits",
type: "category",
link: { type: "doc", id: "protocol-specs/circuits/high-level-topology" },
items: [
"protocol-specs/circuits/private-function",
"protocol-specs/circuits/private-kernel-initial",
"protocol-specs/circuits/private-kernel-inner",
"protocol-specs/circuits/private-kernel-reset",
"protocol-specs/circuits/private-kernel-tail",
"protocol-specs/circuits/public-kernel-initial",
"protocol-specs/circuits/public-kernel-inner",
"protocol-specs/circuits/public-kernel-tail",
],
},
{
label: "Rollup Circuits",
type: "category",
link: { type: "doc", id: "protocol-specs/rollup-circuits/index" },
items: [
"protocol-specs/rollup-circuits/base-rollup",
"protocol-specs/rollup-circuits/merge-rollup",
"protocol-specs/rollup-circuits/tree-parity",
"protocol-specs/rollup-circuits/root-rollup",
],
},
{
label: "Aztec (Public) VM",
type: "category",
link: { type: "doc", id: "protocol-specs/public-vm/index" },
items: [
"protocol-specs/public-vm/intro",
"protocol-specs/public-vm/state",
"protocol-specs/public-vm/memory-model",
"protocol-specs/public-vm/context",
"protocol-specs/public-vm/execution",
"protocol-specs/public-vm/nested-calls",
"protocol-specs/public-vm/instruction-set",
{
label: "AVM Circuit",
type: "category",
link: { type: "doc", id: "protocol-specs/public-vm/circuit-index" },
items: [
"protocol-specs/public-vm/avm-circuit",
"protocol-specs/public-vm/control-flow",
"protocol-specs/public-vm/alu",
"protocol-specs/public-vm/bytecode-validation-circuit",
],
},
"protocol-specs/public-vm/type-structs",
],
},
]}: {}),
};

0 comments on commit 10c8afe

Please sign in to comment.