Bringing Madara support to Avail's Clash of Nodes

In 2024, rollups have already established themselves as the quintessential scaling solution for Ethereum. However, primitive methods such as posting data on L1 can account for up to 95% of the average transaction cost. Solving this issue of scalable data availability is key to building scalable rollups and user experiences.

EIP 4844 proposes to resolve this by introducing blob transactions and reducing costs for DA on Ethereum itself. While 4844 is promising, given Ethereum's scale and tech debt, we can be sure that a full-blown 4844 solution won’t happen anytime soon. We have proto-dank sharding, which is expected to reach mainnet this year; however, this would only be a half-baked solution in preparation for the actual 4844.

As a result, we have alternate solutions like Avail, which aim to bring data availability to rollups cheaper and much faster. Avail approaches the challenges of being an efficient, available and powerful DA solution by emphasising security and integrity.

To ensure security, Avail builds on the resilient design choices it inherits from the Polkadot SDK, closely following the paradigms that govern liveness (fault tolerance and progress guarantee) and finality (immutability) on the L1 chain.

Further, Avail employs KZG commitments to maintain data integrity, ensuring reduced memory, bandwidth, and storage footprints while ensuring proofs retain succinctness. Moreover, by using light clients for sampling, Avail also achieves flexibility to scale block sizes dynamically.

Avail is very close to launching its mainnet and has its incentivised testnet underway. We are very happy to announce our “Clash of Nodes” campaign with Avail for the same!

Participating in Clash of Nodes

Users must run a Madara app chain that uses Avail as a DA layer to participate in the Clash of Nodes campaign. While launching a Madara node can be difficult, we have streamlined the process to as simple as a few commands with our new CLI tool over here.

Playing around with Madara and Avail

Once your node is up and running locally, you can start playing around with it, deploy your contracts and make your first app chain MVP! Madara is completely compatible with all Starknet tools like ArgentX, Braavos, starknet.js, etc. So, using Madara should be as simple as using Starknet itself. If you face any issues, feel free to report them here. We also have a live bug bounty program running.

Deploying your chain

Once you have tested your chain and contracts locally, it’s time to go live 🚀. We’ve two options available for you here.

  1. Use Karnot

    Choosing Karnot as your RaaS provider abstracts the nitty-gritty of managing infrastructure, deployments, and configurations, allowing you to build and deploy seamlessly as we host your chain and explorer. With Avail incentivising early movers, quick adopters stand to have their app chain infrastructure costs paid by the Avail team. So, if you would like to proceed with this option, please fill out this form, and we will take it from there.

  2. Host it yourself

    For seasoned developers who prefer to control their infrastructure, Madara CLI allows you to run your own chain. To do this, you need to follow these steps.

    1. Use the Madara CLI to start your chain on a server. You would need to expose ports 9944 (RPC), 9615 (Prometheus) and 4000 (Explorer) so that they’re accessible to us. This is a good article on how to deploy a backend on AWS EC2.

    2. By default, the Karnot CLI uses 0 as the Avail app_id. However, for this campaign, you must register a unique app_id for your app. Read the appendix on how to do the same.

    3. Once you have an app_id registered, edit the file ~/.madara/app-chains/<app_chain_name>/da-config.json to replace the 0 app_id with your new app_id. Once your chain is live, make sure your endpoints are publicly accessible. If you like, you can also use a custom domain, but that’s not necessary.

    4. Now that your endpoints are working deploy your contracts on the chain and prepare them for your specific use case.

    5. Finally, follow the instructions on the repo here to get listed on the “Clash of Nodes” campaign.

Appendix

Registering an App Id on Avail

  1. Go to https://goldberg.avail.tools/#/accounts and create an account on Avail. Keep the seed phrase safe.

  2. Get funds on this new account using the Avail faucet.

  3. Clone this repo.

  4. cd avail-js/examples/node-examples/

  5. npm i

  6. Edit the config.ts file.

    1. Edit the “seed” to the seed phrase you got in step (1).

    2. Edit the endpoint to “wss://goldberg.avail.tools:443/ws

  7. Edit the src/create-app-id.ts file

    1. Change appName on line 14 to something unique for your app.

    2. Comment out line 26 (process.exit(0)). Without this, the app will exit before submitting your transaction to Avail. This should be fixed in the next release by Avail.

  8. npm run create-app-id

  9. You would see a log like the one below. 164 will be your app_id.
    dataAvailability.ApplicationKeyCreated:: ["0x546573742061707020617364736164736164616461206173646173646173","5Ci3f87otQeRC2y5gitVvbsez6EwCinhJwaK78MU2fCjv6Q5",164]

Subscribe to Samrendra
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.
Author Address
0x3b1bdcB0A8C9E72…aBAcaB09e50B7cd
Content Digest
2RuPLezec53JeAV…9vJNW4QldHujOAs