diff --git a/docs/tutorials/build-files-archive-with-dal.md b/docs/tutorials/build-files-archive-with-dal.md
new file mode 100644
index 000000000..9e4d3c674
--- /dev/null
+++ b/docs/tutorials/build-files-archive-with-dal.md
@@ -0,0 +1,104 @@
+---
+title: Implement a file archive with the DAL and a Smart Rollup
+authors: 'Tezos Core Developers'
+last_update:
+ date: 9 February 2024
+---
+
+:::note Experimental
+The Data Availability Layer is an experimental feature that is not yet available on Tezos Mainnet.
+The way the DAL works may change significantly before it is generally available.
+:::
+
+The Data Availability Layer (DAL) is a companion peer-to-peer network for the Tezos blockchain, designed to provide additional data bandwidth to Smart Rollups.
+It allows users to share large amounts of data in a way that is decentralized and permissionless, because anyone can join the network and post and read data on it.
+
+In this tutorial, you will set up a file archive that stores and retrieves files with the DAL.
+You will learn:
+
+- How data is organized and shared with the DAL and the reveal data channel
+- How to read data from the DAL in a Smart Rollup
+- How to host a DAL node
+- How to publish data and files with the DAL
+
+Because the DAL is not yet available on Tezos Mainnet, this tutorial uses the [Weeklynet test network](https://teztnets.com/weeklynet-about), which runs on a newer version of the protocol that includes the DAL.
+Weeklynet runs just like other Tezos networks like Mainnet and Ghostnet, with its own nodes, bakers, and accusers, so you don't need to run your own nodes and bakers.
+
+See these links for more information about the DAL:
+
+- For technical information about how the DAL works, see [Data Availability Layer](https://tezos.gitlab.io/shell/dal.html) in the Octez documentation.
+- For more information about the approach for the DAL, see [The Rollup Booster: A Data-Availability Layer for Tezos](https://research-development.nomadic-labs.com/data-availability-layer-tezos.html).
+
+## Tutorial applications
+
+In this tutorial, you set up these components:
+
+- The Octez client, which you use to manage a local wallet, deploy a Smart Rollup, and send data to the DAL
+- A Data Availability Layer node (not to be confused with a layer 1 node), which stores data temporarily and distributes it to Smart Rollups
+- A Smart Rollup that listens for data published to the DAL, retrieves it from the DAL node, and stores it locally
+- A Smart Rollup node that runs your Smart Rollup
+
+For simplicity, you do not set up a layer 1 node or a baker, which are responsible for verifying that the data is available before Smart Rollups can access it.
+Instead, you use the existing nodes and bakers that are running on Weeklynet.
+
+## Tutorial diagram
+
+Here is a diagram that shows the components that you set up in this tutorial in a light blue background:
+
+![A diagram of the DAL file tutorial, highlighting the Octez client, DAL node, and Smart Rollup that you create with a light blue background to distinguish them from the existing DAL nodes, layer 1 nodes, and bakers](/img/tutorials/dal-file-tutorial-setup.png)
+
+
+
+## Prerequisites
+
+This article assumes some familiarity with Smart Rollups.
+If you are new to Smart Rollups, see the tutorial [Deploy a Smart Rollup](./smart-rollup).
+
+## Why the DAL?
+
+The DAL has earned the nickname "Rollup Booster" from its ability to address
+the last bottleneck Smart Rollups developers could not overcome without
+sacrificing decentralization: block space. Smart Rollups offload
+*computation* from layer 1, but the transactions that they process still need to
+originate from somewhere.
+
+By default, that "somewhere" is the layer 1 blocks, yet the size of a Tezos
+block is limited to around 500KBytes. In this model, while Smart Rollups do not
+compete for layer 1 gas anymore, they still compete for block space.
+
+The DAL allows third parties to publish data and have bakers attest that the data is available.
+When enough bakers have attested that the data is available, Smart Rollups can retrieve the data without the need for additional trusted third-parties.
+
+## How the DAL works
+
+In this tutorial, you create a file archive application that allows clients to upload data to the DAL.
+You also create a Smart Rollup that listens to the DAL and responds to that data.
+
+The DAL works like this:
+
+1. Users post data to a DAL node.
+1. The DAL node returns a certificate.
+This certificate includes a commitment that the data is available and a proof of the data.
+1. Users post the certificate to layer 1 via the Octez client, which is much cheaper than posting the complete data.
+1. When the certificate is confirmed in a block, layer 1 splits the data into shards and assigns those shards to bakers, who verify that the data is available.
+1. Bakers verify that the data is available and attest that the data is available in their usual block attestations to layer 1.
+They have a certain number of blocks to do so, known as the _attestation lag_, and if they don't by the end of this period, the certificate is considered bogus and the related data is dropped.
+1. Other DAL nodes get the data from the initial DAL node through the peer-to-peer network.
+1. The Smart Rollup node monitors the blocks and when it sees attested DAL data, it connects to a DAL node to request the data.
+1. The Smart Rollup node stores the data in its durable storage, addressed by its hash.
+Smart Rollups must store the data because it is available on the DAL for only a short time.
+1. Users who know the hash of the data can download it from the Smart Rollup node.
+
+The overall workflow is summarized in the following figure:
+
+![Overall diagram of the workflow of the Data Availability Layer](/img/architecture/dal-workflow.png)
+
+
+There are many steps in the DAL process, but the most complicated parts (storing and sharing data) are handled automatically by the various daemons in the Octez suite.
+
+:::note
+When you install a Smart Rollup, you provide only the installer kernel on layer 1 and the full kernel via the reveal data channel.
+Currently, you cannot send the full kernel data over the Data Availability Layer, so this tutorial relies on the reveal data channel to install the kernel as usual.
+:::
+
+When you are ready, get started by going to [Part 1: Setting up an environment](./build-files-archive-with-dal/set-up-environment).
diff --git a/docs/tutorials/build-files-archive-with-dal.mdx b/docs/tutorials/build-files-archive-with-dal.mdx
deleted file mode 100644
index 95770a04f..000000000
--- a/docs/tutorials/build-files-archive-with-dal.mdx
+++ /dev/null
@@ -1,207 +0,0 @@
----
-title: Implement a file archive with the DAL and a Smart Rollup
-authors: 'Tezos Core Developers'
-last_update:
- date: 26 January 2024
----
-
-import LucidDiagram from '@site/src/components/LucidDiagram';
-
-:::note Experimental
-The Data Availability Layer is an experimental feature that is not yet available on Tezos Mainnet.
-The way the DAL works may change significantly before it is generally available.
-:::
-
-The Data Availability Layer (DAL) is a companion peer-to-peer network for the Tezos blockchain, designed to provide additional data bandwidth to Smart Rollups.
-It allows users to share large amounts of data in a way that is decentralized and permissionless, because anyone can join the network and post and read data on it.
-
-In this tutorial, you will set up a file archive that stores and retrieves files with the DAL.
-You will learn:
-
-- How data is organized and shared with the DAL and the reveal data channel
-- How to read data from the DAL in a Smart Rollup
-- How to host a DAL node
-- How to publish data and files with the DAL
-
-Because the DAL is not yet available on Tezos Mainnet, this tutorial uses the [Weeklynet test network](https://teztnets.com/weeklynet-about), which runs on a newer version of the protocol that includes the DAL.
-
-See these links for more information about the DAL:
-
-- For technical information about how the DAL works, see [Data Availability Layer](https://tezos.gitlab.io/shell/dal.html) in the Octez documentation.
-- For more information about the approach for the DAL, see [The Rollup Booster: A Data-Availability Layer for Tezos](https://research-development.nomadic-labs.com/data-availability-layer-tezos.html).
-
-## Prerequisites
-
-This article assumes some familiarity with Smart Rollups.
-If you are new to Smart Rollups, see the tutorial [Deploy a Smart Rollup](./smart-rollup).
-
-### Set up a Weeklynet environment and account
-
-Because Weeklynet requires a specific version of the Octez suite, you can't use most wallet applications and installations of the Octez suite with it.
-Instead, you must set up an environment with a specific version of the Octez suite and use it to create and fund an account.
-Note that Weeklynet is reset every Wednesday, so you must recreate your environment and account after the network resets.
-
-The easiest way to do this is to use the Docker image that is generated each time Weeklynet is reset and recreated.
-As another option, you can build the specific version of the Octez suite locally.
-For instructions, see the Weeklynet page at https://teztnets.com/weeklynet-about.
-
-To set up an environment and account in a Docker container, follow these steps:
-
-1. From the [Weeklynet](https://teztnets.com/weeklynet-about) page, find the Docker command to create a container from the correct Docker image, as in this example:
-
- ```bash
- docker run -it --entrypoint=/bin/sh tezos/tezos:master_7f3bfc90_20240116181914
- ```
-
- The image tag in this command changes each time the network is reset.
-
-1. Copy the URL of the public RPC endpoint for Weeklynet, such as `https://rpc.weeklynet-2024-01-17.teztnets.com`.
-This endpoint also changes each time the network is reset.
-
-1. For convenience, you may want to set this endpoint as the value of the `ENDPOINT` environment variable.
-
-1. In the container, initialize the Octez client with that endpoint, such as this example:
-
- ```bash
- octez-client -E https://rpc.weeklynet-2024-01-17.teztnets.com config init
- ```
-
-1. Create an account with the command `octez-client gen keys $MY_ACCOUNT`, where `$MY_ACCOUNT` is an alias for your account.
-
-1. Get the public key hash of the new account by running the command `octez-client show address $MY_ACCOUNT`.
-
-1. From the [Weeklynet](https://teztnets.com/weeklynet-about) page, open the Weeklynet faucet and send some tez to the account.
-
-Now you can use this account to deploy Smart Rollups.
-
-### Install Rust
-
-To run this tutorial, install Rust by running the following command.
-The application in this tutorial uses Rust because of its support for WebAssembly (WASM), the language that Smart Rollups use to communicate.
-Rollups can use any language that has WASM compilation support.
-
-1. Make sure that the `curl` program is installed.
-If you are using the Tezos Docker container, run `sudo apk add curl`.
-
-1. Run this command to install Rust:
-
- ```bash
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- ```
-
-1. Follow the instructions in the Rust installation program.
-For example, it may prompt you to run `source "$HOME/.cargo/env"` to configure your current terminal window to run Rust.
-
-1. Add WASM as a compilation target for Rust by running this command:
-
- ```bash
- rustup target add wasm32-unknown-unknown
- ```
-
- You can see other ways of installing Rust at https://www.rust-lang.org.
-
-### Install Clang
-
-Clang and LLVM are required for compilation to WebAssembly.
-Version 11 or later of Clang is required.
-
-If you are using the Tezos Docker container, run these commands:
-
-```bash
-sudo apk add clang
-export CC=clang
-```
-
-Here are instructions for installing the appropriate tools on different operating systems:
-
-**MacOS**
-
-```bash
-brew install llvm
-export CC="$(brew --prefix llvm)/bin/clang"
-```
-
-**Ubuntu**
-
-```bash
-sudo apt-get install clang-11
-export CC=clang-11
-```
-
-**Fedora**
-
-```bash
-dnf install clang
-export CC=clang
-```
-
-**Arch Linux**
-
-```bash
-pacman -S clang
-export CC=clang
-```
-
-The `export CC` command sets Clang as the default C/C++ compiler.
-
-After you run these commands, run `$CC --version` to verify that you have version 11 or greater installed.
-
-Also, ensure that your version of Clang `wasm32` target with by running the command `$CC -print-targets | grep wasm32` and verifying that the results include `wasm32`.
-
-## Why the DAL?
-
-The DAL has earned the nickname "Rollup Booster" from its ability to address
-the last bottleneck Smart Rollups developers could not overcome without
-sacrificing decentralization: block space. Smart Rollups offload
-*computation* from layer 1, but the transactions that they process still need to
-originate from somewhere.
-
-By default, that "somewhere" is the layer 1 blocks, yet the size of a Tezos
-block is limited to around 500KBytes. In this model, while Smart Rollups do not
-compete for layer 1 gas anymore, they still compete for block space.
-
-{/* Is this info about the reveal data channel needed here? */}
-Additionally, a Smart Rollup can fetch data from an additional source called the
-reveal data channel, which allows them to retrieve arbitrary data.
-The reveal channel is a powerful way to share data, because it allows a Smart Rollup
-operator to post hashes instead of full data files on layer 1. But it is a
-double-edged sword, because nothing enforces the availability of the data in the
-first place. [Solutions exist to address this
-challenge](https://research-development.nomadic-labs.com/introducing-data-availability-committees.html),
-but they are purely off-chain ones, coming with no guarantee from layer 1.
-
-The DAL allows third parties to publish data and have bakers attest that the data is available.
-When enough bakers have attested that the data is available, Smart Rollups can retrieve the data without the need for additional trusted third-parties.
-
-## How the DAL works
-
-In this tutorial, you create a file archive application that allows clients to upload data to the DAL.
-You also create a Smart Rollup that listens to the DAL and responds to that data.
-
-The DAL works like this:
-
-1. Users post data to a DAL node.
-1. The DAL node returns a certificate.
-This certificate includes a commitment that the data is available and a proof of the data.
-1. Users post the certificate to layer 1 via the Octez client, which is much cheaper than posting the complete data.
-1. When the certificate is confirmed in a block, layer 1 splits the data into shards and assigns those shards to bakers, who verify that the data is available.
-1. Bakers verify that the data is available and attest that the data is available in their usual block attestations to layer 1.
-They have a certain number of blocks to do so, known as the _attestation lag_, and if they don't by the end of this period, the certificate is considered bogus and the related data is dropped.
-1. Other DAL nodes get the data from the initial DAL node through the peer-to-peer network.
-1. The Smart Rollup node monitors the blocks and when it sees attested DAL data, it connects to a DAL node to request the data.
-1. The Smart Rollup node stores the data in its durable storage, addressed by its hash.
-Smart Rollups must store the data because it is available on the DAL for only a short time.
-1. Users who know the hash of the data can download it from the Smart Rollup node.
-
-The overall workflow is summarized in the following figure:
-
-
-
-There are many steps in the DAL process, but the most complicated parts (storing and sharing data) are handled automatically by the various daemons in the Octez suite.
-
-:::note
-When you install a Smart Rollup, you provide only the installer kernel on layer 1 and the full kernel via the reveal data channel.
-Currently, you cannot send the full kernel data over the Data Availability Layer, so this tutorial relies on the reveal data channel to install the kernel as usual.
-:::
-
-When your environment is ready, get started by going to [Part 1: Getting the DAL parameters](./build-files-archive-with-dal/get-dal-params).
diff --git a/docs/tutorials/build-files-archive-with-dal/get-dal-params.mdx b/docs/tutorials/build-files-archive-with-dal/get-dal-params.md
similarity index 85%
rename from docs/tutorials/build-files-archive-with-dal/get-dal-params.mdx
rename to docs/tutorials/build-files-archive-with-dal/get-dal-params.md
index de213e118..1ba332ea7 100644
--- a/docs/tutorials/build-files-archive-with-dal/get-dal-params.mdx
+++ b/docs/tutorials/build-files-archive-with-dal/get-dal-params.md
@@ -1,21 +1,21 @@
---
-title: "Part 1: Getting the DAL parameters"
+title: "Part 2: Getting the DAL parameters"
authors: 'Tezos Core Developers'
last_update:
- date: 17 January 2024
+ date: 9 February 2024
---
-import LucidDiagram from '@site/src/components/LucidDiagram';
-
The Data Availability Layer stores information about the available data in layer 1 blocks.
Each block has several byte-vectors called _slots_, each with a maximum size.
-DAL users can add information about the available data as _pages_ in these slots, as shown in this figure:
+DAL users can add information about the available data as a _commitment_ in a slot.
+These commitments refer to the data that is stored on the DAL, which stores the data in _pages_ as shown in this diagram:
-
+![Two example blocks with different DAL slots in use in each](/img/architecture/dal-slots-in-blocks.png)
+
-The data in a slot is broken into pages to ensure that each piece of data can fit in a single Tezos operation.
+The data is broken into pages to ensure that each piece of data can fit in a single Tezos operation.
This data must fit in a single operation to allow the Smart Rollup refutation game to work, in which every execution step of the Smart Rollup must be provable to layer 1.
-{/* TODO link to Smart Rollup topic for more info on the refutation game */}
+For more information about Smart Rollups, see [Smart Rollups](../../architecture/smart-rollups).
When clients add data, they must specify which slot to add it to.
Note that because the DAL is permissionless, clients may try to add data to the same slot in the same block.
@@ -31,7 +31,7 @@ In these steps, you set up a simple Smart Rollup to get the current DAL paramete
## Prerequisites
-Before you begin, make sure that you have installed the prerequisites and set up an environment and an account as described in [Implement a file archive with the DAL and a Smart Rollup](../build-files-archive-with-dal).
+Before you begin, make sure that you have installed the prerequisites and set up an environment and an account as described in [Part 1: Setting up an environment](./set-up-environment).
## Fetching the DAL parameters in a kernel
@@ -143,8 +143,7 @@ These parameters are:
## Setting up a deployment script
In later parts of this tutorial, you will update and redeploy the Smart Rollup multiple times.
-To simplify the process, you can use this script.
-To use it, pass the alias of your account in the Octez client:
+To simplify the process, you can use this script:
```bash
#!/usr/bin/bash
@@ -171,6 +170,13 @@ octez-smart-rollup-node --endpoint ${ENDPOINT} \
--dal-node http://localhost:10732 --log-kernel-debug
```
+To use it, save it in a file with an `sh` extension, such as `deploy_smart_rollup.sh` and give it executable permission.
+Then you can run it any tme you update the `lib.rs` or `Cargo.toml` files to deploy a new Smart Rollup by passing your account alias, as in this example:
+
+```bash
+./deploy_smart_rollup.sh $MY_ACCOUNT
+```
+
If you run this script and see an error that says that the file was not found, update the first line of the script (the shebang) to the path to your shell interpreter.
For example, if you are using the Tezos Docker image, the path is `/bin/sh`.
diff --git a/docs/tutorials/build-files-archive-with-dal/get-slot-info.mdx b/docs/tutorials/build-files-archive-with-dal/get-slot-info.md
similarity index 84%
rename from docs/tutorials/build-files-archive-with-dal/get-slot-info.mdx
rename to docs/tutorials/build-files-archive-with-dal/get-slot-info.md
index ca868b3de..3b516ccbd 100644
--- a/docs/tutorials/build-files-archive-with-dal/get-slot-info.mdx
+++ b/docs/tutorials/build-files-archive-with-dal/get-slot-info.md
@@ -2,7 +2,7 @@
title: "Part 2: Getting slot information"
authors: 'Tezos Core Developers'
last_update:
- date: 26 January 2024
+ date: 7 February 2024
---
When clients send data to the DAL, they must choose which slot to put it in.
@@ -33,6 +33,8 @@ octez-dal-node run --endpoint ${ENDPOINT} \
--producer-profiles=0 --data-dir _dal_node
```
+Leave this process running in terminal window.
+
## Accessing the slot data from a Smart Rollup
Follow these steps to update the Smart Rollup to access information about slot 0:
@@ -82,7 +84,7 @@ Follow these steps to update the Smart Rollup to access information about slot 0
let param = host.reveal_dal_parameters();
debug_msg!(host, "{:?}\n", param);
- match run(host, ¶m, slot_to_monitor) {
+ match run(host, ¶m, SLOT_TO_MONITOR) {
Ok(()) => debug_msg!(host, "See you in the next level\n"),
Err(_) => debug_msg!(host, "Something went wrong for some reasons"),
}
@@ -112,8 +114,31 @@ Follow these steps to update the Smart Rollup to access information about slot 0
tezos-smart-rollup-host = { version = "0.2.2", features = [ "proto-alpha" ] }
```
+1. Stop the Smart Rollup process.
+
1. Run the commands to build and deploy the Smart Rollup and start the node.
-You can use the script in [Part 1: Getting the DAL parameters](./get-dal-params) to simplify the process.
+
+
+ If you set up the deployment script as described in [Part 2: Getting the DAL parameters](./get-dal-params), you can run `./deploy_smart_rollup.sh $MY_ACCOUNT`.
+
+ If not, run these commands, using your account alias for `MY_ACCOUNT`:
+
+ ```bash
+ rm -rf _rollup_node
+ cargo build --release --target wasm32-unknown-unknown
+ cp target/wasm32-unknown-unknown/release/files_archive.wasm .
+
+ smart-rollup-installer get-reveal-installer -P _rollup_node/wasm_2_0_0 \
+ -u files_archive.wasm -o installer.hex
+
+ octez-client --endpoint ${ENDPOINT} \
+ originate smart rollup files_archive from "${MY_ACCOUNT}" of kind wasm_2_0_0 \
+ of type unit with kernel "$(cat installer.hex)" --burn-cap 2.0 --force
+
+ octez-smart-rollup-node --endpoint ${ENDPOINT} \
+ run observer for files_archive with operators --data-dir _rollup_node \
+ --dal-node http://localhost:10732 --log-kernel-debug
+ ```
1. In another terminal window, view the log with the command `tail -F _rollup_node/kernel.log`.
diff --git a/docs/tutorials/build-files-archive-with-dal/publishing-on-the-dal.mdx b/docs/tutorials/build-files-archive-with-dal/publishing-on-the-dal.md
similarity index 68%
rename from docs/tutorials/build-files-archive-with-dal/publishing-on-the-dal.mdx
rename to docs/tutorials/build-files-archive-with-dal/publishing-on-the-dal.md
index 06d33eb78..79615cbeb 100644
--- a/docs/tutorials/build-files-archive-with-dal/publishing-on-the-dal.mdx
+++ b/docs/tutorials/build-files-archive-with-dal/publishing-on-the-dal.md
@@ -12,6 +12,7 @@ Before trying to run the code yourself, look at [Explorus](https://explorus.io/d
:::
The examples in this tutorial use slot 10.
+Throughout the rest of this tutorial, replace slot 10 with the number of the slot that you choose.
## Switching slots
@@ -38,7 +39,7 @@ For example, this command uses slot 10:
```
1. Run the commands to build and deploy the Smart Rollup and start the node.
-You can use the script in [Part 1: Getting the DAL parameters](./get-dal-params) to simplify the process.
+You can use the script in [Part 2: Getting the DAL parameters](./get-dal-params) to simplify the process.
## Publishing messages
@@ -63,7 +64,7 @@ The DAL node provides an RPC endpoint for clients to send data to be added to a
Note that the value of the message is in double quotes because it must be a valid JSON string, as hinted by the `Content-Type` header.
-1. Using the values of the commitment and proof from the previous command, post the certificate to layer 1 with this command:
+1. Using the values of the commitment and proof from the previous command, post the certificate to layer 1 with this command, being sure to set the slot number that you are using:
```bash
commitment="sh1u3tr3YKPDYUp2wWKCfmV5KZb82FREhv8GtDeR3EJccsBerWGwJYKufsDNH8rk4XqGrXdooZ"
@@ -73,20 +74,53 @@ The DAL node provides an RPC endpoint for clients to send data to be added to a
with proof "${proof}"
```
+ If the Octez client successfully published the commitment, the response to the command shows the slot number and the block (level) that it was published in.
+ For example, this response shows that the commitment is in level 8455 in slot 10:
+
+ ```
+ Data availability slot header publishing:
+ Slot: slot_index: 13, commitment: sh1u3tr3YKPDYUp2wWKCfmV5KZb82FREhv8GtDeR3EJccsBerWGwJYKufsDNH8rk4XqGrXdooZ
+ This data availability slot header publishing was successfully applied
+ id:(published_level: 8455, index: 10), commitment: sh1u3tr3YKPDYUp2wWKCfmV5KZb82FREhv8GtDeR3EJccsBerWGwJYKufsDNH8rk4XqGrXdooZ
+ Consumed gas: 1331.033
+ ```
+
After 4 blocks, you should see a message in the kernel log that looks like this:
```
RollupDalParameters { number_of_slots: 32, attestation_lag: 4, slot_size: 65536, page_size: 4096 }
- Attested slot at index 10 for level 57293: [72, 101, 108, 108, 111, 44, 32, 119, 111, 114]
+ Attested slot at index 10 for level 8455: [72, 101, 108, 108, 111, 44, 32, 119, 111, 114]
See you in the next level
```
You can verify your message by converting the bytes in the message back to the first 10 characters of the string "Hello, World!"
- If you see a message that says "A slot header for this slot was already proposed," another transaction tried to write to that slot in the same block, so you must try again.
+## Troubleshooting
+
+If you don't see the message that the slot is attested and contains your data, try these things:
+
+- If you see a message that says "A slot header for this slot was already proposed," another transaction tried to write to that slot in the same block, so you must try again.
+
+- Make sure that the Smart Rollup and the DAL node are both using the slot that you published the commitment to:
+
+ - In the file `lib/src.rs`, the line `const SLOT_TO_MONITOR: u8 = 13;` should use your slot.
+ - When you run the command to start the DAL node, make sure that the `--producer-profiles` argument is set to your slot:
+
+ ```bash
+ octez-dal-node run --endpoint ${ENDPOINT} \
+ --producer-profiles=10 --data-dir _dal_node
+ ```
+ - When you run the command to publish the commitment to the DAL, make sure that you publish it to your slot:
+
+ ```bash
+ octez-client --endpoint ${ENDPOINT} \
+ publish dal commitment "${commitment}" from ${MY_ACCOUNT} for slot 10 \
+ with proof "${proof}"
+ ```
- If you don't see information about the attested slot, check the page at https://explorus.io/dal.
- If that page shows red (unattested) slots, it's possible that the attesters for the network are offline.
+- Check the page at https://explorus.io/dal.
+ If that page shows red (unattested) slots, it's possible that the attesters for the network are offline.
+ You can also see the level that your commitment was published to in the result of the `octez-client publish dal commitment` command and check its status on https://explorus.io/dal.
## Publishing files
diff --git a/docs/tutorials/build-files-archive-with-dal/set-up-environment.md b/docs/tutorials/build-files-archive-with-dal/set-up-environment.md
new file mode 100644
index 000000000..9f469160b
--- /dev/null
+++ b/docs/tutorials/build-files-archive-with-dal/set-up-environment.md
@@ -0,0 +1,133 @@
+---
+title: "Part 1: Setting up an environment"
+authors: 'Tim McMackin'
+last_update:
+ date: 9 February 2024
+---
+
+Because Weeklynet requires a specific version of the Octez suite, you can't use most wallet applications and installations of the Octez suite with it.
+Instead, you must set up an environment with a specific version of the Octez suite and use it to create and fund an account.
+
+:::note Weeklynet resets every week
+Weeklynet is reset every Wednesday, which deletes all accounts, smart contracts, and Smart Rollups.
+Therefore, you must recreate your environment and account and redeploy your smart Contracts and Smart Rollups after the network resets.
+:::
+
+## Set up a Weeklynet environment and account
+
+The easiest way to use Weeklynet is to use the Docker image that is generated each time Weeklynet is reset and recreated.
+As another option, you can build the specific version of the Octez suite locally.
+For instructions, see the Weeklynet page at https://teztnets.com/weeklynet-about.
+
+To set up an environment and account in a Docker container, follow these steps:
+
+1. From the [Weeklynet](https://teztnets.com/weeklynet-about) page, find the Docker command to create a container from the correct Docker image, as in this example:
+
+ ```bash
+ docker run -it --entrypoint=/bin/sh tezos/tezos:master_7f3bfc90_20240116181914
+ ```
+
+ The image tag in this command changes each time the network is reset.
+
+1. Copy the URL of the public RPC endpoint for Weeklynet, such as `https://rpc.weeklynet-2024-01-17.teztnets.com`.
+This endpoint also changes each time the network is reset.
+
+1. For convenience, you may want to set this endpoint as the value of the `ENDPOINT` environment variable.
+The parts of the Octez suite don't use this environment variable directly, but you can save time by using this variable in commands.
+
+1. In the container, initialize the Octez client with that endpoint, such as this example:
+
+ ```bash
+ octez-client -E https://rpc.weeklynet-2024-01-17.teztnets.com config init
+ ```
+
+ or:
+
+ ```bash
+ octez-client -E $ENDPOINT config init
+ ```
+
+1. Create an account with the command `octez-client gen keys $MY_ACCOUNT`, where `$MY_ACCOUNT` is an alias for your account.
+
+1. Get the public key hash of the new account by running the command `octez-client show address $MY_ACCOUNT`.
+
+1. From the [Weeklynet](https://teztnets.com/weeklynet-about) page, open the Weeklynet faucet and send some tez to the account.
+50 tez is enough to get started, and you can always go back to the faucet to get more.
+
+Now you can use this account to deploy Smart Rollups.
+
+## Install Rust
+
+To run this tutorial, install Rust in the environment by running the following command.
+The application in this tutorial uses Rust because of its support for WebAssembly (WASM), the language that Smart Rollups use to communicate.
+Rollups can use any language that has WASM compilation support.
+
+1. Make sure that the `curl` program is installed.
+If you are using the Tezos Docker container, run `sudo apk add curl`.
+
+1. Run this command to install Rust:
+
+ ```bash
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+ ```
+
+1. Follow the instructions in the Rust installation program.
+For example, it may prompt you to run `source "$HOME/.cargo/env"` to configure your current terminal window to run Rust.
+
+1. Add WASM as a compilation target for Rust by running this command:
+
+ ```bash
+ rustup target add wasm32-unknown-unknown
+ ```
+
+ You can see other ways of installing Rust at https://www.rust-lang.org.
+
+## Install Clang
+
+Clang and LLVM are required for compilation to WebAssembly.
+Version 11 or later of Clang is required.
+
+If you are using the Tezos Docker container, run these commands:
+
+```bash
+sudo apk add clang
+export CC=clang
+```
+
+Here are instructions for installing the appropriate tools on different operating systems:
+
+**MacOS**
+
+```bash
+brew install llvm
+export CC="$(brew --prefix llvm)/bin/clang"
+```
+
+**Ubuntu**
+
+```bash
+sudo apt-get install clang-11
+export CC=clang-11
+```
+
+**Fedora**
+
+```bash
+dnf install clang
+export CC=clang
+```
+
+**Arch Linux**
+
+```bash
+pacman -S clang
+export CC=clang
+```
+
+The `export CC` command sets Clang as the default C/C++ compiler.
+
+After you run these commands, run `$CC --version` to verify that you have version 11 or greater installed.
+
+Also, ensure that your version of Clang `wasm32` target with by running the command `$CC -print-targets | grep wasm32` and verifying that the results include `wasm32`.
+
+When your environment is ready, continue to [Part 2: Getting the DAL parameters](./get-dal-params).
diff --git a/docs/tutorials/build-files-archive-with-dal/using-full-slot.mdx b/docs/tutorials/build-files-archive-with-dal/using-full-slot.md
similarity index 100%
rename from docs/tutorials/build-files-archive-with-dal/using-full-slot.mdx
rename to docs/tutorials/build-files-archive-with-dal/using-full-slot.md
diff --git a/sidebars.js b/sidebars.js
index 167b03130..a1be58b71 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -387,6 +387,7 @@ const sidebars = {
id: 'tutorials/build-files-archive-with-dal',
},
items: [
+ 'tutorials/build-files-archive-with-dal/set-up-environment',
'tutorials/build-files-archive-with-dal/get-dal-params',
'tutorials/build-files-archive-with-dal/get-slot-info',
'tutorials/build-files-archive-with-dal/publishing-on-the-dal',
diff --git a/static/img/architecture/dal-slots-in-blocks.png b/static/img/architecture/dal-slots-in-blocks.png
new file mode 100644
index 000000000..c33031cae
Binary files /dev/null and b/static/img/architecture/dal-slots-in-blocks.png differ
diff --git a/static/img/architecture/dal-workflow.png b/static/img/architecture/dal-workflow.png
new file mode 100644
index 000000000..5c15d6c3b
Binary files /dev/null and b/static/img/architecture/dal-workflow.png differ
diff --git a/static/img/tutorials/dal-file-tutorial-setup.png b/static/img/tutorials/dal-file-tutorial-setup.png
new file mode 100644
index 000000000..abc2df7a4
Binary files /dev/null and b/static/img/tutorials/dal-file-tutorial-setup.png differ