ChainSafe / ChainSafe/lodestar
Log Validator life cycle changes
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 156
Description
**Is your feature request related to a problem? Please describe.**
Following up from the discussion on [improving validator status logging](https://github.com/ChainSafe/lodestar/issues/4785) we would like to log the status of a validator lifecycle to give the user more incremental updates about the [status of the validators](https://hackmd.io/ofFJ5gOmQpu1jjHilHbdQQ).
**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
```bash
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](https://github.com/ChainSafe/lodestar/issues/4785#issuecomment-1324702738) Certainly it owuld be useful to have the `fee_receipient` , `signing_method` and `total_voting_validators` included.
Contributor guide
Research direction
Start by reviewing issue 4785, its referenced discussion, and the linked validator-status material to understand the intended lifecycle states. Then locate Lodestar's validator discovery and status logging entry points; done means logging lifecycle updates with the requested validator metadata and totals, with behavior agreed against the Lighthouse example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, blockchain
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100