TMKMS Update for Celestia
Latest Version Tag: v0.14.0-celestia
This guide provides the necessary steps to update TMKMS for the Celestia Mocha-4 testnet. The update includes moving the configuration and keys to a dedicated hidden folder (~/.tmkms
), updating the systemd service, and installing the new TMKMS binary from the official Celestia repository.
Create Hidden TMKMS Directory
mkdir -p $HOME/.tmkms/mocha-4
Copy Existing Keys, State, and Config
cp -r $HOME/tmkms/mocha-4/secrets $HOME/.tmkms/mocha-4/
cp -r $HOME/tmkms/mocha-4/state $HOME/.tmkms/mocha-4/
cp $HOME/tmkms/mocha-4/tmkms.toml $HOME/.tmkms/mocha-4/
Update Paths in tmkms.toml
tmkms.toml
sed -i "s|state_file = .*|state_file = \"$HOME/.tmkms/mocha-4/state/mocha-4-consensus.json\"|" $HOME/.tmkms/mocha-4/tmkms.toml
sed -i "s|path = .*|path = \"$HOME/.tmkms/mocha-4/secrets/mocha-4-consensus.key\"|" $HOME/.tmkms/mocha-4/tmkms.toml
sed -i "s|secret_key = .*|secret_key = \"$HOME/.tmkms/mocha-4/secrets/kms-identity.key\"|" $HOME/.tmkms/mocha-4/tmkms.toml
Update Systemd Service
sudo tee /etc/systemd/system/tmkmsd.service > /dev/null << EOF
[Unit]
Description=TMKMS for Mocha-4
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=10
User=$USER
ExecStart=$(which tmkms) start -c $HOME/.tmkms/mocha-4/tmkms.toml
LimitNOFILE=1024
[Install]
WantedBy=multi-user.target
EOF
Reload Systemd and Restart TMKMS
sudo systemctl daemon-reload
sudo systemctl enable tmkmsd.service
sudo systemctl restart tmkmsd.service
sudo journalctl -u tmkmsd.service -f -o cat
Remove Old TMKMS Source Directory (Optional)
rm -rf $HOME/tmkms
Clone the Official Celestia TMKMS Repository
git clone https://github.com/celestiaorg/tmkms.git $HOME/tmkms
cd $HOME/tmkms
git checkout v0.14.0-celestia
Build and Install TMKMS
cargo build --release --features=softsign
cargo install --path . --features=softsign
Restart TMKMS to Apply the New Binary
sudo systemctl restart tmkmsd.service
sudo journalctl -u tmkmsd.service -f -o cat
Note: Ensure that the paths in the tmkms.toml
file are correctly set to the new locations. This guide assumes the use of the $HOME
environment variable for user-specific directories.
Last updated