cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node && cd celestia-node
git checkout tags/v0.20.4
make build
make install
celestia version
#Semantic version: v0.20.4
#Commit: 51b79431533576a5cddf1235bdf3751e4c014212
#https://docs.celestia.org/developers/celestia-node-key/
make cel-key
mv $HOME/celestia-node/cel-key /usr/local/bin/
cel-key add light_wallet --keyring-backend test --node.type light
# show wallet address
cel-key list --node.type light --keyring-backend test
Initializing the light
--core.ip use the address of our remote RPC node
--p2p.network use the chain id of our network
--core.rpc.port use the RPC port from our RPC node
--core.grpc.port use the gRPC port from our RPC node
--keyring.keyname use the name of the wallet we created
Don't forget to save the catalog with keys!!!.celestia-light/keys
Update
systemctl stop celestia-light
cd $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
For Light nodes there is no concept of double signature and if suddenly there is a need to transfer node ID to a new server, then it does not matter to us whether the old server is working or not available. The main thing is that we have a copy of two files located at /root/.celestia-light-mocha-4/keys/
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 Light
Stop Light on the new server and replace the two files in /root/.celestia-light-mocha-4/keys/
Be sure to give the necessary rights chmod 600 /root/.celestia-light-mocha-4/keys/*
Restart Light on the new server and wait for full synchronization
Stop the old server
Useful commands
Find out Light node id
# first, let's generate an authorization token
AUTH_TOKEN=$(celestia light auth admin)
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-light/
Working with wallets
# show wallet address
cel-key list --node.type light --keyring-backend test
# check balance
celestia state balance --node.store ~/.celestia-light/
# restore wallet
cel-key add light_wallet --keyring-backend test --node.type light --recover