A real-time monitoring tool for Ethereum validators that sends Telegram notifications for important events including block proposals, missed attestations, and beacon chain withdrawals.
- Block Proposal Monitoring: Notifications for successful and missed block proposals
- MEV Reward Tracking: Automatic detection and reporting of MEV rewards for proposed blocks
- Attestation Monitoring: Detection of missed attestations with batch notifications
- Withdrawal Notifications: Alerts for beacon chain withdrawals
- Batch Processing: Efficient processing of multiple slots with configurable batch sizes
- Safety Margin: Configurable epoch delay to avoid processing non-finalized data
- Multiple Validators: Support for monitoring multiple validators with custom labels
- Telegram Integration: Two methods for sending notifications (CLI wrapper or Bot API)
- Stale Node Detection: Automatic alerts when the beacon node falls behind
-
Node.js 18.x or higher
-
Lighthouse Beacon Node with the following CRITICAL requirement:
IMPORTANT: Your Lighthouse beacon node MUST be running with the
--reconstruct-historic-statesflag enabled. This is required for the application to retrieve historical validator duties and attestations.lighthouse bn --reconstruct-historic-states [other flags...]
-
Telegram Bot Token (obtain from @BotFather)
-
Telegram Chat ID(s) for receiving notifications
- telegram-cli-wrapper (only if using
wrappermethod for Telegram notifications)
-
Clone the repository:
git clone https://github.com/got3nks/eth-notifier cd eth-notifier -
Install dependencies:
npm install
-
Copy and configure the settings file:
cp ethNotifier.json.example ethNotifier.json
-
Edit
ethNotifier.jsonwith your configuration (see Configuration section below)
Edit ethNotifier.json to configure the notifier:
{
"lastBlock": 13132000,
"maxConcurrentRequests": 30,
"batchSize": 100,
"pollingInterval": 60,
"epochsBeforeFinal": 1,
"telegram": {
"method": "bot-api",
"token": "YOUR_TELEGRAM_BOT_TOKEN",
"chatId": [123456789]
},
"validators": {
"My Validators": [123456,123457]
}
}| Option | Type | Description |
|---|---|---|
lastBlock |
number | Last processed slot (automatically updated) |
maxConcurrentRequests |
number | Maximum concurrent API requests to beacon node (default: 30) |
batchSize |
number | Number of slots to process per batch (default: 100) |
pollingInterval |
number | Seconds between polling cycles (default: 60) |
epochsBeforeFinal |
number | Number of epochs behind head to process (default: 1) |
telegram.method |
string | Telegram method: "bot-api" or "wrapper" (default: "bot-api") |
telegram.token |
string | Your Telegram bot token |
telegram.chatId |
array | Array of Telegram chat IDs to send notifications to |
validators |
object | Groups of validators to monitor with custom labels |
The application supports two methods for sending Telegram notifications:
Uses the official node-telegram-bot-api package. This is the recommended method as it's more reliable and doesn't require external dependencies.
"telegram": {
"method": "bot-api",
...
}Uses an external telegram-cli-wrapper executable. Requires the wrapper to be installed at /usr/local/bin/telegram-cli-wrapper or set via the TELEGRAM_CLI_WRAPPER environment variable.
"telegram": {
"method": "wrapper",
...
}npm startOr directly with Node.js:
node ethNotifier.jsRun without sending Telegram notifications:
TEST_MODE=true node ethNotifier.js| Variable | Description |
|---|---|
TEST_MODE |
Set to "true" to disable Telegram notifications |
TELEGRAM_CLI_WRAPPER |
Path to telegram-cli-wrapper (only for wrapper method) |
Your Lighthouse beacon node must be started with:
lighthouse bn --reconstruct-historic-statesFor optimal performance, consider these additional flags:
lighthouse bn \
--disable-backfill-rate-limiting \
--slots-per-restore-point 1024 \
--reconstruct-historic-states \
[other flags...]The application connects to Lighthouse at http://127.0.0.1:5052 by default. To use a different URL, set the environment variable:
LIGHTHOUSE_URL=http://your-lighthouse-node:5052 node ethNotifier.jsβ
Validator 123456 (My Validators) proposed block 13106031
π° MEV Reward for block 13106031: 0.05234 ETH
β Validator 123456 (My Validators) failed to propose block 13106031
β My Validators validator(s) 123456, 123457 missed 2 attestation(s) at slot(s): 13106032, 13106033
πΈ Validator 123456 (My Validators) received a beacon withdrawal of 0.01234567 ETH
β οΈ Beacon node is 15 slots behind - Consensus Client may be offline or stale
- Polling: The notifier polls the Lighthouse beacon node every
pollingIntervalseconds - Safe Processing: Only processes slots that are
epochsBeforeFinalepochs behind the current head (to avoid non-finalized data) - Batch Processing: Processes slots in batches of
batchSizefor efficiency - Duty Checking: For each slot, checks proposer duties and attestation duties for monitored validators
- Attestation Verification: Verifies that validators submitted their attestations by checking aggregation bits
- Notification: Sends Telegram notifications for any events (proposals, missed attestations, withdrawals)
- Progress Saving: Automatically saves progress to
ethNotifier.jsonafter each batch
- Ensure Lighthouse is running and accessible
- Check that the Lighthouse URL is correct
- Verify that Lighthouse HTTP API is enabled (
--httpflag)
- CRITICAL: Ensure Lighthouse is running with
--reconstruct-historic-states - Check that Lighthouse has fully synced
- Verify that your validators are active and have duties
- Verify your bot token is correct
- Ensure chat IDs are correct (use @userinfobot to get your chat ID)
- Check that the selected Telegram method is properly configured
- For
wrappermethod: ensuretelegram-cli-wrapperis installed and executable
- Reduce
batchSizeto process fewer slots at once - Reduce
maxConcurrentRequeststo limit concurrent API calls (try 10) - Increase
pollingIntervalto reduce polling frequency
eth-notifier/
βββ ethNotifier.js # Main application entry point
βββ lighthouse-api.js # Lighthouse API wrapper with caching
βββ cache.js # Caching layer for API responses
βββ telegram-bot-api.js # Telegram notifications via Bot API
βββ telegram-wrapper.js # Telegram notifications via CLI wrapper
βββ ethNotifier.json # Configuration file
βββ package.json # Dependencies
axios- HTTP client for Lighthouse APIbetter-sqlite3- SQLite database for cachingnconf- Configuration managementnode-emoji- Emoji support for notificationsnode-telegram-bot-api- Official Telegram Bot API client
MIT License - Feel free to use and modify as needed.
Contributions are welcome! Please feel free to submit issues or pull requests.
- Built for the Ethereum community
- Uses the Lighthouse Beacon Node API
- MEV data from beaconcha.in