mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
N/A This PR switches to using `prepare_beacon_proposer` instead of `beacon_committee_subscriptions` endpoint to register validators with the custody context. We currently use the `beacon_committee_subscriptions` endpoint for registering validators in the custody context. Using the subscriptions endpoint has a few disadvantages: 1. The lighthouse VC tries to optimise the number of calls it makes to this endpoint to reduce the load on the subscriptions endpoint. So we would be getting different a subset of the total number of validators in each call. This will lead to a ramp up of the validator custody units instead of a one time bump. For e.g. see these logs ``` Jun 30 22:36:05.012 DEBUG Validator count at head updated old_count: 0, new_count: 19 Jun 30 22:36:11.016 DEBUG Validator count at head updated old_count: 19, new_count: 24 Jun 30 22:36:17.017 DEBUG Validator count at head updated old_count: 24, new_count: 27 Jun 30 22:36:23.020 DEBUG Validator count at head updated old_count: 27, new_count: 32 Jun 30 22:36:29.016 DEBUG Validator count at head updated old_count: 32, new_count: 36 Jun 30 22:36:35.005 DEBUG Validator count at head updated old_count: 36, new_count: 42 Jun 30 22:36:41.014 DEBUG Validator count at head updated old_count: 42, new_count: 44 Jun 30 22:36:47.017 DEBUG Validator count at head updated old_count: 44, new_count: 46 Jun 30 22:36:53.007 DEBUG Validator count at head updated old_count: 46, new_count: 48 Jun 30 22:36:59.009 DEBUG Validator count at head updated old_count: 48, new_count: 49 Jun 30 22:37:05.014 DEBUG Validator count at head updated old_count: 49, new_count: 50 Jun 30 22:37:11.007 DEBUG Validator count at head updated old_count: 50, new_count: 53 Jun 30 22:37:17.007 DEBUG Validator count at head updated old_count: 53, new_count: 55 Jun 30 22:37:35.008 DEBUG Validator count at head updated old_count: 55, new_count: 58 Jun 30 22:37:41.007 DEBUG Validator count at head updated old_count: 58, new_count: 59 Jun 30 22:37:53.010 DEBUG Validator count at head updated old_count: 59, new_count: 60 Jun 30 22:38:05.013 DEBUG Validator count at head updated old_count: 60, new_count: 61 Jun 30 22:38:23.006 DEBUG Validator count at head updated old_count: 61, new_count: 62 Jun 30 22:38:29.009 DEBUG Validator count at head updated old_count: 62, new_count: 63 Jun 30 22:38:41.009 DEBUG Validator count at head updated old_count: 63, new_count: 64 ``` 2. Different VCs would probably have different behaviours in terms of sending subscriptions In contrast, the `prepare_beacon_proposer` endpoint usage would be more standard across different VCs without any filtering of validators. Not doing so could mean potentially missing proposals so VCs are incentivised to make this call on any change in the validators managed by them. Lighthouse calls this endpoint every slot.