Skip to main content

๐Ÿงช Expert: Subscribing to Important Events

Subscribing to the important events

Some smart contract events in the CSM may occur on the protocol side, such as withdrawal requests, penalties, etc., which require specific actions from the Node Operator (NO).

So, what exactly are the events that the operator has to follow?

info

If the guide seems too complicated, make sure to check out a tool: SM Sentinel. This is a Telegram bot that you can run on your own or use one of the community-supported instances. Note that community-supported instances come with no guarantee!

Contract: VEBOโ€‹

ValidatorExitRequestโ€‹

ValidatorExitRequest is the most important event for key management. It requires sending a voluntary exit request using the key specified in the event. If the Node Operator doesn't do this in time, the key becomes stuck, and rewards for the current and upcoming frames until stuck keys are exited frame are zeroed. Following all the events filtered by stakingModuleId=3 (Mainnet), stakingModuleId=4 (Hoodi) and nodeOperatorId is essential.

event ValidatorExitRequest(
uint256 indexed stakingModuleId,
uint256 indexed nodeOperatorId,
uint256 indexed validatorIndex,
bytes validatorPubkey,
uint256 timestamp
);
info

This event can be tracked using Ejector. In the case of Ejector usage, the requested validators will be exited automatically if the pre-signed messages for them are uploaded to the Ejector.

Contract: CSMโ€‹

ELRewardsStealingPenaltyReportedโ€‹

The CSM Committee can report a potentially stolen amount of EL rewards. If so, the NO must either compensate or challenge the report.

event ELRewardsStealingPenaltyReported(
uint256 indexed nodeOperatorId,
bytes32 proposedBlockHash,
uint256 stolenAmount
);

VettedSigningKeysCountDecreasedโ€‹

The uploaded keys might be invalid, so the Node Operator has to remove invalid keys to prevent the others from stopping deposits.

event VettedSigningKeysCountDecreased(
uint256 indexed nodeOperatorId
);

StuckSigningKeysCountChangedโ€‹

Stuck keys for the Node Operator mean no rewards for the current frame. It's too late already to exit these keys in the current frame, but it is still required to receive further rewards

event StuckSigningKeysCountChanged(
uint256 indexed nodeOperatorId,
uint256 stuckKeysCount
);

InitialSlashingSubmittedโ€‹

Get notifications when slashing occurs and is reported

event InitialSlashingSubmitted(
uint256 indexed nodeOperatorId,
uint256 keyIndex
);

WithdrawalSubmittedโ€‹

Information event that the key has been reported as withdrawn, so the required bond for this key is released.

event WithdrawalSubmitted(
uint256 indexed nodeOperatorId,
uint256 keyIndex,
uint256 amount
);

DepositedSigningKeysCountChangedโ€‹

Information event that the keys have been deposited

event DepositedSigningKeysCountChanged(
uint256 indexed nodeOperatorId,
uint256 depositedKeysCount
);

Contract: CSFeeDistributorโ€‹

DistributionDataUpdatedโ€‹

Notify when rewards for the current frame are available to claim

event DistributionDataUpdated(
uint256 totalClaimableShares,
bytes32 treeRoot,
string treeCid
);

3rd party notification providersโ€‹

Operators can use Tenderly as a service to subscribe to the emitted events on the particular contracts and notify in the Telegram, Discord, Email, etc.

See corresponding doc for the set-up guide:

Stakesaurus' Telegram Botโ€‹

Stakesaurus Validator Healthcheck Alerts

Eridian's Pager Duty Setupโ€‹

Eridian Alerting and Monitoring Docs