ChainSafe / lodestar

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

Lodestar VC publishes validator registrations for withdrawn validators #6401

Open jshufro opened 9 months ago

jshufro commented 9 months ago

Describe the bug

rocketpool_validator  | Feb-07 06:26:18.910[]                 info: Published validator registrations to builder epoch=261622, count=6

one imagines that once a validator has been withdrawn it is no longer eligible for block proposals.

Expected behavior

Lodestar VC should not call register_validator/prepare_beacon_proposer for exited and withdrawn validators.

Steps to reproduce

No response

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

v1.15.0/5d93a62

nflaig commented 9 months ago

Thanks for bringing this up!

one imagines that once a validator has been withdrawn it is no longer eligible for block proposals

That is correct and we are filtering those out on the beacon node before sending the registrations to the builder https://github.com/ChainSafe/lodestar/blob/b6890adf2882b02960b8ffc5d685f3576dc6d0cc/packages/beacon-node/src/api/impl/validator/index.ts#L1264-L1266

Lodestar VC should not call register_validator/prepare_beacon_proposer for exited and withdrawn validators.

This is probably the ideal behavior but currently the VC does not continuously update the status of validators, we either just query status for unknown imported pubkeys to be discovered or once during startup.

Ideal solution would be to get the status of imported validators once per epoch and filter on VC side. This also affects other APIs, we also request duties for validators which are already exited.

Keeping track of the status is also a prerequisites for https://github.com/ChainSafe/lodestar/issues/5192 and https://github.com/ChainSafe/lodestar/issues/5158.

jshufro commented 9 months ago

we are filtering those out on the beacon node before sending the registrations to the builder

that's good and all but i really hope some day to be able to use any vc with any bn and not suffer from quirks.

at any rate it sounds like this is on the radar, thanks as always.