Week 15-16

Hi everyone, wasn't able to push out a lot of code last week as I was sick. Over these days, I mainly worked on updating the light client helper functions in Prysm to reference the dev branch of CL specs in this PR. As I said in my last update, we need to update them as the previous version only works upto Altair and also the newer implementation uses block_to_light_client_header which makes the code cleaner and more readable.

Updating the createLightClientBootstrapXXX functions:

Old: https://github.com/ethereum/consensus-specs/blob/3d235740e5f1e641d3b160c8688f26e7dc5a1894/specs/altair/light-client/full-node.md#create_light_client_bootstrap

New: https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/light-client/full-node.md#create_light_client_bootstrap

This was mostly adding another check to check equality of the value of hash_tree_root of the latest block header with the value of hash_tree_root of the block passed in the parameter and defining the LightClientHeader struct using block_to_light_client_header instead of defining it manually. The previous test setup of GetLightClientBootstrap in handlers_test.go also had to be changed as it wasn't compatible with the new implementation.

Updating the NewLightClientUpdateFromBeaconState function:

Old: https://github.com/ethereum/consensus-specs/blob/d70dcd9926a4bbe987f1b4e65c3e05bd029fcfb8/specs/altair/light-client/full-node.md#create_light_client_update

New: https://github.com/ethereum/consensus-specs/blob/dev/specs/altair/light-client/full-node.md#create_light_client_update

Although this was gonna be a part of my work, Bastin had to update it before me as a part of his PR which updates this and fixes some other problems related to the light client execution header structs. We decided to rebase my work on top of him to have lesser conflicts while merging as his PR needs to merged before mine.

Nits

There were some functions whose implementations haven't changed in dev. So the comment above them just has an URL to an older branch of CL specs. Not something critical but since we are at it, might just update them for consistency.