diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2f29fe98f0e6..a4370457fecb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,6 @@ jobs:
outputs:
core: ${{ steps.changed-files.outputs.core_any_changed }}
prover: ${{ steps.changed-files.outputs.prover_any_changed }}
- zkstack_cli: ${{ steps.changed-files.outputs.zkstack_cli_any_changed }}
docs: ${{ steps.changed-files.outputs.docs_any_changed }}
all: ${{ steps.changed-files.outputs.all_any_changed }}
steps:
@@ -178,6 +177,7 @@ jobs:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}-avx512
action: "build"
WITNESS_GENERATOR_RUST_FLAGS: "-Ctarget_feature=+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl"
+ ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
diff --git a/.github/workflows/deploy-core-docs.yml b/.github/workflows/deploy-core-docs.yml
new file mode 100644
index 000000000000..dc7738af8428
--- /dev/null
+++ b/.github/workflows/deploy-core-docs.yml
@@ -0,0 +1,67 @@
+name: Deploy core docs
+
+on:
+ push:
+ branches:
+ - "main"
+ tags:
+ - "core-v*.*.*"
+ paths:
+ - 'docs/**'
+ - '.github/workflows/deploy-core-docs.yml'
+ pull_request:
+ paths:
+ - 'docs/**'
+ - '.github/workflows/deploy-core-docs.yml'
+ workflow_dispatch:
+ inputs:
+ ref:
+ description: "Branch, tag or commit to deploy the core docs. If empty, use the ref that triggered the workflow."
+ required: false
+ default: ""
+ version:
+ type: string
+ description: "Version of the documentation to deploy"
+ required: false
+ default: "latest"
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+jobs:
+
+ deploy-core-docs:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ env:
+ DOCS_DIR: 'docs'
+ PROJECT: 'core'
+ ENABLE_TESTS: false
+ steps:
+ - name: Checkout
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ ref: ${{ inputs.ref || '' }}
+
+ - name: Extract version from tag
+ if: startsWith(github.ref, 'refs/tags/')
+ id: extract-version
+ shell: 'bash -ex {0}'
+ run: |
+ TAG="${{ github.ref_name }}"
+ VERSION="${TAG#*-}"
+ echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
+
+ - name: Deploy core docs
+ uses: matter-labs/deploy-mdbooks@77856145362bf23834f2e54a44a928790c4bee7c # v1
+ with:
+ version: ${{ inputs.version || steps.extract-version.outputs.version || github.ref_name }}
+ docs-dir: ${{ env.DOCS_DIR }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ enable-tests: ${{ env.ENABLE_TESTS }}
+ project: ${{ env.PROJECT }}
+ deploy: ${{ github.event_name != 'pull_request' }}
diff --git a/.github/workflows/deploy-prover-docs.yml b/.github/workflows/deploy-prover-docs.yml
new file mode 100644
index 000000000000..007e96f61e58
--- /dev/null
+++ b/.github/workflows/deploy-prover-docs.yml
@@ -0,0 +1,67 @@
+name: Deploy prover docs
+
+on:
+ push:
+ branches:
+ - "main"
+ tags:
+ - "prover-v*.*.*"
+ paths:
+ - 'prover/docs/**'
+ - '.github/workflows/deploy-prover-docs.yml'
+ pull_request:
+ paths:
+ - 'prover/docs/**'
+ - '.github/workflows/deploy-prover-docs.yml'
+ workflow_dispatch:
+ inputs:
+ ref:
+ description: "Branch, tag or commit to deploy the prover docs. If empty, use the ref that triggered the workflow."
+ required: false
+ default: ""
+ version:
+ type: string
+ description: "Version of the documentation to deploy"
+ required: false
+ default: "latest"
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+jobs:
+
+ deploy-prover-docs:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ env:
+ DOCS_DIR: 'prover/docs'
+ PROJECT: 'prover'
+ ENABLE_TESTS: false
+ steps:
+ - name: Checkout
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ ref: ${{ inputs.ref || '' }}
+
+ - name: Extract version from tag
+ if: startsWith(github.ref, 'refs/tags/')
+ id: extract-version
+ shell: 'bash -ex {0}'
+ run: |
+ TAG="${{ github.ref_name }}"
+ VERSION="${TAG#*-}"
+ echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
+
+ - name: Deploy prover docs
+ uses: matter-labs/deploy-mdbooks@77856145362bf23834f2e54a44a928790c4bee7c # v1
+ with:
+ version: ${{ inputs.version || steps.extract-version.outputs.version || github.ref_name }}
+ docs-dir: ${{ env.DOCS_DIR }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ enable-tests: ${{ env.ENABLE_TESTS }}
+ project: ${{ env.PROJECT }}
+ deploy: ${{ github.event_name != 'pull_request' }}
diff --git a/.github/workflows/new-build-contract-verifier-template.yml b/.github/workflows/new-build-contract-verifier-template.yml
index 7e48968a65c1..7d75f81fb73c 100644
--- a/.github/workflows/new-build-contract-verifier-template.yml
+++ b/.github/workflows/new-build-contract-verifier-template.yml
@@ -212,7 +212,8 @@ jobs:
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: .
- push: ${{ inputs.action == 'push' }}
+ load: true
+ platforms: ${{ matrix.platforms }}
file: docker/${{ matrix.components }}/Dockerfile
build-args: |
SCCACHE_GCS_BUCKET=matterlabs-infra-sccache-storage
@@ -220,23 +221,16 @@ jobs:
SCCACHE_GCS_RW_MODE=READ_WRITE
RUSTC_WRAPPER=sccache
tags: |
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:latest
- matterlabs/${{ matrix.components }}:latest
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:latest2.0
- matterlabs/${{ matrix.components }}:latest2.0
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA }}
- matterlabs/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA }}
- matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}
- matterlabs/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}
- matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}
- matterlabs/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}
+ us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
+ - name: Push docker image
+ if: ${{ inputs.action == 'push' }}
+ run: |
+ docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
+ docker push matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
+
+
create_manifest:
name: Create release manifest
runs-on: matterlabs-ci-runner
diff --git a/.github/workflows/new-build-core-template.yml b/.github/workflows/new-build-core-template.yml
index 350d689c4572..ab3854733e62 100644
--- a/.github/workflows/new-build-core-template.yml
+++ b/.github/workflows/new-build-core-template.yml
@@ -219,35 +219,28 @@ jobs:
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
gcloud auth configure-docker us-docker.pkg.dev -q
- - name: Build and push
+ - name: Build docker image
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: .
- push: ${{ inputs.action == 'push' }}
+ load: true
+ platforms: ${{ matrix.platforms }}
file: docker/${{ matrix.components }}/Dockerfile
build-args: |
SCCACHE_GCS_BUCKET=matterlabs-infra-sccache-storage
SCCACHE_GCS_SERVICE_ACCOUNT=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com
SCCACHE_GCS_RW_MODE=READ_WRITE
RUSTC_WRAPPER=sccache
- tags: |
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:latest
- matterlabs/${{ matrix.components }}:latest
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:latest2.0
- matterlabs/${{ matrix.components }}:latest2.0
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA }}
- matterlabs/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA }}
- matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}
- matterlabs/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}
- matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}
- matterlabs/${{ matrix.components }}:2.0-${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
- us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}
+ tags: |
+ us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
+ - name: Push docker image
+ if: ${{ inputs.action == 'push' }}
+ run: |
+ docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
+ docker push matterlabs/${{ matrix.components }}:${{ env.IMAGE_TAG_SHA_TS }}-${{ env.PLATFORM }}
+
create_manifest:
name: Create release manifest
runs-on: matterlabs-ci-runner
@@ -269,13 +262,11 @@ jobs:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: login to Docker registries
- shell: bash
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
gcloud auth configure-docker us-docker.pkg.dev -q
- name: Create Docker manifest
- shell: bash
run: |
docker_repositories=("matterlabs/${{ matrix.component.name }}" "us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component.name }}")
platforms=${{ matrix.component.platform }}
diff --git a/.github/workflows/new-build-prover-template.yml b/.github/workflows/new-build-prover-template.yml
index 046711d679e8..939c11db1819 100644
--- a/.github/workflows/new-build-prover-template.yml
+++ b/.github/workflows/new-build-prover-template.yml
@@ -152,18 +152,26 @@ jobs:
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: .
- push: ${{ inputs.action == 'push' }}
+ load: true
build-args: |
CUDA_ARCH=${{ inputs.CUDA_ARCH }}
SCCACHE_GCS_BUCKET=matterlabs-infra-sccache-storage
SCCACHE_GCS_SERVICE_ACCOUNT=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com
SCCACHE_GCS_RW_MODE=READ_WRITE
RUSTC_WRAPPER=sccache
+ PROTOCOL_VERSION=${{ env.PROTOCOL_VERSION }}
+ ERA_BELLMAN_CUDA_RELEASE=${{ inputs.ERA_BELLMAN_CUDA_RELEASE }}
file: docker/${{ matrix.components }}/Dockerfile
tags: |
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ env.IMAGE_TAG_SHA_TS }}
matterlabs/${{ matrix.components }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ env.IMAGE_TAG_SHA_TS }}
+ - name: Push docker image
+ if: ${{ inputs.action == 'push' }}
+ run: |
+ docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ env.IMAGE_TAG_SHA_TS }}
+ docker push matterlabs/${{ matrix.components }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ env.IMAGE_TAG_SHA_TS }}
+
copy-images:
name: Copy images between docker registries
needs: [build-images, get-protocol-version]
diff --git a/.github/workflows/new-build-witness-generator-template.yml b/.github/workflows/new-build-witness-generator-template.yml
index 2f1fc0b2dd86..2782e6fef6fa 100644
--- a/.github/workflows/new-build-witness-generator-template.yml
+++ b/.github/workflows/new-build-witness-generator-template.yml
@@ -9,6 +9,10 @@ on:
description: "DOCKERHUB_TOKEN"
required: true
inputs:
+ ERA_BELLMAN_CUDA_RELEASE:
+ description: "ERA_BELLMAN_CUDA_RELEASE"
+ type: string
+ required: true
image_tag_suffix:
description: "Optional suffix to override tag name generation"
type: string
@@ -127,6 +131,9 @@ jobs:
SCCACHE_GCS_SERVICE_ACCOUNT=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com
SCCACHE_GCS_RW_MODE=READ_WRITE
RUSTC_WRAPPER=sccache
+ PROTOCOL_VERSION=${{ env.PROTOCOL_VERSION }}
+ ERA_BELLMAN_CUDA_RELEASE=${{ inputs.ERA_BELLMAN_CUDA_RELEASE }}
+ RUST_FLAGS=${{ inputs.WITNESS_GENERATOR_RUST_FLAGS }}
file: docker/${{ matrix.components }}/Dockerfile
tags: |
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ env.IMAGE_TAG_SHA_TS }}
diff --git a/.github/workflows/release-test-stage.yml b/.github/workflows/release-test-stage.yml
index 18708420dab0..eb75ab179b8e 100644
--- a/.github/workflows/release-test-stage.yml
+++ b/.github/workflows/release-test-stage.yml
@@ -61,10 +61,11 @@ jobs:
build-push-core-images:
name: Build and push images
needs: [setup, changed_files]
- uses: ./.github/workflows/build-core-template.yml
+ uses: ./.github/workflows/new-build-core-template.yml
if: needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
+ action: "push"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -84,10 +85,11 @@ jobs:
build-push-contract-verifier:
name: Build and push images
needs: [setup, changed_files]
- uses: ./.github/workflows/build-contract-verifier-template.yml
+ uses: ./.github/workflows/new-build-contract-verifier-template.yml
if: needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
+ action: "push"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -95,12 +97,13 @@ jobs:
build-push-prover-images:
name: Build and push images
needs: [setup, changed_files]
- uses: ./.github/workflows/build-prover-template.yml
+ uses: ./.github/workflows/new-build-prover-template.yml
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
CUDA_ARCH: "60;70;75;80;89"
+ action: "push"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -108,13 +111,14 @@ jobs:
build-push-witness-generator-image-avx512:
name: Build and push prover images with avx512 instructions
needs: [setup, changed_files]
- uses: ./.github/workflows/build-witness-generator-template.yml
+ uses: ./.github/workflows/new-build-witness-generator-template.yml
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}-avx512
ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
CUDA_ARCH: "60;70;75;80;89"
WITNESS_GENERATOR_RUST_FLAGS: "-Ctarget_feature=+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl "
+ action: "push"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 000000000000..7585238efedf
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1 @@
+book
diff --git a/docs/book.toml b/docs/book.toml
new file mode 100644
index 000000000000..89420a95ba38
--- /dev/null
+++ b/docs/book.toml
@@ -0,0 +1,32 @@
+[book]
+authors = ["ZKsync team"]
+language = "en"
+multilingual = false
+src = "src"
+title = "ZKsync Era Documentation"
+
+[output.html]
+smart-punctuation = true
+mathjax-support = true
+git-repository-url = "https://github.com/matter-labs/zksync-era/tree/main/docs"
+edit-url-template = "https://github.com/matter-labs/zksync-era/tree/main/docs/{path}"
+additional-js = ["js/version-box.js", "js/mermaid-init.js"]
+additional-css = ["css/version-box.css"]
+
+[output.html.playground]
+editable = true
+line-numbers = true
+
+[output.html.search]
+limit-results = 20
+use-boolean-and = true
+boost-title = 2
+boost-hierarchy = 2
+boost-paragraph = 1
+expand = true
+heading-split-level = 2
+
+[preprocessor]
+
+[preprocessor.mermaid]
+command = "mdbook-mermaid"
diff --git a/docs/css/version-box.css b/docs/css/version-box.css
new file mode 100644
index 000000000000..4006ac7804b3
--- /dev/null
+++ b/docs/css/version-box.css
@@ -0,0 +1,46 @@
+#version-box {
+ display: flex;
+ align-items: center;
+ margin-right: 15px; /* Space from the right side */
+ background-color: transparent; /* Make the box background transparent */
+}
+
+/* Base styles for the version selector */
+#version-selector {
+ background-color: transparent; /* Remove background color */
+ border: 1px solid #4a5568; /* Subtle border */
+ border-radius: 4px; /* Rounded edges */
+ padding: 5px 10px; /* Padding inside dropdown */
+ font-size: 0.9em;
+ font-weight: normal;
+ outline: none; /* Removes default focus outline */
+ cursor: pointer;
+}
+
+/* Text color for dark themes */
+.theme-navy #version-selector,
+.theme-coal #version-selector {
+ color: #f7fafc; /* Light text color for dark backgrounds */
+}
+
+/* Text color for light theme */
+.theme-light #version-selector {
+ color: #333333; /* Dark text color for light background */
+}
+
+/* Hover effect for better user feedback */
+#version-selector:hover {
+ background-color: rgba(255, 255, 255, 0.1); /* Light hover effect */
+}
+
+/* Optional: Style for when the selector is focused */
+#version-selector:focus {
+ border-color: #63b3ed; /* Accent color for focused state */
+}
+
+.right-buttons {
+ display: flex;
+ flex-direction: row; /* Aligns items in a row, left to right */
+ align-items: center; /* Centers items vertically */
+ gap: 10px; /* Adds space between items */
+}
diff --git a/docs/js/mermaid-init.js b/docs/js/mermaid-init.js
new file mode 100644
index 000000000000..15a7f4e57c60
--- /dev/null
+++ b/docs/js/mermaid-init.js
@@ -0,0 +1,35 @@
+(() => {
+ const darkThemes = ['ayu', 'navy', 'coal'];
+ const lightThemes = ['light', 'rust'];
+
+ const classList = document.getElementsByTagName('html')[0].classList;
+
+ let lastThemeWasLight = true;
+ for (const cssClass of classList) {
+ if (darkThemes.includes(cssClass)) {
+ lastThemeWasLight = false;
+ break;
+ }
+ }
+
+ const theme = lastThemeWasLight ? 'default' : 'dark';
+ mermaid.initialize({ startOnLoad: true, theme });
+
+ // Simplest way to make mermaid re-render the diagrams in the new theme is via refreshing the page
+
+ for (const darkTheme of darkThemes) {
+ document.getElementById(darkTheme).addEventListener('click', () => {
+ if (lastThemeWasLight) {
+ window.location.reload();
+ }
+ });
+ }
+
+ for (const lightTheme of lightThemes) {
+ document.getElementById(lightTheme).addEventListener('click', () => {
+ if (!lastThemeWasLight) {
+ window.location.reload();
+ }
+ });
+ }
+})();
diff --git a/docs/js/version-box.js b/docs/js/version-box.js
new file mode 100644
index 000000000000..932a75a5e3bb
--- /dev/null
+++ b/docs/js/version-box.js
@@ -0,0 +1,61 @@
+document.addEventListener('DOMContentLoaded', function () {
+ // Get the base URL from the mdBook configuration
+ const baseUrl = document.location.origin + '/zksync-era/core';
+
+ // Function to create version selector
+ function createVersionSelector(versions) {
+ const versionSelector = document.createElement('select');
+ versionSelector.id = 'version-selector';
+
+ // Get the current path
+ const currentPath = window.location.pathname;
+
+ // Iterate over the versions object
+ for (const [versionName, versionUrl] of Object.entries(versions)) {
+ const option = document.createElement('option');
+ option.value = versionUrl + '/';
+ option.textContent = versionName;
+
+ // Check if the current URL matches this option's value
+ if (currentPath.includes(option.value)) {
+ option.selected = true; // Set this option as selected
+ }
+
+ versionSelector.appendChild(option);
+ }
+
+ // Event listener to handle version change
+ versionSelector.addEventListener('change', function () {
+ const selectedVersion = versionSelector.value;
+ // Redirect to the selected version URL
+ window.location.href = '/zksync-era/core' + selectedVersion;
+ });
+
+ return versionSelector;
+ }
+
+ // Fetch versions from JSON file
+ fetch(baseUrl + '/versions.json')
+ .then((response) => {
+ if (!response.ok) {
+ throw new Error('Network response was not ok ' + response.statusText);
+ }
+ return response.json();
+ })
+ .then((data) => {
+ const versionSelector = createVersionSelector(data);
+ const nav = document.querySelector('.right-buttons');
+
+ if (nav) {
+ const versionBox = document.createElement('div');
+ versionBox.id = 'version-box';
+ versionBox.appendChild(versionSelector);
+ nav.appendChild(versionBox); // Append to the .right-buttons container
+ } else {
+ console.error('.right-buttons element not found.');
+ }
+ })
+ .catch((error) => {
+ console.error('There has been a problem with your fetch operation:', error);
+ });
+});
diff --git a/docs/src/README.md b/docs/src/README.md
new file mode 100644
index 000000000000..ab6a417877b5
--- /dev/null
+++ b/docs/src/README.md
@@ -0,0 +1,26 @@
+# Introduction
+
+Welcome to the documentation! This guide provides comprehensive insights into the architecture, setup, usage, and
+advanced features of ZKsync.
+
+## Documentation Structure
+
+- **Guides**: The Guides section is designed to help users at every level, from setup and development to advanced
+ configuration and debugging techniques. It covers essential topics, including Docker setup, repository management, and
+ architecture.
+
+- **Specs**: This section dives into the technical specifications of our system. Here, you’ll find detailed
+ documentation on data availability, L1 and L2 communication, smart contract interactions, Zero-Knowledge proofs, and
+ more. Each topic includes an in-depth explanation to support advanced users and developers.
+
+- **Announcements**: This section highlights important updates, announcements, and committee details, providing
+ essential information to keep users informed on the latest changes.
+
+## Getting Started
+
+Feel free to explore each section according to your needs. This documentation is designed to be modular, so you can jump
+to specific topics or follow through step-by-step.
+
+---
+
+Thank you for using our documentation!
diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
new file mode 100644
index 000000000000..c267759cb4c6
--- /dev/null
+++ b/docs/src/SUMMARY.md
@@ -0,0 +1,86 @@
+
+
+# Summary
+
+[Introduction](README.md)
+
+# Guides
+
+- [Basic](guides/README.md)
+
+ - [Architecture](guides/architecture.md)
+ - [Build Docker](guides/build-docker.md)
+ - [Development](guides/development.md)
+ - [Launch](guides/launch.md)
+ - [Repositories](guides/repositories.md)
+ - [Setup Dev](guides/setup-dev.md)
+
+- [Advanced](guides/advanced/README.md)
+ - [Local initialization](guides/advanced/01_initialization.md)
+ - [Deposits](guides/advanced/02_deposits.md)
+ - [Withdrawals](guides/advanced/03_withdrawals.md)
+ - [Contracts](guides/advanced/04_contracts.md)
+ - [Calls](guides/advanced/05_how_call_works.md)
+ - [Transactions](guides/advanced/06_how_transaction_works.md)
+ - [Fee Model](guides/advanced/07_fee_model.md)
+ - [L2 Messaging](guides/advanced/08_how_l2_messaging_works.md)
+ - [Pubdata](guides/advanced/09_pubdata.md)
+ - [Pubdata with Blobs](guides/advanced/10_pubdata_with_blobs.md)
+ - [Bytecode compression](guides/advanced/11_compression.md)
+ - [EraVM intro](guides/advanced/12_alternative_vm_intro.md)
+ - [ZK Intuition](guides/advanced/13_zk_intuition.md)
+ - [ZK Deeper Dive](guides/advanced/14_zk_deeper_overview.md)
+ - [Prover Keys](guides/advanced/15_prover_keys.md)
+ - [Advanced Debugging](guides/advanced/90_advanced_debugging.md)
+ - [Docker and CI](guides/advanced/91_docker_and_ci.md)
+
+# External Node
+
+- [External node](guides/external-node/01_intro.md)
+ - [Quick Start](guides/external-node/00_quick_start.md)
+ - [Configuration](guides/external-node/02_configuration.md)
+ - [Running](guides/external-node/03_running.md)
+ - [Observability](guides/external-node/04_observability.md)
+ - [Troubleshooting](guides/external-node/05_troubleshooting.md)
+ - [Components](guides/external-node/06_components.md)
+ - [Snapshots Recovery](guides/external-node/07_snapshots_recovery.md)
+ - [Pruning](guides/external-node/08_pruning.md)
+ - [Treeless Mode](guides/external-node/09_treeless_mode.md)
+ - [Decentralization](guides/external-node/10_decentralization.md)
+
+# Specs
+
+- [Introduction](specs/introduction.md)
+ - [Overview](specs/overview.md)
+ - [Blocks and Batches](specs/blocks_batches.md)
+ - [L1 Smart Contracts](specs/l1_smart_contracts.md)
+- [Data Availability](specs/data_availability/overview.md)
+ - [Pubdata](specs/data_availability/pubdata.md)
+ - [Compression](specs/data_availability/compression.md)
+ - [Reconstruction](specs/data_availability/reconstruction.md)
+ - [Validium ZK Porter](specs/data_availability/validium_zk_porter.md)
+- [L1 L2 Communication](specs/l1_l2_communication/overview_deposits_withdrawals.md)
+ - [L1 to L2](specs/l1_l2_communication/l1_to_l2.md)
+ - [L2 to L1](specs/l1_l2_communication/l2_to_l1.md)
+- [Prover](specs/prover/overview.md)
+ - [Getting Started](specs/prover/getting_started.md)
+ - [ZK Terminology](specs/prover/zk_terminology.md)
+ - [Function Check if Satisfied](specs/prover/boojum_function_check_if_satisfied.md)
+ - [Gadgets](specs/prover/boojum_gadgets.md)
+ - [Circuit Testing](specs/prover/circuit_testing.md)
+ - [Circuits Overview](specs/prover/circuits/overview.md)
+- [ZK Chains](specs/zk_chains/overview.md)
+ - [Gateway](specs/zk_chains/gateway.md)
+ - [Interop](specs/zk_chains/interop.md)
+ - [Shared Bridge](specs/zk_chains/shared_bridge.md)
+- [ZK EVM](specs/zk_evm/vm_overview.md)
+ - [Account Abstraction](specs/zk_evm/account_abstraction.md)
+ - [Bootloader](specs/zk_evm/bootloader.md)
+ - [Fee Model](specs/zk_evm/fee_model.md)
+ - [Precompiles](specs/zk_evm/precompiles.md)
+ - [System Contracts](specs/zk_evm/system_contracts.md)
+
+# Announcements
+
+- [Announcements](announcements/README.md)
+ - [Attester Committee](announcements/attester_commitee.md)
diff --git a/docs/announcements/README.md b/docs/src/announcements/README.md
similarity index 100%
rename from docs/announcements/README.md
rename to docs/src/announcements/README.md
diff --git a/docs/announcements/attester_commitee.md b/docs/src/announcements/attester_commitee.md
similarity index 100%
rename from docs/announcements/attester_commitee.md
rename to docs/src/announcements/attester_commitee.md
diff --git a/docs/src/guides/README.md b/docs/src/guides/README.md
new file mode 100644
index 000000000000..f9d5bc852a26
--- /dev/null
+++ b/docs/src/guides/README.md
@@ -0,0 +1,12 @@
+# ZKsync basic guides
+
+This section contains basic guides that aim to explain the ZKsync ecosystem in an easy to grasp way.
+
+## Table of Contents
+
+- [Architecture](./architecture.md)
+- [Build Docker](./build-docker.md)
+- [Development](./development.md)
+- [Launch](./launch.md)
+- [Repositories](./repositories.md)
+- [Setup Dev](./setup-dev.md)
diff --git a/docs/guides/advanced/01_initialization.md b/docs/src/guides/advanced/01_initialization.md
similarity index 100%
rename from docs/guides/advanced/01_initialization.md
rename to docs/src/guides/advanced/01_initialization.md
diff --git a/docs/guides/advanced/02_deposits.md b/docs/src/guides/advanced/02_deposits.md
similarity index 100%
rename from docs/guides/advanced/02_deposits.md
rename to docs/src/guides/advanced/02_deposits.md
diff --git a/docs/guides/advanced/03_withdrawals.md b/docs/src/guides/advanced/03_withdrawals.md
similarity index 100%
rename from docs/guides/advanced/03_withdrawals.md
rename to docs/src/guides/advanced/03_withdrawals.md
diff --git a/docs/guides/advanced/04_contracts.md b/docs/src/guides/advanced/04_contracts.md
similarity index 100%
rename from docs/guides/advanced/04_contracts.md
rename to docs/src/guides/advanced/04_contracts.md
diff --git a/docs/guides/advanced/05_how_call_works.md b/docs/src/guides/advanced/05_how_call_works.md
similarity index 100%
rename from docs/guides/advanced/05_how_call_works.md
rename to docs/src/guides/advanced/05_how_call_works.md
diff --git a/docs/guides/advanced/06_how_transaction_works.md b/docs/src/guides/advanced/06_how_transaction_works.md
similarity index 100%
rename from docs/guides/advanced/06_how_transaction_works.md
rename to docs/src/guides/advanced/06_how_transaction_works.md
diff --git a/docs/guides/advanced/07_fee_model.md b/docs/src/guides/advanced/07_fee_model.md
similarity index 100%
rename from docs/guides/advanced/07_fee_model.md
rename to docs/src/guides/advanced/07_fee_model.md
diff --git a/docs/guides/advanced/08_how_l2_messaging_works.md b/docs/src/guides/advanced/08_how_l2_messaging_works.md
similarity index 100%
rename from docs/guides/advanced/08_how_l2_messaging_works.md
rename to docs/src/guides/advanced/08_how_l2_messaging_works.md
diff --git a/docs/guides/advanced/09_pubdata.md b/docs/src/guides/advanced/09_pubdata.md
similarity index 100%
rename from docs/guides/advanced/09_pubdata.md
rename to docs/src/guides/advanced/09_pubdata.md
diff --git a/docs/guides/advanced/10_pubdata_with_blobs.md b/docs/src/guides/advanced/10_pubdata_with_blobs.md
similarity index 100%
rename from docs/guides/advanced/10_pubdata_with_blobs.md
rename to docs/src/guides/advanced/10_pubdata_with_blobs.md
diff --git a/docs/guides/advanced/11_compression.md b/docs/src/guides/advanced/11_compression.md
similarity index 100%
rename from docs/guides/advanced/11_compression.md
rename to docs/src/guides/advanced/11_compression.md
diff --git a/docs/guides/advanced/12_alternative_vm_intro.md b/docs/src/guides/advanced/12_alternative_vm_intro.md
similarity index 100%
rename from docs/guides/advanced/12_alternative_vm_intro.md
rename to docs/src/guides/advanced/12_alternative_vm_intro.md
diff --git a/docs/guides/advanced/13_zk_intuition.md b/docs/src/guides/advanced/13_zk_intuition.md
similarity index 100%
rename from docs/guides/advanced/13_zk_intuition.md
rename to docs/src/guides/advanced/13_zk_intuition.md
diff --git a/docs/guides/advanced/14_zk_deeper_overview.md b/docs/src/guides/advanced/14_zk_deeper_overview.md
similarity index 100%
rename from docs/guides/advanced/14_zk_deeper_overview.md
rename to docs/src/guides/advanced/14_zk_deeper_overview.md
diff --git a/docs/guides/advanced/15_prover_keys.md b/docs/src/guides/advanced/15_prover_keys.md
similarity index 100%
rename from docs/guides/advanced/15_prover_keys.md
rename to docs/src/guides/advanced/15_prover_keys.md
diff --git a/docs/guides/advanced/16_decentralization.md b/docs/src/guides/advanced/16_decentralization.md
similarity index 100%
rename from docs/guides/advanced/16_decentralization.md
rename to docs/src/guides/advanced/16_decentralization.md
diff --git a/docs/guides/advanced/90_advanced_debugging.md b/docs/src/guides/advanced/90_advanced_debugging.md
similarity index 100%
rename from docs/guides/advanced/90_advanced_debugging.md
rename to docs/src/guides/advanced/90_advanced_debugging.md
diff --git a/docs/guides/advanced/91_docker_and_ci.md b/docs/src/guides/advanced/91_docker_and_ci.md
similarity index 100%
rename from docs/guides/advanced/91_docker_and_ci.md
rename to docs/src/guides/advanced/91_docker_and_ci.md
diff --git a/docs/guides/advanced/README.md b/docs/src/guides/advanced/README.md
similarity index 98%
rename from docs/guides/advanced/README.md
rename to docs/src/guides/advanced/README.md
index 2456e980638b..e0f8a82f2fb5 100644
--- a/docs/guides/advanced/README.md
+++ b/docs/src/guides/advanced/README.md
@@ -23,7 +23,7 @@ way.
- [Decentralization](./16_decentralization.md)
Additionally, there are a few articles that cover specific topics that may be useful for developers actively working on
-`zksync-era` repo.
+`zksync-era` repo:
- [Advanced debugging](./90_advanced_debugging.md)
- [Docker and CI](./91_docker_and_ci.md)
diff --git a/docs/guides/architecture.md b/docs/src/guides/architecture.md
similarity index 100%
rename from docs/guides/architecture.md
rename to docs/src/guides/architecture.md
diff --git a/docs/guides/build-docker.md b/docs/src/guides/build-docker.md
similarity index 100%
rename from docs/guides/build-docker.md
rename to docs/src/guides/build-docker.md
diff --git a/docs/guides/development.md b/docs/src/guides/development.md
similarity index 100%
rename from docs/guides/development.md
rename to docs/src/guides/development.md
diff --git a/docs/guides/external-node/00_quick_start.md b/docs/src/guides/external-node/00_quick_start.md
similarity index 100%
rename from docs/guides/external-node/00_quick_start.md
rename to docs/src/guides/external-node/00_quick_start.md
diff --git a/docs/guides/external-node/01_intro.md b/docs/src/guides/external-node/01_intro.md
similarity index 100%
rename from docs/guides/external-node/01_intro.md
rename to docs/src/guides/external-node/01_intro.md
diff --git a/docs/guides/external-node/02_configuration.md b/docs/src/guides/external-node/02_configuration.md
similarity index 100%
rename from docs/guides/external-node/02_configuration.md
rename to docs/src/guides/external-node/02_configuration.md
diff --git a/docs/guides/external-node/03_running.md b/docs/src/guides/external-node/03_running.md
similarity index 100%
rename from docs/guides/external-node/03_running.md
rename to docs/src/guides/external-node/03_running.md
diff --git a/docs/guides/external-node/04_observability.md b/docs/src/guides/external-node/04_observability.md
similarity index 100%
rename from docs/guides/external-node/04_observability.md
rename to docs/src/guides/external-node/04_observability.md
diff --git a/docs/guides/external-node/05_troubleshooting.md b/docs/src/guides/external-node/05_troubleshooting.md
similarity index 100%
rename from docs/guides/external-node/05_troubleshooting.md
rename to docs/src/guides/external-node/05_troubleshooting.md
diff --git a/docs/guides/external-node/06_components.md b/docs/src/guides/external-node/06_components.md
similarity index 100%
rename from docs/guides/external-node/06_components.md
rename to docs/src/guides/external-node/06_components.md
diff --git a/docs/guides/external-node/07_snapshots_recovery.md b/docs/src/guides/external-node/07_snapshots_recovery.md
similarity index 100%
rename from docs/guides/external-node/07_snapshots_recovery.md
rename to docs/src/guides/external-node/07_snapshots_recovery.md
diff --git a/docs/guides/external-node/08_pruning.md b/docs/src/guides/external-node/08_pruning.md
similarity index 100%
rename from docs/guides/external-node/08_pruning.md
rename to docs/src/guides/external-node/08_pruning.md
diff --git a/docs/guides/external-node/09_treeless_mode.md b/docs/src/guides/external-node/09_treeless_mode.md
similarity index 100%
rename from docs/guides/external-node/09_treeless_mode.md
rename to docs/src/guides/external-node/09_treeless_mode.md
diff --git a/docs/guides/external-node/10_decentralization.md b/docs/src/guides/external-node/10_decentralization.md
similarity index 100%
rename from docs/guides/external-node/10_decentralization.md
rename to docs/src/guides/external-node/10_decentralization.md
diff --git a/docs/src/guides/external-node/README.md b/docs/src/guides/external-node/README.md
new file mode 100644
index 000000000000..becd9846d4f2
--- /dev/null
+++ b/docs/src/guides/external-node/README.md
@@ -0,0 +1 @@
+# External node
diff --git a/docs/guides/external-node/docker-compose-examples/configs/generate_secrets.sh b/docs/src/guides/external-node/docker-compose-examples/configs/generate_secrets.sh
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/configs/generate_secrets.sh
rename to docs/src/guides/external-node/docker-compose-examples/configs/generate_secrets.sh
diff --git a/docs/guides/external-node/docker-compose-examples/configs/mainnet_consensus_config.yaml b/docs/src/guides/external-node/docker-compose-examples/configs/mainnet_consensus_config.yaml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/configs/mainnet_consensus_config.yaml
rename to docs/src/guides/external-node/docker-compose-examples/configs/mainnet_consensus_config.yaml
diff --git a/docs/guides/external-node/docker-compose-examples/configs/testnet_consensus_config.yaml b/docs/src/guides/external-node/docker-compose-examples/configs/testnet_consensus_config.yaml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/configs/testnet_consensus_config.yaml
rename to docs/src/guides/external-node/docker-compose-examples/configs/testnet_consensus_config.yaml
diff --git a/docs/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/Consensus.json b/docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/Consensus.json
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/Consensus.json
rename to docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/Consensus.json
diff --git a/docs/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/General.json b/docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/General.json
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/General.json
rename to docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/General.json
diff --git a/docs/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/default.yml b/docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/default.yml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/default.yml
rename to docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/dashboards/default.yml
diff --git a/docs/guides/external-node/docker-compose-examples/grafana/provisioning/datasources/prometheus.yml b/docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/datasources/prometheus.yml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/grafana/provisioning/datasources/prometheus.yml
rename to docs/src/guides/external-node/docker-compose-examples/grafana/provisioning/datasources/prometheus.yml
diff --git a/docs/guides/external-node/docker-compose-examples/mainnet-external-node-docker-compose.yml b/docs/src/guides/external-node/docker-compose-examples/mainnet-external-node-docker-compose.yml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/mainnet-external-node-docker-compose.yml
rename to docs/src/guides/external-node/docker-compose-examples/mainnet-external-node-docker-compose.yml
diff --git a/docs/guides/external-node/docker-compose-examples/prometheus/prometheus.yml b/docs/src/guides/external-node/docker-compose-examples/prometheus/prometheus.yml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/prometheus/prometheus.yml
rename to docs/src/guides/external-node/docker-compose-examples/prometheus/prometheus.yml
diff --git a/docs/guides/external-node/docker-compose-examples/testnet-external-node-docker-compose.yml b/docs/src/guides/external-node/docker-compose-examples/testnet-external-node-docker-compose.yml
similarity index 100%
rename from docs/guides/external-node/docker-compose-examples/testnet-external-node-docker-compose.yml
rename to docs/src/guides/external-node/docker-compose-examples/testnet-external-node-docker-compose.yml
diff --git a/docs/guides/external-node/prepared_configs/mainnet-config.env b/docs/src/guides/external-node/prepared_configs/mainnet-config.env
similarity index 100%
rename from docs/guides/external-node/prepared_configs/mainnet-config.env
rename to docs/src/guides/external-node/prepared_configs/mainnet-config.env
diff --git a/docs/guides/external-node/prepared_configs/mainnet_consensus_config.yaml b/docs/src/guides/external-node/prepared_configs/mainnet_consensus_config.yaml
similarity index 100%
rename from docs/guides/external-node/prepared_configs/mainnet_consensus_config.yaml
rename to docs/src/guides/external-node/prepared_configs/mainnet_consensus_config.yaml
diff --git a/docs/guides/external-node/prepared_configs/testnet-goerli-config-deprecated.env b/docs/src/guides/external-node/prepared_configs/testnet-goerli-config-deprecated.env
similarity index 100%
rename from docs/guides/external-node/prepared_configs/testnet-goerli-config-deprecated.env
rename to docs/src/guides/external-node/prepared_configs/testnet-goerli-config-deprecated.env
diff --git a/docs/guides/external-node/prepared_configs/testnet-sepolia-config.env b/docs/src/guides/external-node/prepared_configs/testnet-sepolia-config.env
similarity index 100%
rename from docs/guides/external-node/prepared_configs/testnet-sepolia-config.env
rename to docs/src/guides/external-node/prepared_configs/testnet-sepolia-config.env
diff --git a/docs/guides/external-node/prepared_configs/testnet_consensus_config.yaml b/docs/src/guides/external-node/prepared_configs/testnet_consensus_config.yaml
similarity index 100%
rename from docs/guides/external-node/prepared_configs/testnet_consensus_config.yaml
rename to docs/src/guides/external-node/prepared_configs/testnet_consensus_config.yaml
diff --git a/docs/guides/launch.md b/docs/src/guides/launch.md
similarity index 100%
rename from docs/guides/launch.md
rename to docs/src/guides/launch.md
diff --git a/docs/guides/repositories.md b/docs/src/guides/repositories.md
similarity index 100%
rename from docs/guides/repositories.md
rename to docs/src/guides/repositories.md
diff --git a/docs/guides/setup-dev.md b/docs/src/guides/setup-dev.md
similarity index 100%
rename from docs/guides/setup-dev.md
rename to docs/src/guides/setup-dev.md
diff --git a/docs/src/misc/contributors.md b/docs/src/misc/contributors.md
new file mode 100644
index 000000000000..77e81149e465
--- /dev/null
+++ b/docs/src/misc/contributors.md
@@ -0,0 +1 @@
+# Contributors
diff --git a/docs/specs/README.md b/docs/src/specs/README.md
similarity index 100%
rename from docs/specs/README.md
rename to docs/src/specs/README.md
diff --git a/docs/specs/blocks_batches.md b/docs/src/specs/blocks_batches.md
similarity index 100%
rename from docs/specs/blocks_batches.md
rename to docs/src/specs/blocks_batches.md
diff --git a/docs/specs/data_availability/README.md b/docs/src/specs/data_availability/README.md
similarity index 100%
rename from docs/specs/data_availability/README.md
rename to docs/src/specs/data_availability/README.md
diff --git a/docs/specs/data_availability/compression.md b/docs/src/specs/data_availability/compression.md
similarity index 100%
rename from docs/specs/data_availability/compression.md
rename to docs/src/specs/data_availability/compression.md
diff --git a/docs/specs/data_availability/overview.md b/docs/src/specs/data_availability/overview.md
similarity index 100%
rename from docs/specs/data_availability/overview.md
rename to docs/src/specs/data_availability/overview.md
diff --git a/docs/specs/data_availability/pubdata.md b/docs/src/specs/data_availability/pubdata.md
similarity index 100%
rename from docs/specs/data_availability/pubdata.md
rename to docs/src/specs/data_availability/pubdata.md
diff --git a/docs/specs/data_availability/reconstruction.md b/docs/src/specs/data_availability/reconstruction.md
similarity index 100%
rename from docs/specs/data_availability/reconstruction.md
rename to docs/src/specs/data_availability/reconstruction.md
diff --git a/docs/specs/data_availability/validium_zk_porter.md b/docs/src/specs/data_availability/validium_zk_porter.md
similarity index 100%
rename from docs/specs/data_availability/validium_zk_porter.md
rename to docs/src/specs/data_availability/validium_zk_porter.md
diff --git a/docs/specs/img/L2_Components.png b/docs/src/specs/img/L2_Components.png
similarity index 100%
rename from docs/specs/img/L2_Components.png
rename to docs/src/specs/img/L2_Components.png
diff --git a/docs/specs/img/diamondProxy.jpg b/docs/src/specs/img/diamondProxy.jpg
similarity index 100%
rename from docs/specs/img/diamondProxy.jpg
rename to docs/src/specs/img/diamondProxy.jpg
diff --git a/docs/specs/img/governance.jpg b/docs/src/specs/img/governance.jpg
similarity index 100%
rename from docs/specs/img/governance.jpg
rename to docs/src/specs/img/governance.jpg
diff --git a/docs/specs/img/zk-the-collective-action.jpeg b/docs/src/specs/img/zk-the-collective-action.jpeg
similarity index 100%
rename from docs/specs/img/zk-the-collective-action.jpeg
rename to docs/src/specs/img/zk-the-collective-action.jpeg
diff --git a/docs/specs/introduction.md b/docs/src/specs/introduction.md
similarity index 100%
rename from docs/specs/introduction.md
rename to docs/src/specs/introduction.md
diff --git a/docs/specs/l1_l2_communication/README.md b/docs/src/specs/l1_l2_communication/README.md
similarity index 100%
rename from docs/specs/l1_l2_communication/README.md
rename to docs/src/specs/l1_l2_communication/README.md
diff --git a/docs/specs/l1_l2_communication/l1_to_l2.md b/docs/src/specs/l1_l2_communication/l1_to_l2.md
similarity index 100%
rename from docs/specs/l1_l2_communication/l1_to_l2.md
rename to docs/src/specs/l1_l2_communication/l1_to_l2.md
diff --git a/docs/specs/l1_l2_communication/l2_to_l1.md b/docs/src/specs/l1_l2_communication/l2_to_l1.md
similarity index 100%
rename from docs/specs/l1_l2_communication/l2_to_l1.md
rename to docs/src/specs/l1_l2_communication/l2_to_l1.md
diff --git a/docs/specs/l1_l2_communication/overview_deposits_withdrawals.md b/docs/src/specs/l1_l2_communication/overview_deposits_withdrawals.md
similarity index 100%
rename from docs/specs/l1_l2_communication/overview_deposits_withdrawals.md
rename to docs/src/specs/l1_l2_communication/overview_deposits_withdrawals.md
diff --git a/docs/specs/l1_smart_contracts.md b/docs/src/specs/l1_smart_contracts.md
similarity index 100%
rename from docs/specs/l1_smart_contracts.md
rename to docs/src/specs/l1_smart_contracts.md
diff --git a/docs/specs/overview.md b/docs/src/specs/overview.md
similarity index 100%
rename from docs/specs/overview.md
rename to docs/src/specs/overview.md
diff --git a/docs/specs/prover/README.md b/docs/src/specs/prover/README.md
similarity index 100%
rename from docs/specs/prover/README.md
rename to docs/src/specs/prover/README.md
diff --git a/docs/specs/prover/boojum_function_check_if_satisfied.md b/docs/src/specs/prover/boojum_function_check_if_satisfied.md
similarity index 100%
rename from docs/specs/prover/boojum_function_check_if_satisfied.md
rename to docs/src/specs/prover/boojum_function_check_if_satisfied.md
diff --git a/docs/specs/prover/boojum_gadgets.md b/docs/src/specs/prover/boojum_gadgets.md
similarity index 100%
rename from docs/specs/prover/boojum_gadgets.md
rename to docs/src/specs/prover/boojum_gadgets.md
diff --git a/docs/specs/prover/circuit_testing.md b/docs/src/specs/prover/circuit_testing.md
similarity index 100%
rename from docs/specs/prover/circuit_testing.md
rename to docs/src/specs/prover/circuit_testing.md
diff --git a/docs/specs/prover/circuits/README.md b/docs/src/specs/prover/circuits/README.md
similarity index 100%
rename from docs/specs/prover/circuits/README.md
rename to docs/src/specs/prover/circuits/README.md
diff --git a/docs/specs/prover/circuits/code_decommitter.md b/docs/src/specs/prover/circuits/code_decommitter.md
similarity index 100%
rename from docs/specs/prover/circuits/code_decommitter.md
rename to docs/src/specs/prover/circuits/code_decommitter.md
diff --git a/docs/specs/prover/circuits/demux_log_queue.md b/docs/src/specs/prover/circuits/demux_log_queue.md
similarity index 100%
rename from docs/specs/prover/circuits/demux_log_queue.md
rename to docs/src/specs/prover/circuits/demux_log_queue.md
diff --git a/docs/specs/prover/circuits/ecrecover.md b/docs/src/specs/prover/circuits/ecrecover.md
similarity index 100%
rename from docs/specs/prover/circuits/ecrecover.md
rename to docs/src/specs/prover/circuits/ecrecover.md
diff --git a/docs/specs/prover/circuits/img/diagram.png b/docs/src/specs/prover/circuits/img/diagram.png
similarity index 100%
rename from docs/specs/prover/circuits/img/diagram.png
rename to docs/src/specs/prover/circuits/img/diagram.png
diff --git a/docs/specs/prover/circuits/img/flowchart.png b/docs/src/specs/prover/circuits/img/flowchart.png
similarity index 100%
rename from docs/specs/prover/circuits/img/flowchart.png
rename to docs/src/specs/prover/circuits/img/flowchart.png
diff --git a/docs/specs/prover/circuits/img/image.png b/docs/src/specs/prover/circuits/img/image.png
similarity index 100%
rename from docs/specs/prover/circuits/img/image.png
rename to docs/src/specs/prover/circuits/img/image.png
diff --git a/docs/specs/prover/circuits/keccak_round_function.md b/docs/src/specs/prover/circuits/keccak_round_function.md
similarity index 100%
rename from docs/specs/prover/circuits/keccak_round_function.md
rename to docs/src/specs/prover/circuits/keccak_round_function.md
diff --git a/docs/specs/prover/circuits/l1_messages_hasher.md b/docs/src/specs/prover/circuits/l1_messages_hasher.md
similarity index 100%
rename from docs/specs/prover/circuits/l1_messages_hasher.md
rename to docs/src/specs/prover/circuits/l1_messages_hasher.md
diff --git a/docs/specs/prover/circuits/log_sorter.md b/docs/src/specs/prover/circuits/log_sorter.md
similarity index 100%
rename from docs/specs/prover/circuits/log_sorter.md
rename to docs/src/specs/prover/circuits/log_sorter.md
diff --git a/docs/specs/prover/circuits/main_vm.md b/docs/src/specs/prover/circuits/main_vm.md
similarity index 100%
rename from docs/specs/prover/circuits/main_vm.md
rename to docs/src/specs/prover/circuits/main_vm.md
diff --git a/docs/specs/prover/circuits/overview.md b/docs/src/specs/prover/circuits/overview.md
similarity index 100%
rename from docs/specs/prover/circuits/overview.md
rename to docs/src/specs/prover/circuits/overview.md
diff --git a/docs/specs/prover/circuits/ram_permutation.md b/docs/src/specs/prover/circuits/ram_permutation.md
similarity index 100%
rename from docs/specs/prover/circuits/ram_permutation.md
rename to docs/src/specs/prover/circuits/ram_permutation.md
diff --git a/docs/specs/prover/circuits/sha256_round_function.md b/docs/src/specs/prover/circuits/sha256_round_function.md
similarity index 100%
rename from docs/specs/prover/circuits/sha256_round_function.md
rename to docs/src/specs/prover/circuits/sha256_round_function.md
diff --git a/docs/specs/prover/circuits/sort_decommitments.md b/docs/src/specs/prover/circuits/sort_decommitments.md
similarity index 100%
rename from docs/specs/prover/circuits/sort_decommitments.md
rename to docs/src/specs/prover/circuits/sort_decommitments.md
diff --git a/docs/specs/prover/circuits/sorting.md b/docs/src/specs/prover/circuits/sorting.md
similarity index 100%
rename from docs/specs/prover/circuits/sorting.md
rename to docs/src/specs/prover/circuits/sorting.md
diff --git a/docs/specs/prover/circuits/sorting_and_deduplicating.md b/docs/src/specs/prover/circuits/sorting_and_deduplicating.md
similarity index 100%
rename from docs/specs/prover/circuits/sorting_and_deduplicating.md
rename to docs/src/specs/prover/circuits/sorting_and_deduplicating.md
diff --git a/docs/specs/prover/circuits/storage_application.md b/docs/src/specs/prover/circuits/storage_application.md
similarity index 100%
rename from docs/specs/prover/circuits/storage_application.md
rename to docs/src/specs/prover/circuits/storage_application.md
diff --git a/docs/specs/prover/circuits/storage_sorter.md b/docs/src/specs/prover/circuits/storage_sorter.md
similarity index 100%
rename from docs/specs/prover/circuits/storage_sorter.md
rename to docs/src/specs/prover/circuits/storage_sorter.md
diff --git a/docs/specs/prover/getting_started.md b/docs/src/specs/prover/getting_started.md
similarity index 100%
rename from docs/specs/prover/getting_started.md
rename to docs/src/specs/prover/getting_started.md
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(1).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(1).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(1).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(1).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(11).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(11).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(11).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(11).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(12).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(12).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(12).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(12).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(13).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(13).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(13).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(13).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(14).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(14).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(14).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(14).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(16).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(16).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(16).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(16).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(17).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(17).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(17).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(17).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(2).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(2).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(2).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(2).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(3).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(3).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(3).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(3).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(4).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(4).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(4).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(4).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(7).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(7).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(7).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(7).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(8).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(8).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(8).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(8).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(9).png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(9).png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(9).png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied(9).png
diff --git a/docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied.png b/docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied.png
similarity index 100%
rename from docs/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied.png
rename to docs/src/specs/prover/img/boojum_function_check_if_satisfied/Check_if_satisfied.png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(10).png b/docs/src/specs/prover/img/circuit_testing/Contest(10).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(10).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(10).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(11).png b/docs/src/specs/prover/img/circuit_testing/Contest(11).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(11).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(11).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(12).png b/docs/src/specs/prover/img/circuit_testing/Contest(12).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(12).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(12).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(4).png b/docs/src/specs/prover/img/circuit_testing/Contest(4).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(4).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(4).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(5).png b/docs/src/specs/prover/img/circuit_testing/Contest(5).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(5).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(5).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(6).png b/docs/src/specs/prover/img/circuit_testing/Contest(6).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(6).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(6).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(7).png b/docs/src/specs/prover/img/circuit_testing/Contest(7).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(7).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(7).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(8).png b/docs/src/specs/prover/img/circuit_testing/Contest(8).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(8).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(8).png
diff --git a/docs/specs/prover/img/circuit_testing/Contest(9).png b/docs/src/specs/prover/img/circuit_testing/Contest(9).png
similarity index 100%
rename from docs/specs/prover/img/circuit_testing/Contest(9).png
rename to docs/src/specs/prover/img/circuit_testing/Contest(9).png
diff --git "a/docs/specs/prover/img/intro_to_zkSync\342\200\231s_ZK/circuit.png" "b/docs/src/specs/prover/img/intro_to_zkSync\342\200\231s_ZK/circuit.png"
similarity index 100%
rename from "docs/specs/prover/img/intro_to_zkSync\342\200\231s_ZK/circuit.png"
rename to "docs/src/specs/prover/img/intro_to_zkSync\342\200\231s_ZK/circuit.png"
diff --git a/docs/specs/prover/overview.md b/docs/src/specs/prover/overview.md
similarity index 100%
rename from docs/specs/prover/overview.md
rename to docs/src/specs/prover/overview.md
diff --git a/docs/specs/prover/zk_terminology.md b/docs/src/specs/prover/zk_terminology.md
similarity index 100%
rename from docs/specs/prover/zk_terminology.md
rename to docs/src/specs/prover/zk_terminology.md
diff --git a/docs/specs/zk_chains/README.md b/docs/src/specs/zk_chains/README.md
similarity index 100%
rename from docs/specs/zk_chains/README.md
rename to docs/src/specs/zk_chains/README.md
diff --git a/docs/specs/zk_chains/gateway.md b/docs/src/specs/zk_chains/gateway.md
similarity index 100%
rename from docs/specs/zk_chains/gateway.md
rename to docs/src/specs/zk_chains/gateway.md
diff --git a/docs/specs/zk_chains/img/contractsExternal.png b/docs/src/specs/zk_chains/img/contractsExternal.png
similarity index 100%
rename from docs/specs/zk_chains/img/contractsExternal.png
rename to docs/src/specs/zk_chains/img/contractsExternal.png
diff --git a/docs/specs/zk_chains/img/deployWeth.png b/docs/src/specs/zk_chains/img/deployWeth.png
similarity index 100%
rename from docs/specs/zk_chains/img/deployWeth.png
rename to docs/src/specs/zk_chains/img/deployWeth.png
diff --git a/docs/specs/zk_chains/img/depositWeth.png b/docs/src/specs/zk_chains/img/depositWeth.png
similarity index 100%
rename from docs/specs/zk_chains/img/depositWeth.png
rename to docs/src/specs/zk_chains/img/depositWeth.png
diff --git a/docs/specs/zk_chains/img/hyperbridges.png b/docs/src/specs/zk_chains/img/hyperbridges.png
similarity index 100%
rename from docs/specs/zk_chains/img/hyperbridges.png
rename to docs/src/specs/zk_chains/img/hyperbridges.png
diff --git a/docs/specs/zk_chains/img/hyperbridging.png b/docs/src/specs/zk_chains/img/hyperbridging.png
similarity index 100%
rename from docs/specs/zk_chains/img/hyperbridging.png
rename to docs/src/specs/zk_chains/img/hyperbridging.png
diff --git a/docs/specs/zk_chains/img/newChain.png b/docs/src/specs/zk_chains/img/newChain.png
similarity index 100%
rename from docs/specs/zk_chains/img/newChain.png
rename to docs/src/specs/zk_chains/img/newChain.png
diff --git a/docs/specs/zk_chains/interop.md b/docs/src/specs/zk_chains/interop.md
similarity index 100%
rename from docs/specs/zk_chains/interop.md
rename to docs/src/specs/zk_chains/interop.md
diff --git a/docs/specs/zk_chains/overview.md b/docs/src/specs/zk_chains/overview.md
similarity index 100%
rename from docs/specs/zk_chains/overview.md
rename to docs/src/specs/zk_chains/overview.md
diff --git a/docs/specs/zk_chains/shared_bridge.md b/docs/src/specs/zk_chains/shared_bridge.md
similarity index 100%
rename from docs/specs/zk_chains/shared_bridge.md
rename to docs/src/specs/zk_chains/shared_bridge.md
diff --git a/docs/specs/zk_evm/README.md b/docs/src/specs/zk_evm/README.md
similarity index 100%
rename from docs/specs/zk_evm/README.md
rename to docs/src/specs/zk_evm/README.md
diff --git a/docs/specs/zk_evm/account_abstraction.md b/docs/src/specs/zk_evm/account_abstraction.md
similarity index 100%
rename from docs/specs/zk_evm/account_abstraction.md
rename to docs/src/specs/zk_evm/account_abstraction.md
diff --git a/docs/specs/zk_evm/bootloader.md b/docs/src/specs/zk_evm/bootloader.md
similarity index 100%
rename from docs/specs/zk_evm/bootloader.md
rename to docs/src/specs/zk_evm/bootloader.md
diff --git a/docs/specs/zk_evm/fee_model.md b/docs/src/specs/zk_evm/fee_model.md
similarity index 100%
rename from docs/specs/zk_evm/fee_model.md
rename to docs/src/specs/zk_evm/fee_model.md
diff --git a/docs/specs/zk_evm/precompiles.md b/docs/src/specs/zk_evm/precompiles.md
similarity index 100%
rename from docs/specs/zk_evm/precompiles.md
rename to docs/src/specs/zk_evm/precompiles.md
diff --git a/docs/specs/zk_evm/system_contracts.md b/docs/src/specs/zk_evm/system_contracts.md
similarity index 100%
rename from docs/specs/zk_evm/system_contracts.md
rename to docs/src/specs/zk_evm/system_contracts.md
diff --git a/docs/specs/zk_evm/vm_overview.md b/docs/src/specs/zk_evm/vm_overview.md
similarity index 100%
rename from docs/specs/zk_evm/vm_overview.md
rename to docs/src/specs/zk_evm/vm_overview.md
diff --git a/docs/specs/zk_evm/vm_specification/EraVM_formal_specification.pdf b/docs/src/specs/zk_evm/vm_specification/EraVM_formal_specification.pdf
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/EraVM_formal_specification.pdf
rename to docs/src/specs/zk_evm/vm_specification/EraVM_formal_specification.pdf
diff --git a/docs/specs/zk_evm/vm_specification/README.md b/docs/src/specs/zk_evm/vm_specification/README.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/README.md
rename to docs/src/specs/zk_evm/vm_specification/README.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/README.md b/docs/src/specs/zk_evm/vm_specification/compiler/README.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/README.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/README.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/code_separation.md b/docs/src/specs/zk_evm/vm_specification/compiler/code_separation.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/code_separation.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/code_separation.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/evmla_translator.md b/docs/src/specs/zk_evm/vm_specification/compiler/evmla_translator.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/evmla_translator.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/evmla_translator.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/exception_handling.md b/docs/src/specs/zk_evm/vm_specification/compiler/exception_handling.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/exception_handling.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/exception_handling.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/README.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/README.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/README.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/README.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/README.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/README.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/README.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/README.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/arithmetic.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/arithmetic.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/arithmetic.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/arithmetic.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/bitwise.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/bitwise.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/bitwise.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/bitwise.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/block.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/block.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/block.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/block.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/call.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/call.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/call.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/call.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/create.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/create.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/create.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/create.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/environment.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/environment.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/environment.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/environment.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/logging.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/logging.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/logging.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/logging.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/logical.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/logical.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/logical.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/logical.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/memory.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/memory.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/memory.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/memory.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/overview.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/overview.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/overview.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/overview.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/return.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/return.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/return.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/return.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/sha3.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/sha3.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/sha3.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/sha3.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evm/stack.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/stack.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evm/stack.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evm/stack.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/evmla.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/evmla.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/evmla.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/evmla.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/README.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/README.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/README.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/README.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/call.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/call.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/call.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/call.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/overview.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/overview.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/overview.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/overview.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/verbatim.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/verbatim.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/extensions/verbatim.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/extensions/verbatim.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/overview.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/overview.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/overview.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/overview.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/instructions/yul.md b/docs/src/specs/zk_evm/vm_specification/compiler/instructions/yul.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/instructions/yul.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/instructions/yul.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/overview.md b/docs/src/specs/zk_evm/vm_specification/compiler/overview.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/overview.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/overview.md
diff --git a/docs/specs/zk_evm/vm_specification/compiler/system_contracts.md b/docs/src/specs/zk_evm/vm_specification/compiler/system_contracts.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/compiler/system_contracts.md
rename to docs/src/specs/zk_evm/vm_specification/compiler/system_contracts.md
diff --git a/docs/specs/zk_evm/vm_specification/img/arch-overview.png b/docs/src/specs/zk_evm/vm_specification/img/arch-overview.png
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/img/arch-overview.png
rename to docs/src/specs/zk_evm/vm_specification/img/arch-overview.png
diff --git a/docs/specs/zk_evm/vm_specification/img/arithmetic_opcode.png b/docs/src/specs/zk_evm/vm_specification/img/arithmetic_opcode.png
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/img/arithmetic_opcode.png
rename to docs/src/specs/zk_evm/vm_specification/img/arithmetic_opcode.png
diff --git a/docs/specs/zk_evm/vm_specification/zkSync_era_virtual_machine_primer.md b/docs/src/specs/zk_evm/vm_specification/zkSync_era_virtual_machine_primer.md
similarity index 100%
rename from docs/specs/zk_evm/vm_specification/zkSync_era_virtual_machine_primer.md
rename to docs/src/specs/zk_evm/vm_specification/zkSync_era_virtual_machine_primer.md
diff --git a/docs/theme/head.hbs b/docs/theme/head.hbs
new file mode 100644
index 000000000000..66ee37538adf
--- /dev/null
+++ b/docs/theme/head.hbs
@@ -0,0 +1 @@
+
diff --git a/prover/crates/bin/prover_autoscaler/README.md b/prover/crates/bin/prover_autoscaler/README.md
index 6a0ff84f88f2..3d1a9afe5a30 100644
--- a/prover/crates/bin/prover_autoscaler/README.md
+++ b/prover/crates/bin/prover_autoscaler/README.md
@@ -152,7 +152,8 @@ agent_config:
- `protocol_versions` is a map namespaces to protocol version it processes. Should correspond binary versions running
there!
- `cluster_priorities` is a map cluster name to priority, the lower will be used first.
-- `min_provers` is a map namespace to minimum number of provers to run even if the queue is empty.
+- `apply_min_to_namespace` specifies current primary namespace to run min number of provers in it.
+- `min_provers` is a minimum number of provers to run even if the queue is empty. Default: 0.
- `max_provers` is a map of cluster name to map GPU type to maximum number of provers.
- `prover_speed` is a map GPU to speed divider. Default: 500.
- `long_pending_duration` is time after a pending pod considered long pending and will be relocated to different
@@ -160,6 +161,7 @@ agent_config:
- `scaler_targets` subsection is a list of Simple targets:
- `queue_report_field` is name of corresponding queue report section. See example for possible options.
- `deployment` is name of a Deployment to scale.
+ - `min_replicas` is a minimum number of replicas to run even if the queue is empty. Default: 0.
- `max_replicas` is a map of cluster name to maximum number of replicas.
- `speed` is a divider for corresponding queue.
@@ -182,8 +184,8 @@ scaler_config:
cluster1: 0
cluster2: 100
cluster3: 200
- min_provers:
- prover-new: 0
+ apply_min_to_namespace: prover-new
+ min_provers: 1
max_provers:
cluster1:
L4: 1
@@ -201,6 +203,7 @@ scaler_config:
scaler_targets:
- queue_report_field: basic_witness_jobs
deployment: witness-generator-basic-fri
+ min_replicas: 1
max_replicas:
cluster1: 10
cluster2: 20
diff --git a/prover/crates/bin/prover_autoscaler/src/config.rs b/prover/crates/bin/prover_autoscaler/src/config.rs
index 777ffe89fc91..ff3bccf79c83 100644
--- a/prover/crates/bin/prover_autoscaler/src/config.rs
+++ b/prover/crates/bin/prover_autoscaler/src/config.rs
@@ -59,8 +59,11 @@ pub struct ProverAutoscalerScalerConfig {
pub prover_speed: HashMap,
/// Maximum number of provers which can be run per cluster/GPU.
pub max_provers: HashMap>,
- /// Minimum number of provers per namespace.
- pub min_provers: HashMap,
+ /// Minimum number of provers globally.
+ #[serde(default)]
+ pub min_provers: u32,
+ /// Name of primary namespace, all min numbers are applied to it.
+ pub apply_min_to_namespace: Option,
/// Duration after which pending pod considered long pending.
#[serde(
with = "humantime_serde",
@@ -132,6 +135,9 @@ pub enum QueueReportFields {
pub struct ScalerTarget {
pub queue_report_field: QueueReportFields,
pub deployment: String,
+ /// Min replicas globally.
+ #[serde(default)]
+ pub min_replicas: usize,
/// Max replicas per cluster.
pub max_replicas: HashMap,
/// The queue will be divided by the speed and rounded up to get number of replicas.
diff --git a/prover/crates/bin/prover_autoscaler/src/global/scaler.rs b/prover/crates/bin/prover_autoscaler/src/global/scaler.rs
index 829b95dd7514..074da383b740 100644
--- a/prover/crates/bin/prover_autoscaler/src/global/scaler.rs
+++ b/prover/crates/bin/prover_autoscaler/src/global/scaler.rs
@@ -73,7 +73,8 @@ pub struct Scaler {
pub struct GpuScaler {
/// Which cluster to use first.
cluster_priorities: HashMap,
- min_provers: HashMap,
+ apply_min_to_namespace: Option,
+ min_provers: u32,
max_provers: HashMap>,
prover_speed: HashMap,
long_pending_duration: chrono::Duration,
@@ -84,6 +85,8 @@ pub struct SimpleScaler {
deployment: String,
/// Which cluster to use first.
cluster_priorities: HashMap,
+ apply_min_to_namespace: Option,
+ min_replicas: usize,
max_replicas: HashMap,
speed: usize,
long_pending_duration: chrono::Duration,
@@ -126,6 +129,7 @@ impl Scaler {
simple_scalers.push(SimpleScaler::new(
c,
config.cluster_priorities.clone(),
+ config.apply_min_to_namespace.clone(),
chrono::Duration::seconds(config.long_pending_duration.as_secs() as i64),
))
}
@@ -144,6 +148,7 @@ impl GpuScaler {
pub fn new(config: ProverAutoscalerScalerConfig) -> Self {
Self {
cluster_priorities: config.cluster_priorities,
+ apply_min_to_namespace: config.apply_min_to_namespace,
min_provers: config.min_provers,
max_provers: config.max_provers,
prover_speed: config.prover_speed,
@@ -287,10 +292,12 @@ impl GpuScaler {
// Increase queue size, if it's too small, to make sure that required min_provers are
// running.
- let queue: u64 = self.min_provers.get(namespace).map_or(queue, |min| {
+ let queue: u64 = if self.apply_min_to_namespace.as_deref() == Some(namespace.as_str()) {
self.normalize_queue(Gpu::L4, queue)
- .max(self.provers_to_speed(Gpu::L4, *min))
- });
+ .max(self.provers_to_speed(Gpu::L4, self.min_provers))
+ } else {
+ queue
+ };
let mut total: i64 = 0;
let mut provers: HashMap = HashMap::new();
@@ -424,12 +431,15 @@ impl SimpleScaler {
pub fn new(
config: &ScalerTarget,
cluster_priorities: HashMap,
+ apply_min_to_namespace: Option,
long_pending_duration: chrono::Duration,
) -> Self {
Self {
queue_report_field: config.queue_report_field,
deployment: config.deployment.clone(),
cluster_priorities,
+ apply_min_to_namespace,
+ min_replicas: config.min_replicas,
max_replicas: config.max_replicas.clone(),
speed: config.speed,
long_pending_duration,
@@ -521,6 +531,15 @@ impl SimpleScaler {
&sorted_clusters
);
+ // Increase queue size, if it's too small, to make sure that required min_provers are
+ // running.
+ let queue: u64 = if self.apply_min_to_namespace.as_deref() == Some(namespace.as_str()) {
+ self.normalize_queue(queue)
+ .max(self.pods_to_speed(self.min_replicas))
+ } else {
+ queue
+ };
+
let mut total: i64 = 0;
let mut pods: HashMap = HashMap::new();
for cluster in &sorted_clusters {
@@ -719,7 +738,8 @@ mod tests {
fn test_run() {
let scaler = GpuScaler::new(ProverAutoscalerScalerConfig {
cluster_priorities: [("foo".into(), 0), ("bar".into(), 10)].into(),
- min_provers: [("prover-other".into(), 2)].into(),
+ apply_min_to_namespace: Some("prover-other".into()),
+ min_provers: 2,
max_provers: [
("foo".into(), [(Gpu::L4, 100)].into()),
("bar".into(), [(Gpu::L4, 100)].into()),
@@ -857,7 +877,8 @@ mod tests {
fn test_run_min_provers() {
let scaler = GpuScaler::new(ProverAutoscalerScalerConfig {
cluster_priorities: [("foo".into(), 0), ("bar".into(), 10)].into(),
- min_provers: [("prover".into(), 2)].into(),
+ apply_min_to_namespace: Some("prover".into()),
+ min_provers: 2,
max_provers: [
("foo".into(), [(Gpu::L4, 100)].into()),
("bar".into(), [(Gpu::L4, 100)].into()),
@@ -1052,7 +1073,8 @@ mod tests {
fn test_run_need_move() {
let scaler = GpuScaler::new(ProverAutoscalerScalerConfig {
cluster_priorities: [("foo".into(), 0), ("bar".into(), 10)].into(),
- min_provers: [("prover".into(), 2)].into(),
+ apply_min_to_namespace: Some("prover".into()),
+ min_provers: 2,
max_provers: [
("foo".into(), [(Gpu::L4, 100)].into()),
("bar".into(), [(Gpu::L4, 100)].into()),
diff --git a/prover/docs/.gitignore b/prover/docs/.gitignore
new file mode 100644
index 000000000000..7585238efedf
--- /dev/null
+++ b/prover/docs/.gitignore
@@ -0,0 +1 @@
+book
diff --git a/prover/docs/99_further_reading.md b/prover/docs/99_further_reading.md
deleted file mode 100644
index 64487a715d57..000000000000
--- a/prover/docs/99_further_reading.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Further reading
-
-The documentation in this section aimed to provide a practical overview of the prover workspace, e.g. help people to
-understand how to run provers and what they do.
-
-However, we have some documentation that is more focused on theory of proving in the [core workspace docs](../../docs/).
-
-You may find the following articles helpful for general understanding of ZK proofs:
-
-- [ZK intuition](../../docs/guides/advanced/13_zk_intuition.md).
-- [ZK deeper overview](../../docs/guides/advanced/14_zk_deeper_overview.md).
-- [Prover keys](../../docs/guides/advanced/15_prover_keys.md).
-- [Overview of our ZK proving system implementation](../../docs/specs/prover/).
diff --git a/prover/docs/book.toml b/prover/docs/book.toml
new file mode 100644
index 000000000000..8e0a72942acd
--- /dev/null
+++ b/prover/docs/book.toml
@@ -0,0 +1,32 @@
+[book]
+authors = ["ZKsync team"]
+language = "en"
+multilingual = false
+src = "src"
+title = "ZKsync Prover Documentation"
+
+[output.html]
+smart-punctuation = true
+mathjax-support = true
+git-repository-url = "https://github.com/matter-labs/zksync-era/tree/main/prover/docs"
+edit-url-template = "https://github.com/matter-labs/zksync-era/tree/main/prover/docs/{path}"
+additional-js = ["js/version-box.js", "js/mermaid-init.js"]
+additional-css = ["css/version-box.css"]
+
+[output.html.playground]
+editable = true
+line-numbers = true
+
+[output.html.search]
+limit-results = 20
+use-boolean-and = true
+boost-title = 2
+boost-hierarchy = 2
+boost-paragraph = 1
+expand = true
+heading-split-level = 2
+
+[preprocessor]
+
+[preprocessor.mermaid]
+command = "mdbook-mermaid"
diff --git a/prover/docs/css/version-box.css b/prover/docs/css/version-box.css
new file mode 100644
index 000000000000..4006ac7804b3
--- /dev/null
+++ b/prover/docs/css/version-box.css
@@ -0,0 +1,46 @@
+#version-box {
+ display: flex;
+ align-items: center;
+ margin-right: 15px; /* Space from the right side */
+ background-color: transparent; /* Make the box background transparent */
+}
+
+/* Base styles for the version selector */
+#version-selector {
+ background-color: transparent; /* Remove background color */
+ border: 1px solid #4a5568; /* Subtle border */
+ border-radius: 4px; /* Rounded edges */
+ padding: 5px 10px; /* Padding inside dropdown */
+ font-size: 0.9em;
+ font-weight: normal;
+ outline: none; /* Removes default focus outline */
+ cursor: pointer;
+}
+
+/* Text color for dark themes */
+.theme-navy #version-selector,
+.theme-coal #version-selector {
+ color: #f7fafc; /* Light text color for dark backgrounds */
+}
+
+/* Text color for light theme */
+.theme-light #version-selector {
+ color: #333333; /* Dark text color for light background */
+}
+
+/* Hover effect for better user feedback */
+#version-selector:hover {
+ background-color: rgba(255, 255, 255, 0.1); /* Light hover effect */
+}
+
+/* Optional: Style for when the selector is focused */
+#version-selector:focus {
+ border-color: #63b3ed; /* Accent color for focused state */
+}
+
+.right-buttons {
+ display: flex;
+ flex-direction: row; /* Aligns items in a row, left to right */
+ align-items: center; /* Centers items vertically */
+ gap: 10px; /* Adds space between items */
+}
diff --git a/prover/docs/js/mermaid-init.js b/prover/docs/js/mermaid-init.js
new file mode 100644
index 000000000000..15a7f4e57c60
--- /dev/null
+++ b/prover/docs/js/mermaid-init.js
@@ -0,0 +1,35 @@
+(() => {
+ const darkThemes = ['ayu', 'navy', 'coal'];
+ const lightThemes = ['light', 'rust'];
+
+ const classList = document.getElementsByTagName('html')[0].classList;
+
+ let lastThemeWasLight = true;
+ for (const cssClass of classList) {
+ if (darkThemes.includes(cssClass)) {
+ lastThemeWasLight = false;
+ break;
+ }
+ }
+
+ const theme = lastThemeWasLight ? 'default' : 'dark';
+ mermaid.initialize({ startOnLoad: true, theme });
+
+ // Simplest way to make mermaid re-render the diagrams in the new theme is via refreshing the page
+
+ for (const darkTheme of darkThemes) {
+ document.getElementById(darkTheme).addEventListener('click', () => {
+ if (lastThemeWasLight) {
+ window.location.reload();
+ }
+ });
+ }
+
+ for (const lightTheme of lightThemes) {
+ document.getElementById(lightTheme).addEventListener('click', () => {
+ if (!lastThemeWasLight) {
+ window.location.reload();
+ }
+ });
+ }
+})();
diff --git a/prover/docs/js/version-box.js b/prover/docs/js/version-box.js
new file mode 100644
index 000000000000..a7d053e01b47
--- /dev/null
+++ b/prover/docs/js/version-box.js
@@ -0,0 +1,61 @@
+document.addEventListener('DOMContentLoaded', function () {
+ // Get the base URL from the mdBook configuration
+ const baseUrl = document.location.origin + '/zksync-era/prover';
+
+ // Function to create version selector
+ function createVersionSelector(versions) {
+ const versionSelector = document.createElement('select');
+ versionSelector.id = 'version-selector';
+
+ // Get the current path
+ const currentPath = window.location.pathname;
+
+ // Iterate over the versions object
+ for (const [versionName, versionUrl] of Object.entries(versions)) {
+ const option = document.createElement('option');
+ option.value = versionUrl + '/';
+ option.textContent = versionName;
+
+ // Check if the current URL matches this option's value
+ if (currentPath.includes(option.value)) {
+ option.selected = true; // Set this option as selected
+ }
+
+ versionSelector.appendChild(option);
+ }
+
+ // Event listener to handle version change
+ versionSelector.addEventListener('change', function () {
+ const selectedVersion = versionSelector.value;
+ // Redirect to the selected version URL
+ window.location.href = '/zksync-era/prover' + selectedVersion;
+ });
+
+ return versionSelector;
+ }
+
+ // Fetch versions from JSON file
+ fetch(baseUrl + '/versions.json')
+ .then((response) => {
+ if (!response.ok) {
+ throw new Error('Network response was not ok ' + response.statusText);
+ }
+ return response.json();
+ })
+ .then((data) => {
+ const versionSelector = createVersionSelector(data);
+ const nav = document.querySelector('.right-buttons');
+
+ if (nav) {
+ const versionBox = document.createElement('div');
+ versionBox.id = 'version-box';
+ versionBox.appendChild(versionSelector);
+ nav.appendChild(versionBox); // Append to the .right-buttons container
+ } else {
+ console.error('.right-buttons element not found.');
+ }
+ })
+ .catch((error) => {
+ console.error('There has been a problem with your fetch operation:', error);
+ });
+});
diff --git a/prover/docs/00_intro.md b/prover/docs/src/00_intro.md
similarity index 100%
rename from prover/docs/00_intro.md
rename to prover/docs/src/00_intro.md
diff --git a/prover/docs/01_gcp_vm.md b/prover/docs/src/01_gcp_vm.md
similarity index 100%
rename from prover/docs/01_gcp_vm.md
rename to prover/docs/src/01_gcp_vm.md
diff --git a/prover/docs/02_setup.md b/prover/docs/src/02_setup.md
similarity index 100%
rename from prover/docs/02_setup.md
rename to prover/docs/src/02_setup.md
diff --git a/prover/docs/03_launch.md b/prover/docs/src/03_launch.md
similarity index 100%
rename from prover/docs/03_launch.md
rename to prover/docs/src/03_launch.md
diff --git a/prover/docs/04_flow.md b/prover/docs/src/04_flow.md
similarity index 100%
rename from prover/docs/04_flow.md
rename to prover/docs/src/04_flow.md
diff --git a/prover/docs/05_proving_batch.md b/prover/docs/src/05_proving_batch.md
similarity index 100%
rename from prover/docs/05_proving_batch.md
rename to prover/docs/src/05_proving_batch.md
diff --git a/prover/docs/src/99_further_reading.md b/prover/docs/src/99_further_reading.md
new file mode 100644
index 000000000000..7b916167dbdd
--- /dev/null
+++ b/prover/docs/src/99_further_reading.md
@@ -0,0 +1,14 @@
+# Further reading
+
+The documentation in this section aimed to provide a practical overview of the prover workspace, e.g. help people to
+understand how to run provers and what they do.
+
+However, we have some documentation that is more focused on theory of proving in the
+[core workspace docs](https://matter-labs.github.io/zksync-era/core/latest).
+
+You may find the following articles helpful for general understanding of ZK proofs:
+
+- [ZK intuition](https://matter-labs.github.io/zksync-era/core/latest/guides/advanced/13_zk_intuition.html).
+- [ZK deeper overview](https://matter-labs.github.io/zksync-era/core/latest/docs/guides/advanced/14_zk_deeper_overview.html).
+- [Prover keys](https://matter-labs.github.io/zksync-era/core/latest/docs/guides/advanced/15_prover_keys.html).
+- [Overview of our ZK proving system implementation](https://matter-labs.github.io/zksync-era/core/latest/specs/prover/overview.html).
diff --git a/prover/docs/src/README.md b/prover/docs/src/README.md
new file mode 100644
index 000000000000..991c91219e99
--- /dev/null
+++ b/prover/docs/src/README.md
@@ -0,0 +1,16 @@
+# Prover subsystem documentation
+
+This is technical documentation for the prover subsystem. It aims to help developers to set up a development environment
+for working with provers. This documentation assumes that you are already familiar with how ZKsync works, and you need
+to be able to work with the prover code.
+
+It does not cover topics such as basics of ZK or production deployment for provers.
+
+## Table of contents
+
+- [Intro](00_intro.md)
+- [Setting up a GCP VM](01_gcp_vm.md)
+- [Workspace setup](02_setup.md)
+- [Running prover subsystem](03_launch.md)
+- [Proof generation flow](04_flow.md)
+- [Further reading](99_further_reading.md)
diff --git a/prover/docs/src/SUMMARY.md b/prover/docs/src/SUMMARY.md
new file mode 100644
index 000000000000..d4a6fa15d778
--- /dev/null
+++ b/prover/docs/src/SUMMARY.md
@@ -0,0 +1,11 @@
+# Summary
+
+[Introduction](./00_intro.md)
+
+- [Creating a GCP VM](./01_gcp_vm.md)
+- [Development environment setup](./02_setup.md)
+- [Running provers](./03_launch.md)
+- [Prover flow](./04_flow.md)
+- [Proving a batch](./05_proving_batch.md)
+
+[Further reading](./99_further_reading.md)
diff --git a/prover/docs/theme/head.hbs b/prover/docs/theme/head.hbs
new file mode 100644
index 000000000000..66ee37538adf
--- /dev/null
+++ b/prover/docs/theme/head.hbs
@@ -0,0 +1 @@
+