Part 1: Getting the DAL parameters
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:
The data in a slot 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. For more information about the refutation game, see 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. In this case, the first operation in the block takes precedence, which leaves the baker that creates the block in control of which data makes it into the block. Other operations that try to add data to the same slot fail.
The number and size of these slots can change. Different networks can have different DAL parameters. Future changes to the protocol may allow the DAL to resize dynamically based on usage.
Therefore, clients must get information about the DAL before sending data to it. In these steps, you set up a simple Smart Rollup to get the current DAL parameters and print them to the log.
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.