Skip to content

Provides your CSM Node Operator events to the telegram chats

License

Notifications You must be signed in to change notification settings

skhomuti/csm-sentinel

Repository files navigation

CSM Sentinel

CSM Sentinel is a telegram bot that sends you notifications for your CSM Node Operator events.

This bot was developed and is maintained by @skhomuti, a member of the Lido Protocol community, to simplify the process of subscribing to the important events for CSM. You can either run the bot yourself or use the community-supported public instance, depending on your privacy preferences.

Public Instances

These bots are owned by @skhomuti: Ethereum and Holesky

Please note that no guarantee is given for the availability of the bot. Also consider privacy concerns when using a public instance.

Running your own instance

First, you need to create a bot on Telegram. You can do this by talking to the BotFather.

Then, you need to create a .env by copying one of the env.example.ethereum or env.example.holesky files and filling in the required fields:

  • TOKEN: The token you received from the BotFather
  • WEB3_SOCKET_PROVIDER: The websocket provider for your node. Preferably, use your own local node e.g. you already have for CSM validators. But it is also possible to use a public node of any web3 providers.

All other fields are pre-filled with the contracts from the corresponding network.

Run the CSM Sentinel using Docker compose:

docker compose up -d

Or using Docker:

docker build -t csm-sentinel .
docker volume create csm-sentinel-persistent

docker run -d --env-file=.env --name csm-sentinel -v csm-sentinel-persistent:/app/.storage csm-sentinel

Running alongside eth-docker

If you are running the bot on the same machine as the eth-docker, you can use the execution client with no need to expose it outside the container.

You need to use a special docker-compose file that connects the Sentinel instance to the eth-docker network.

docker compose -f docker-compose-ethd.yml up -d

WEB3_SOCKET_PROVIDER env variable is set to ws://execution:8546 via docker-compose file, so you don't need to specify it in the .env file.

Extra configuration

Pass the BLOCK_FROM environment variable to specify the block the bot should start monitoring events from. Note that this may result in duplicate events if you set it to a block that the bot has already processed before. BLOCK_FROM=0 allows you to skip processing past blocks and always start from the head. In general, you don't need to set this variable.

About

Provides your CSM Node Operator events to the telegram chats

Resources

License

Stars

Watchers

Forks