Celestia 节点运行教程

1、安装轻节点的硬件要求

  • 内存:2 GB RAM

  • CPU:单核

  • 磁盘:5 GB SSD 存储

  • 带宽:56 Kbps 下载/56 Kbps 上传

2、系统要求

Ubuntu Linux 20.04 (LTS) x64

3、安装依赖

升级系统

sudo apt update && sudo apt upgrade -y

接着安装

sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y

安装go

ver="1.18.2"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"

添加环境

echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

检查go版本

go version

go安装成功,如下所示(此为输出信息,无需复制)

go version go1.18.2 linux/amd64

安装 Celestia

下载并安装celestia

cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.3.0-rc2
make install

检查celestia

celestia version

安装成功如下图所示(此为输出信息,无需复制)

Semantic version: v0.3.0-rc2
Commit: 89892d8b96660e334741987d84546c36f0996fbe

启动节点

实例化一个轻节点

celestia light init

创建钱包

make cel-key

创建钱包第二步

./cel-key add developer --keyring-backend test --node.type light

成功后会输出一下开头类似信息(每个人地址不一样)

- address: celestia1mupdr4qu8wh57s467ewj6vk3mqlxrp0nagpr45

设置守护进程

sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-lightd.service
[Unit]
Description=celestia-lightd Light Node
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME/go/bin/celestia light start --core.grpc https://rpc-mamaki.pops.one:9090 --keyring.accname developer
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

查看是否设置内容

cat /etc/systemd/system/celestia-lightd.service

启动守护进程

systemctl enable celestia-lightd
systemctl start celestia-lightd

检查守护进程状态

systemctl status celestia-lightd

换一个ssh窗口查看日志内容

journalctl -u celestia-lightd.service -f

可以去discord的#faucet 输入以下信息(地址替换成你自己的)

$request celestia1mupdr4qu8wh57s467ewj6vk3mqlxrp0nagpr45

本文只对守护进程设置做了一点改动。利用screen也可以实现后台运行节点。

Subscribe to boater
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.