The "Madara x Karnot Appchain Challenge" is a part of the Clash of Nodes Incentivized Testnet which people earn points in the leaderboard and I think it will exchange with real $AVL at mainnet launch🪂
In this task we just deploy a Madara appchain using Avail as the data availability (DA) layer and submit a github PR to get into the clash of nodes leaderboard
Chain usage and user engagement of your Appchain earns you Avail POINTS which we will discuss about it in the last part
Follow my Twitter 🧡
CPU = 4
Ram = 8
SSD = 160
sudo apt-get install git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
sudo apt-get update && sudo apt-get install ca-certificates curl gnupg && sudo install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo apt update && sudo apt upgrade -y && sudo apt install build-essential && sudo apt install pkg-config && sudo apt install libssl-dev && sudo apt install clang && sudo apt install protobuf-compiler
Press Y
git clone https://github.com/karnotxyz/madara-cli
cd madara-cli
cargo build --release
./target/release/madara init
Press Enter and choose a name and Avail as DA
• https://goldberg.avail.tools/#/accounts
• https://discord.com/invite/availproject
Connect your MM wallet and verify your Gitcoin Passport ( need >20 points ) to get access to the user faucet in the discord
https://passport-verifier.avail.tools/
You can get more than 25 AVL/day or 200 AVL/week by going to #appchain-builders channel in discord
This helps you to keep a screen running even if you closed the terminal
sudo apt install screen
screen -S madara
./target/release/madara run
Y
to run the appchainIf appchain is running you can minimize it now and let it running in the background
Ctrl + A + D
sudo apt install ufw
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 9944
sudo ufw allow 4000
sudo ufw allow 9615
sudo ufw allow 30333
./target/release/madara explorer
You are done and you can check your explorer with: http://YourIP:4000
• Go to app_chains
folder of your repository > Add File > Create new file
• Create a uid here and replace with the name of your file: uid
.json
For example my file name is:
213id2e0-0492-4aa5-3jee-5fif86b38fje.json
• Copy paste below code into it and replace placeholders with your appchain details
Replace Your_app_chain
, YourLogoURL
, YourIP
, uid
{
"name": "Your_appchain_name",
"logo": "Your_Logo_URL",
"rpc_url": "http://Your_IP:9944",
"explorer_url": "http://Your_IP:4000",
"metrics_endpoint": "http://Your_IP:9615/metrics",
"id": "uid"
}
• Commit changes… and save
Contribute > Open pull request
• Add your Appchain name to your title
✨️Adding Your_appchain_name
• Create pull request and done
• You need to get “All checks have passed” with a green verified tick if you were successful
There is a github bot which verify and auto-merge your PR to list it in the leaderboard
You have to pass 4 verify checks
If you keep getting error in verifying your PR, you are doing smth wrong, you can correct your .json file by uploading it in the root directory of your server and run:
Replace file name with your .json file name in the command
npx prettier --check 7s0dgb7fsd-asdtfgtvvr-b28fg-fhpdrxrnreahdhed.json
npx prettier --write 7s0dgb7fsd-asdtfgtvvr-b28fg-fhpdrxrnreahdhed.json
https://docs.google.com/forms/d/e/1FAIpQLSdxqFdvI4iGewNL_N-8q8gEdJdtCeBMl9QSHp-uxnbN0RtfKA/viewform
When your PR gets verified by the github bot, you'll get your rank in leaderboard, Madara tab
Madara points calculation is not stable, for example if your node stops, your DA Updates resets and Points decreases
The team didn’t respond clearly as the testnet is totally buggy, but better to bear with it and try your best to do txs and keep the node running healthy until we see an optimization from the team
There are several ways to interact with your Appchain described in Karnot Mirror
VERSION="1.21.6"
ARCH="amd64"
curl -O -L "https://golang.org/dl/go${VERSION}.linux-${ARCH}.tar.gz"
wget -L "https://golang.org/dl/go${VERSION}.linux-${ARCH}.tar.gz"
wget -L "https://golang.org/dl/go${VERSION}.linux-${ARCH}.tar.gz"
curl -sL https://golang.org/dl/ | grep -A 5 -w "go${VERSION}.linux-${ARCH}.tar.gz"
tar -xf "go${VERSION}.linux-${ARCH}.tar.gz"
sudo chown -R root:root ./go
sudo mv -v go /usr/local
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
source ~/.bash_profile
go version
git clone https://github.com/sarox0987/avail-madara
cd avail-madara
nano rpc.json
add your Appchain RPC (server IP)
Ctrl+X
Y
Enter
go mod tidy
screen -S tx
go run main.go
Ctrl+A+D
You can get in touch with me in twitter