GitXplorerGitXplorer
j

staker-notifier

public
5 stars
2 forks
8 issues

Commits

List of commits on branch main.
Verified
d8766e91ce9b06bf7982ee764509725c2ff15f22

Merge pull request #31 from jimmygchen/add-telegram-support

jjimmygchen committed 2 years ago
Unverified
95111421da3b3f2aa98deaf2c12a03903bd31723

fixed and added catch

yyury-dubinin committed 2 years ago
Unverified
71b386293e01f9b9ea59842a9e863f47cded08bc

Update telegram-notifier.js

yyury-dubinin committed 2 years ago
Verified
36e33885b5af14a765b09582320f7ff478829f78

Update src/notifiers/telegram-notifier.js

yyury-dubinin committed 2 years ago
Verified
d17b9592cfef8fa6b1042d80d124fec5f5b7e452

Update src/main.js

yyury-dubinin committed 2 years ago
Verified
4ae8b4bdea86c5e7e764b66fb2e7f9b61e38df31

Update src/main.js

yyury-dubinin committed 2 years ago

README

The README file for this repository.

Staker Notifier

A simple notification tool for Ethereum stakers to track validator health and statuses.

The ultimate goal of this tool is to make the stakers' lives easier and better by reducing the amount of manual effort and stress from looking after validators and keeping up with changes to the clients and network.

Table of Contents

Alert types

Staker Notifier currently tracks the following events:

  • Balance: when the balance of one or more validators has decreased for a few consecutive epochs
  • Status: when the validator status has changed or when a new validator has been added to the beacon chain

Example messages:

  • "2022-05-24T10:18:47Z Validator 82 has transitioned from pending_queued to active_ongoing."
  • "2022-05-24T10:21:11Z 1 out of 3 validators have balance reduced since last epoch. Please check validator(s) 81"

Please see additional alert types that are being considered in issue list

Notification channels

Currently, SMS and Telegram notifications are supported - This is the original idea that started this project, to be notified without installing a mobile app and without needing Internet access.

However, additional notification channels are being considered and may be implemented depending on demand. See issue list here

Prerequisite

  1. A Twilio account & number: Staker Notifier requires the usage of a third-party SMS provider, however the usage will be minimal unless a large number of notifications are sent. A free trial credit is currently being offered to new users that should last for quite a while.

  2. Access to one or multiple Beacon node API endpoints, such as Infura or your own Beacon node. **Infura is an ethereum node provider and is optional for using Staker Notifier, as you can also choose to use your own node. However, it could come handy as a fallback (issue to be implemented) when there are issues with the beacon node.

Quick start

  1. Set up a Twilio account. In the Twilio console:

    • Copy the 'Account SID' and 'Auth Token'. This will be used in step 3.
    • Buy a number. This will be the 'From' number for sending the SMS.
    • Add a verified caller ID to use it as the 'To' number for outbound calls/messages.
  2. Create an Infura account (Optional if connecting to your own Beacon node). In the Infura dashboard:

    • Create new project and select 'ETH2' Product.
    • Once created, got to 'Project Settings' and copy the https endpoint. This will be used in step 3.
  3. Create a .env file at the current working directory with the following contents (See example here):

    Name Description
    VALIDATOR_PUBKEYS Comma separated list of validator public keys with 0x prefixes.
    BEACON_API_LIST Beacon node url from step 2. Currently only one url is used.
    TWILIO_ACCOUNT_SID 'Account SID' from step 1.
    TWILIO_AUTH_TOKEN 'Auth Token' from step 1.
    SMS_FROM 'From' number from step 1.
    SMS_TO 'To' number from step 1.
    BALANCE_REDUCED_NOTIFY_INTERVAL_EPOCHS Optional. Number of epochs before resending alert. Default: 20.
    TELEGRAM_BOT_TOKEN You need to create a new bot in Telegram.
    TELEGRAM_CHAT_ID You need to create a new chat and invite the bot to it.
  4. Run one of the following commands:

    • with Docker:
      docker run --env-file .env jchen86/staker-notifier
      
    • with Node (>=16):
      npm install && npm start
      

Contribute

Contributions welcome. Please check out the issues.