๐ฅ๏ธBridge node (Shwap)
Server preparation
apt update && apt upgrade -yapt install curl build-essential git wget jq make gcc tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev lz4 -yInstall GO
ver="1.23.1" && \
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 versionufw allow 2121 comment bridge_nodeIMPORTANT - you must use XFS file system. Please do not use ext4, but migrate to XFS/ZFS
Node installation
IMPORTANT - starting October 7th, a new version v0.18.1-mocha for the Celestia DA layer (Mocha) will be released, which will use Shwap and will not be compatible with previous versions. For the new release, it will be necessary to remove Environment=GODEBUG="asynctimerchan=1" from the service file
The process of setting up and starting a new node remains the same, but the new node will need to synchronize all blocks from the genesis, or use a snapshot synchronized with the new version. Due to optimizations, a significant decrease in hard disk usage is expected
Both protocols will work side by side during a month-long transition period from October 7th to November 7th for Mocha
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node && cd celestia-node
git checkout tags/v0.21.9-mocha
make build
make install
celestia version
#Semantic version: v0.21.9-mocha
#Commit: f9698d454bb76f85d9110d0107016cb00684a9c7#https://docs.celestia.org/developers/celestia-node-key/
make cel-key
mv $HOME/celestia-node/cel-key /usr/local/bin/
cel-key add bridge_wallet --keyring-backend test --node.type bridge --p2p.network mocha# show wallet address
cel-key list --node.type bridge --keyring-backend test --p2p.network mochaInitializing the bridge
--core.ip use the address of our remote RPC node
--p2p.network use the chain id of our network
--core.port use the gRPC port from our RPC node
--keyring.keyname use the name of the wallet we created
celestia bridge init \
--core.ip <RPC_NODE_IP> \
--p2p.network mocha \
--core.port 9090 \
--keyring.keyname bridge_walletCreate a service file
tee <<EOF >/dev/null /etc/systemd/system/celestia-bridge.service
[Unit]
Description=celestia-bridge testnet daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which celestia) bridge start --archival \
--p2p.network mocha \
--metrics.tls=true --metrics --metrics.endpoint otel.mocha.celestia.observer \
--keyring.keyname bridge_wallet
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOFsystemctl daemon-reload
systemctl enable celestia-bridge
systemctl restart celestia-bridge && journalctl -u celestia-bridge -f -o catDon't forget to save the catalog with keys!!! .celestia-bridge-mocha-4/keys
Update
systemctl stop celestia-bridgecd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node && cd celestia-node
git checkout tags/v0.16.0
make build
make install
make cel-key
celestia version
#Semantic version: v0.16.0
#Commit: 6744f648649ebb5fee1b27faf7aca96ecf4519b2# update config
celestia bridge config-update --p2p.network mochasystemctl restart celestia-bridge && journalctl -u celestia-bridge -f -o catNode transfer

Please note that we do not necessarily need to change the keyring-test wallet Let's look at the most suitable option for saving the Node ID, assuming that the old server is working:
Start a new server and fully sync the bridge
Stop Bridge on the new server and replace the two files in
/root/.celestia-bridge-mocha-4/keys/Be sure to give the necessary rights
chmod 600 /root/.celestia-bridge-mocha-4/keys/*Restart Bridge on the new server and wait for full synchronization
Stop the old server
Useful commands
Find out bridge node id
# first, let's generate an authorization token
AUTH_TOKEN=$(celestia bridge auth admin --p2p.network mocha)
echo $AUTH_TOKEN
# we get the peerId of our node
curl -X POST \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":0,"method":"p2p.Info","params":[]}' \
http://localhost:26658# another way to get Node ID
celestia p2p info --node.store ~/.celestia-bridge-mocha-4/Working with wallets
# show wallet address
cel-key list --node.type bridge --keyring-backend test --p2p.network mocha
# check balance
celestia state balance --node.store ~/.celestia-bridge-mocha-4/
# restore wallet
cel-key add bridge_wallet --keyring-backend test --node.type bridge --recover --p2p.network mochaStatus
celestia header sync-state --node.store ~/.celestia-bridge-mocha-4/Delete bridge
systemctl stop celestia-bridge
systemctl disable celestia-bridge
rm /etc/systemd/system/celestia-bridge.service
systemctl daemon-reload
cd $HOME && \
rm -rf .celestia-bridge-mocha-4 .celestia-app celestia-node && \
rm -rf $(which celestia)Last updated