lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Persist light client updates

Open eserilev opened this issue 1 year ago • 1 comments

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.

eserilev avatar Apr 09 '24 21:04 eserilev

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

eserilev avatar Jun 10 '24 17:06 eserilev

Chatted with @michaelsproul offline, and we agree to put this data on the hot db, so this PR is good to go

dapplion avatar Jul 05 '24 08:07 dapplion

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

dapplion avatar Jul 28 '24 20:07 dapplion

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...

eserilev avatar Aug 01 '24 01:08 eserilev

@mergify queue

jimmygchen avatar Aug 09 '24 07:08 jimmygchen

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 3913ea44c6dc412c6e723383dd398264a967faf3

mergify[bot] avatar Aug 09 '24 07:08 mergify[bot]