lighthouse
lighthouse copied to clipboard
Persist light client updates
Issue Addressed
Partially #3651
Proposed Changes
This PR aims to persist light client updates. Once persisted, this will allow lighthouse nodes to serve them over RPC.
This should be ready for another review! in the meantime i started on work to persist light client bootstraps based on the strategy detailed in this doc written by lion: https://hackmd.io/@dapplion/BkxPbc6eQT
Chatted with @michaelsproul offline, and we agree to put this data on the hot db, so this PR is good to go
Same CI failures
FAIL [ 4.186s] beacon_chain::beacon_chain_tests store_tests::light_client_updates_test
FAIL [ 1.187s] ef_tests::tests light_client_update
And the basic simulator
Since the fork epoch boundaries in basic-sim aren't multiples of 256, the light client periods dont align with the fork boundaries. We end up getting some BeaconStateError::IncorrectStateVariant when constructing light client updates
I've gotten the basic-sim tests to pass by moving the light client update logic to the bottom of recompute_and_cache_updates. This prevents the light client update stuff from affecting optimistic and finality update
I've also completely removed any checks related to light client updates in basic-sim. I've kept the test vectors related to optimistic and finality updates. I think we have enough light client update test coverage in other places to live with this for now...
@mergify queue
queue
✅ The pull request has been merged automatically
The pull request has been merged automatically at 3913ea44c6dc412c6e723383dd398264a967faf3