Running your own local rollup on Astra

--

What is Astria?
Astria is a shared sequencer network, allowing you to easily deploy decentralized rollups. These rollups will be able to share a single decentralized network of sequencers — simple and permissionless. All transaction data is stored on the base layer, and rollups own their execution and state.

Astria has investors in the likes of Maven 11, Lemniscap, Figment Capital, Robot Ventures and Breed.

Two ways how this guide will benefit you.
— You will gain a general knowledge in setting up your own rollup. Your own rollup will help you understand the importance of modular technology. This will make you able to make sensible investment decisions in Celestia, Dymension, Neutron, Hyperlane and upcoming modular chains.
Airdrop opportunity. If you followed my M6 labs post on Celestia airdrop criteria, with an afternoon of work of setting up your own node, you would have currently netted over $15k.
Since Astria is working closely with Celestia, opportunities like this are likely to be repeated.

This guide will be exploring the original guide: ‘https://docs.astria.org/docs/local-rollup/introduction/’. However, the guide you are reading now is written in a way for someone who is not that experienced in development, Ubuntu, VMware and rollups.

1/3 Setting up your environment
Set up a virtual Ubuntu machine with VMware Workstation.
https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html. The player version is free. You don’t need the pro version for this.

Download an Ubuntu image and use this to set up your Ubuntu environment.
https://ubuntu.com/tutorials/install-ubuntu-desktop#2-download-an-ubuntu-image

CAREFUL: When setting up the machine, set your disk size to at least 35GB. The memory settings can be anywhere from 4k to 6k.

Keep the setup simple.


As with every clean Ubuntu machine, start off with: Sudo apt-get update & sudo apt-get upgrade. Reboot the system. These three steps can take up to 15 minutes. Optionally, you can make a snapshot or a clone in its current state.

2/3 Setting up your environment
1. Start by installing GIT, Linux’ most popular version control system:
Copy: sudo apt install git

2. Add Astria’s dev cluster:
Copy: git clone — branch dusk-3 https://github.com/astriaorg/dev-cluster.git

3. CHECK

Copy: ls

“dev-cluster” should now be visible.

4.Copy: sudo snap install curl

5: Next up is Curl, which is a command-line utility for downloading or uploading data from or to a server:
Copy: curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.3.1/astria-cli-x86_64-unknown-linux-gnu.tar.gz > astria-cli.tar.gz

Copy: tar -xvzf astria-cli.tar.gz

3/3 Setting up your environment


Now, before we can deploy the rollup, we will need a mandatory list of softwares:

Docker
Commands 1
Copy: sudo apt-get update
Copy: sudo apt-get install ca-certificates curl
Copy: sudo install -m 0755 -d /etc/apt/keyrings
Copy: sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
Copy: sudo chmod a+r /etc/apt/keyrings/docker.asc

Commands 2
Copy: echo \

“deb [arch=$(dpkg — print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \

$(. /etc/os-release && echo “$VERSION_CODENAME”) stable” | \

sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Copy: sudo apt-get update

Copy: sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

CHECK:
Copy: sudo docker run hello-world

KubectL
Commands:
Copy: curl -LO https://dl.k8s.io/release/v1.29.2/bin/linux/amd64/kubectl

Copy: curl -LO “https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"

Copy: echo “$(cat kubectl.sha256) kubectl” | sha256sum –check
(it should show you an ‘kubectl: OK’)

Copy: sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Copy: kubectl version –-client
(it should show you the client version)

Helm
Copy: curl https://baltocdn.com/helm/signing.asc | gpg — dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null

Copy: sudo apt-get install apt-transport-https

Copy: echo “deb [arch=$(dpkg — print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main” | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list

Copy: sudo apt-get update
Copy: sudo apt-get install helm

Kind
Copy: [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

Just
Copy: bash -ci “$(wget -qO — ‘https://shlink.makedeb.org/install’)”
Type: makedev
Copy: git clone https://mpr.makedeb.org/just
Copy: cd just
Copy: makedeb -si
Copy: cd

Faucet
Copy: sudo docker pull ghcr.io/foundry-rs/foundry:latest

Cluster
Copy:
cd dev-cluster
Copy: sudo just create-cluster
Copy: sudo just deploy-ingress-controller

Foundry
Copy: curl -L https://foundry.paradigm.xyz | bash
Copy: sudo reboot
Copy: foundryup


DONE! You now have a machine capable of running your own rollup.
This is another moment where it is possible to create a snapshot or clone of your machine.

Creating your account
Copy: cast wallet new

Write down your genesis address key and your genesis private key

Export your private key with the command:
Copy and replace: export ROLLUP_FAUCET_PRIV_KEY=<GENESIS_PRIVATE_KEY>

Copy and replace:
export ROLLUP_GENESIS_ACCOUNTS=<GENESIS_ADDRESS>:100000000000000000000

You are now rich in internet money.

With your account created, you can create the configuration for your rollup:
Copy and replace <>: export ROLLUP_NAME=<YOUR_ROLLUP_NAME>
Copy and replace <>: export ROLLUP_NETWORK_ID=<YOUR_NETWORK_ID>

In my test rollup, I created the name ‘willemalexander’ with network ID astriaholland. You can choose anything lowercase alphanumeric, just make it random enough so the chain ID is not yet claimed.

Run the config create command. (If astria-cli isn’t found, try adding the path, see screenshot)
Copy and replace: astria-cli rollup config create — rollup.name willemalexander

Copy and replace: export ROLLUP_CONF_FILE=$willemalexander-rollup-conf.yaml

CHECK:
Copy and replace: cat $willemalexander-rollup-conf.yaml

Creating your sequencer account
With your account active, the last thing you will need is a sequencer account. This will give your rollup the power to submit transactions. Start with the command:
Copy: astria-cli sequencer account create

Export your sequencer private key with the command:
Copy and replace: export SEQUENCER_PRIV_KEY=<USE THE PRIVATE KEY YOU JUST GOT>
Copy and replace: export SEQUENCER_ACCOUNT_ADDRESS=<USE THE ADDRESS YOU JUST GOT>

Fund your sequencer with test funds on https://faucet.sequencer.dusk-3.devnet.astria.org/

Enter the address of your sequencer account.

CHECK:
Copy: astria-cli sequencer account balance <USE YOUR SEQUENCER ADDRESS>

Copy and replace:
/home/slaaf/astria-cli rollup deployment create \
— config /home/slaaf/willemalexander-rollup-conf.yaml \
— faucet-private-key <ENTER YOUR FAUCET PRIVATE KEY> \
— sequencer-private-key <ENTER YOUR SEQUENCER PRIVATE KEY>


See the magic by enter the command: kubectl get pods -n astria-dev-cluster -w


Interact with your roll up:
Copy and replace: export ETH_RPC_URL=http://executor.willemalexander.localdev.me/
Copy: cast block 0
Copy and replace: export REC_ADDR=<USE ANY ADDRESS HERE>
Copy: cast balance $REC_ADDR
Copy and replace: cast send $REC_ADDR — value 10000000000000000000 — private-key <USE THE PRIVATE KEY OF YOUR FAUCET HERE>
Copy and replace: cast balance $REC_ADDR

Thanks for following this guide on creating your own rollup through Astria. If you have any questions, or a stuck on something, don’t hesitate to hit me up on X or Discord.

--

--

₿od - Tuller's tavern of thought-out threads🐈

I write for M6 labs. Need meat, sun and books to be happy. Follow me on Twitter @nobodyofcrypto for fun talks :-)