ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.14k stars 278 forks source link

Log Validator life cycle changes #5192

Open maschad opened 1 year ago

maschad commented 1 year ago

Is your feature request related to a problem? Please describe.

Following up from the discussion on improving validator status logging we would like to log the status of a validator lifecycle to give the user more incremental updates about the status of the validators.

Describe the solution you'd like

Ideally, we could log a Validator's voting status when it is discovered by the beacon chain along with some meta-data.

i.e. is a validator's lifecycle going through pending -> active -> exited -> withdrawn and then we can log the total validators.

Additional context

Upon initialization Lighthouse would log


Nov 23 08:24:23.745 INFO Initialized validators                  enabled: 2, disabled: 0
Nov 23 08:24:23.757 INFO Connected to beacon node                endpoint: http://localhost:5052/, version: Lighthouse/v3.2.1-6d5a2b5/x86_64-linux
Nov 23 08:24:23.758 INFO Initialized beacon node connections     available: 1, total: 1
Nov 23 08:24:23.758 INFO Loaded validator keypair store          voting_validators: 2
Nov 23 08:24:23.764 INFO Validator exists in beacon chain        fee_recipient: 0x0000…abcd, validator_index: 123456, pubkey: 0x00001, service: duties
Nov 23 08:24:23.764 INFO Validator exists in beacon chain        fee_recipient: 0x0000…abcd, validator_index: 123457, pubkey: 0x00001, service: duties

for instance. As mentioned here Certainly it owuld be useful to have the fee_receipient , signing_method and total_voting_validators included.

dapplion commented 1 year ago

The text Validator exists in beacon chain sounds very reasonable and correct. Logging it only at initialization is fine

philknows commented 1 year ago

As mentioned in https://github.com/ChainSafe/lodestar/pull/5507#issuecomment-1558752371, there are still some outstanding questions relating to this log change: