A simple monitor for your massa node Try it at @MassaWatcherBot
You can only run one node per machine, and using an existing node is not yet supported!
On ubuntu:
git clone https://github.com/Soulthym/massa-watcher.git
cd massa-watcher
./install.shThen, edit .envrc with the following values:
export VIRTUAL_ENV=".venv"
uv venv
export TG_API_ID="$api_id" # get it from https://my.telegram.org/apps
export TG_API_HASH="$api_hash" # get it from https://my.telegram.org/apps
export TG_BOT_TOKEN="$bot_token" # get it from @BotFather
export TG_USERNAME="$bot_username" # your bot username without @
export TG_ADMIN="$admin" # your own username without @Enable direnv:
direnv allowThen, run the bot:
uv run massa_watcher.pyIf your bot will restart often, instead of clogging official bootstrap servers, you can make your own node the default bootstrap node.
During development, this will help a lot with restarting the bot quickly without waiting for the bootstrap servers to respond, which can take several hours if they are overloaded or if you hit your rate limit.
To do this:
- find your node id by running
get_statusin your node's client. It will be near the top of the response. - find your node's IP address by running
ip a sin the terminal on the node's machine (in the shell, not in the massa client) - find your bot's IP address by running
ip a sin the terminal on the bot's machine (in the shell) - whitelist your bot's IP in your node's client with
node_bootstrap_whitelist add $YOUR_BOT_IP. - edit
node_config.tomlwith the following values:
[api]
max_addresses_datastore_keys_query = 1000
[bootstrap]
# list of bootstrap (ip, node id)
bootstrap_list = [
["$YOUR_NODE_IP:31245", "$YOUR_NODE_ID"],
]Then, restart the bot with Ctrl+C and:
uv run massa_watcher.py/start|help- Start menu/watch address- Start monitoring a Massa address for missed blocks/unwatch address- Stop monitoring a Massa address for missed blocks/status- Show the current status of your watched Massa addresses