AppIds on Avail DA?
DON’T CARE ABOUT THEORY?
If you are just looking for the easiest way to create your own AppID on Avail to continue building,
you can skip to this page.
LOOKING FOR PROGRAMMATIC INSTRUCTIONS?
You can check out our API reference for the same.
Introduction
As a general-purpose base layer, Avail is designed to support many modular chains at the same time, providing consensus and data availability to all of them simultaneously.
How does this work? Avail headers contain an index that allows a given modular chain (or “application” in Avail terminology) to determine and download only the sections of a block that have data for that particular application.
This has significant benefits, including:
-
Modular applications are mainly unaffected by other uses of the base layer at the same time.
-
Block sizes can increase without requiring applications to fetch more data because they don’t need to fetch the whole block, only what’s relevant to them.
This filtering is done using the “application id” (AppId).
Data availability sampling is still done on the entire block, however—this is the process where clients sample tiny parts of the block at random to verify availability.
Consider a random block on Avail DA
It might contain data blobs from a variety of different rollups pertaining to their different execution environments.
Think of the EVM, the SVM, Stackr, ZKsync chains, OP stack, and many more.
If all of this data is randomnly strewn about in a block, it would be tedious for an a rollup to parse through all of it
just to fetch the data it needs.

Now think of the same data neatly arranged into its own sections
But what if all of that same data in the same block was organised into different sections,
stored alongside it’s peers. Each of these ‘sections’ would be identified by an AppID.
A developer now does not need to parse through the entire block to find the data they need, they can simply query data from the AppID they are interested in.

These ‘sections’ are flexible
All of the rollups running on Avail DA probably won’t submit data in all of the blocks. Thus, it is likely some AppIDs will be empty in some blocks.
On the flipside, some rollups might need to submit more data than usual in a particular block.
None of this is an issue on Avail DA, the individual block builds as needed in the moment.

Tell me more
Let’s learn more about AppIds by going through a real-life example.
-
We recommend you go through the whole page before trying to go through the same steps.
-
Although there are multiple ways to retrieve existing AppIds and generate new ones, using the Avail DA explorer to do so is a good way to start.
-
The Avail DA explorer is very powerful and can be used in a variety of ways. For now though, let’s stick to
AppIds.
-
Make sure you’re on the
chain statesection of the explorer. You can access it by simply clicking this link , or by navigating to it through thedevelopertab near the top right. -
Make sure you’ve selected the
dataAvailabilitypallet and theappKeysmethod.

- Uncheck the
include optiontoggle, and click on the+button next to the method name. You will fetch a list of all registeredAppIdson Avail DA.

Each appID consists of 3 fields:
key: This is a string that is the name of theappID. EachappIDshould have a unique name.owner: This is the address of the account that created theappID. A single address can create multipleAppIds.id: This is the unique integer index of theappID. It is incremented by 1 everytime a newappIDis created. Whenever a newappIDis created, it is automatically assigned the next availableid.
- Next, check the
include optiontoggle, and enterbased availas thebytesinput. Call the function. What do you see? You will be returned a pair ofownerandid, which together with thekeyyou entered, form a uniqueappID.

- The
appKeysmethod is essentially a mapping that returns theownerandidof anappIDgiven itskey(key=> (owner,id)). - By checking the
include optiontoggle, you are essentially filtering the output.
How to check the next available appID?
Anyone can create their own appID on Avail DA. The process is entirely democratic, and it’s rather simple too.
Let us first check out the next available appID on the network.
-
Within the
dataAvailabilitypallet, select thenextAppIdmethod. No need to pass any params, just click the+button next to the method name. -
You will be returned the next available
index/idfor a newappID.

How to register my own appID?
-
Make sure you have one or more Avail DA wallets connected to the explorer. If you don’t know how to do so, you can follow our docs on setting up a new wallet.
-
Simply click this link OR navigate to the
extrinsicssection of the explorer through thedevelopertab.
Please note that the Developer tab does not show the extrinsics section at all if you don’t
have a wallet set up on the explorer or an extension wallet connected to it.
So make sure you have an Avail DA wallet set up before moving forward.
- Select the
dataAvailabilitypallet, and thecreateApplicationKeymethod.

-
Enter a
keyfor yourappID. It can be anything you like, really. -
This is how it should look like in the end:

- Click on
Submit Transaction, and then click onSign and Submitin the box that pops up.

DO NOT CHANGE THE appID FOR THIS TRANSACTION
- Each and every single transaction on Avail DA has an
appIDassociated with it, which is greater than or equal to0. - A transaction or data submission with the
appIDof0is used for chain-level operations. - This is what we need to use for creating a new
appID, since the act of creating a newappIDhas nothing to do with a specific ‘app’ on Avail DA. - This field would instead have been a positive integer if we, for example, were submitting data to a specific application on Avail DA.
-
Authorize the transaction through your wallet, and you’re done! You’ve successfully created your own
appIDon Avail DA. -
You can verify
7by using the steps covered earlier to query theappKeysmethod :)
How to submit data to my appID?
You can submit data to your, or any other appID on Avail DA using the explorer by calling the
submitData extrinsic from within the dataAvailability pallet.
-
Make sure you have one or more Avail DA wallets connected to the explorer. If you don’t know how to do so, you can follow our docs on setting up a new wallet.
-
Simply click this link OR navigate to the
extrinsicssection of the explorer through thedevelopertab. -
Select the
dataAvailabilitypallet, and thesubmitDatamethod.

- Enter a random
datastring that you want to submit to yourappID, and then click onSubmit Transaction.

- Fill in the
AppIDthat you want to submit the data to. Click onSign and Submitto authorize the transaction through your wallet.

- Wait for the transaction to be included in a block and then open the detailed view of the block.

- Click on your specific transaction to see it’s details. This is what it should look like:

A few more things of note
-
As stated earlier, the
keyandidfields of everyappIDare unique. This means if you try to create anappIDwith the samekeyas an existing one, the operation will fail. This is why it makes sense to use theappKeysmethod to check if your desired name is already taken. -
If you’re a developer and are looking for more programmatic instructions, you can check out our API reference.
-
Anyone can submit any sort of data to any
appIDregardless of whether or not they created it.
But what does this mean? And is this an attack vector?
- This is where it is important to understand that Avail DA is a DA layer, not an execution environment. We are not concerned with the validity of the data being submitted, only with its availability, which means we can support a wide variety of applications across multiple tech stacks.
- This does not constitute an attack vector since that any app or execution layer building on top of Avail DA can always set up certain rules to filter out unwanted data submissions.
- They could for example make it so that only data submitted with a particular signature, i.e. from a particular address, is accepted.
All other data submitted to the particular
appIDis treated as spam, and ignored.