# Airchains CosmWasm Zk Rollup Node **Published by:** [Huge|NodeRunner](https://paragraph.com/@0xhuge/) **Published on:** 2024-06-26 **URL:** https://paragraph.com/@0xhuge/airchains-cosmwasm-zk-rollup-node ## Content Airchains เป็นแพลตฟอร์มโครงสร้าง zk-Rollup แบบโมดูลาร์ที่ออกแบบมาโดยเฉพาะเพื่อช่วยให้นักพัฒนาสร้างแอปพลิเคชันที่ครอบคลุมได้ด้วยความเร็วและความเป็นส่วนตัวที่ไม่มีใครเทียบได้ อีกทั้งยังมีความยืดหยุ่นในการเลือกเลเยอร์การประมวลผลและการจัดเก็บข้อมูล ที่เหลือไปไปอ่านต่อกันเองนะครับ Configuration requirements System: Ubuntu 22.04 ส่วนตัวผมใช้ 8GB 8 CORE 300GB Install เพื่อเตรียมเครื่อง sudo apt-get update && apt-get install jq build-essential -y sudo apt install curl -y Install go curl https://dl.google.com/go/go1.22.1.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - ; cat <<'EOF' >>$HOME/.bashrc export GOROOT=/usr/local/go export GOPATH=$HOME/go export GO111MODULE=on export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin EOF source $HOME/.bashrc Download the GitHub repository cd git clone https://github.com/airchains-network/wasm-station.git git clone https://github.com/airchains-network/tracks.git Setting up Wasm Station cd wasm-station go mod tidy /bin/bash ./scripts/local-setup.sh ถึงตรงนี้บางคนอาจจะรอนานหน่อยก็รอไปครับ ถ้าถูกต้องมันจะขึ้นประมาณนี้ ขึ้นแบบนี้คุณได้ไปต่อ Run wasmstation sudo tee <<EOF >/dev/null /etc/systemd/system/wasmstationd.service [Unit] Description=wasmstationd After=network.target [Service] User=$USER ExecStart=$HOME/wasm-station/build/wasmstationd start --api.enable Restart=always RestartSec=3 LimitNOFILE=10000 [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload && \ sudo systemctl enable wasmstationd && \ sudo systemctl start wasmstationd รอประมาณ 2 3 นาทีจับเวลาเอานะ View logs sudo journalctl -u wasmstationd -f Setting up DA Download eigenlayer-cli cd wget https://github.com/airchains-network/tracks/releases/download/v0.0.2/eigenlayer sudo chmod +x eigenlayer sudo mv eigenlayer /usr/local/bin/eigenlayer Create key eigenlayer operator keys create -i=true --key-type ecdsa (ใส่ชื่อ wallet) ทำตามขั้นตอนที่หน้า command Save the private key เอาออกมาเก็บไว้ แล้วกด q เพื่อออก copy ทุกอย่างออกมาเก็บไว้ Setting Tracks sudo rm -rf ~/.tracks cd $HOME/tracks go mod tidy go run cmd/main.go init --daRpc "disperser-holesky.eigenda.xyz" --daKey "เอา key ข้างบนมาใส่ตรงนี้" --daType "eigen" --moniker "ใส่ชื่อของเรา" --stationRpc "http://127.0.0.1:26657" --stationAPI "http://127.0.0.1:1317" --stationType "wasm" ถ้าถูกต้องจะขึ้นแบบนี้ [2024-06-26 09:50:08] » Track initialization successful สร้าง airchains address go run cmd/main.go keys junction --accountName airchainsตามด้วยชื่อเรา --accountPath $HOME/.tracks/junction-accounts/keys จำไว้เสมอว่าเมื่อระบบสร้างอะไรให้เรามาให้เรา save เก็บเอาไว้ทั้งหมดเพราะมันจะถูกนำมาใช้ตอนหลัง ค่อยๆดูนะครับมันจะมี key ต่างๆมาให้เรา ไปขอเหรียน https://airchains.faucetme.pro/?source=post_page-----4cb8b890807b-------------------------------- ใส่เลขกระเป๋าเราที่ขึ้นต้นด้วย AIR Initialize prover go run cmd/main.go prover v1WASM nodeid=$(grep "node_id" ~/.tracks/config/sequencer.toml | awk -F '"' '{print $2}') ip=$(curl -s4 ifconfig.me/ip) bootstrapNode=/ip4/$ip/tcp/2300/p2p/$nodeid echo $bootstrapNode ถ้าถูกต้องมันจะ show ประมาณนี้ จดเอาไว้ด้วย /ip4/<ip เครื่องเรา>/tcp/2300/p2p/และnodeid Create a station go run cmd/main.go create-station --accountName airchainsจากข้างบน --accountPath $HOME/.tracks/junction-accounts/keys --jsonRPC "https://junction-testnet-rpc.synergynodes.com/" --info "WASM Track" --tracks เลขกระเป๋าขึ้นต้นด้วย air --bootstrapNode "bootstrapNode" รอซักพักเช่นเคยมันจะขึ้นแบบนี้ คุณได้ไปต่อ [2024-06-11 10:16:32] » tracks address: air1mcpx52vmr2nl75yppl0xw2w5htgnv [2024-06-11 10:16:32] » Currently user have 2.000000AMF [2024-06-11 10:16:44] » txHash: 3D7688A44BCDBED043380C5367B0B1320187B34E46B6C52E82BD16843D145FE3 [2024-06-11 10:16:44] » /root/.tracks/config/genesis.json created [2024-06-11 10:16:44] » vrfPrivKey ID: 124014616c36ba23183504643d101a875c99531732bb83f6366 [2024-06-11 10:16:44] » vrfPubKey ID: 13223019114f6a1d4d2068bf2dd58982d63d5c914412976a5291372a51deb542 [2024-06-11 10:16:44] » Successfully Created VRF public and private Keys [2024-06-11 10:16:44] » Successfully created station อัดแกสเพื่อความแรง sed -i 's/gasFees := fmt.Sprintf("%damf", gas)/gasFees := fmt.Sprintf("%damf", 2*gas)/' "$HOME/tracks/junction/verifyPod.go" sed -i 's/gasFees := fmt.Sprintf("%damf", gas)/gasFees := fmt.Sprintf("%damf", 2*gas)/' "$HOME/tracks/junction/validateVRF.go" sed -i 's/gasFees := fmt.Sprintf("%damf", gas)/gasFees := fmt.Sprintf("%damf", 3*gas)/' "$HOME/tracks/junction/submitPod.go" Start station sudo tee /etc/systemd/system/stationd.service > /dev/null << EOF [Unit] Description=station track service After=network-online.target [Service] User=$USER WorkingDirectory=$HOME/tracks/ ExecStart=$(which go) run cmd/main.go start Restart=always RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable stationd sudo systemctl restart stationd นับเวลาในใจซัก 2-3 นาที check log sudo journalctl -u stationd -f -o cat ถ้ามันขยับๆก็ไปต่อ กด Ctrl + C เพื่อออกจาก log Flash TX Creating a Script cd addr=$($HOME/wasm-station/build/wasmstationd keys show node --keyring-backend test -a) sudo tee spam.sh > /dev/null << EOF #!/bin/bash while true; do $HOME/wasm-station/build/wasmstationd tx bank send node ${addr} 1stake --from node --chain-id station-1 --keyring-backend test -y sleep 6 # Add a sleep to avoid overwhelming the system or network done EOF nohup bash spam.sh & มันจะดูนิ่งๆเรา กด enter ไปเลย cat nohup.out ต้องขึ้นแบบนี้คุณได้ไปต่อ code: 0 codespace: "" data: "" events: [] gas_used: "0" gas_wanted: "0" height: "0" info: "" logs: [] raw_log: "" timestamp: "" tx: null txhash: F2F9C6911D3D48C98CAC47773E0B7B4C8E9AD23BFD10692177BA5C8C69980A3B code: 0 codespace: "" data: "" events: [] gas_used: "0" gas_wanted: "0" height: "0" info: "" logs: [] raw_log: "" timestamp: "" tx: null txhash: ACB167A5B5E806B59497EA49B825106E1AB4C8FA7808AA89A726F4109E4E00FB ดู log อีกรอบ sudo journalctl -u stationd -f -o cat ต้อง successfully ประมาณ 2 ตัวตามรูป ถ้าไม่ได้ให้ไป check port เราเปิด port ครบมั้ย ####ถ้าขึ้นว่า RPC ERROR ไม่ขึ้นข้อนี้ไม่ต้องใส่นะผ่านได้เลย#### sudo systemctl daemon-reload sudo systemctl enable stationd sudo systemctl restart stationd journalctl -u stationd -f -o cat สร้างกระเป๋า ผมใช้ของที่นี้ https://www.leapwallet.io/ กดนี้นะ เอา numer key มาใส่ 24 คำ แล้ว import ไปนี้ต่อ เข้าไปแล้วเชื่อมกระเป๋ามันจะต่อ chain ให้ https://points.airchains.io/ เมื่อถึงข้อนี้ point ต้องเข้าแล้วนะครับมากน้อย ยังๆยังไม่จบมีต่อ เข้า discord https://discord.gg/p7rmv8WT หัวข้อ Validator >> Role-request กดที่ลูกศรขวาบนมันจะไปอีกหน้านึง เอา URL ไปวางใน Discord เพื่อขอ Role Validator. +++ congratulations +++ จบครับเหนือยจุง และอีกเช่นเคยนะครับ การ run node ไม่ได้แปลว่าเราจะได้เสมอไป สำหรับท่านที่ต้องเช้า VPS มา run นั้นถือเป็นต้นทุนและความเสี่ยง คำนวนกันดีๆนะครับ HAPPY NODE RUNNER !! Subscribe ## Publication Information - [Huge|NodeRunner](https://paragraph.com/@0xhuge/): Publication homepage - [All Posts](https://paragraph.com/@0xhuge/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@0xhuge): Subscribe to updates - [Twitter](https://twitter.com/0xHuge): Follow on Twitter