# Week 11 Hi everyone, Rupam here. This week I had been working on 2 PRs, one of which was pretty small and got merged in a few hours. The first [PR](https://github.com/prysmaticlabs/prysm/pull/14374) was a bug fix in the `createLightClientBootstrap` function and the `LightClientBootstrap` struct. The other [PR](https://github.com/prysmaticlabs/prysm/pull/14376) implements the following: - create new structs for Capella and Deneb - create `createLightClientBootstrapCapella` and `createLightClientBootstrapDeneb` functions (would be nice to extract common logic) - call the appropriate function in `GetLightClientBootstrap` handler, depending on the block's version - [additional] return `Eth-Consensus-Version` HTTP header as specified in https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/getLightClientBootstrap - add tests for the handler to check each version (current test is "wrong" in that it uses a Capella block/state instead of Altair) ## Adding Capella and Deneb Changes We had two structs `LightClientHeader`, `LightClientBootstrapResponse` and `LightClientBootstrap` defined but they are supposed to only work for Altair. In the second PR, I the Capella and Deneb structs too. ```go type LightClientHeaderCapella struct { Beacon *BeaconBlockHeader `json:"beacon"` Execution *ExecutionPayloadHeaderCapella `json:"execution"` ExecutionBranch [][]string `json:"execution_branch"` } type LightClientHeaderDeneb struct { Beacon *BeaconBlockHeader `json:"beacon"` Execution *ExecutionPayloadHeaderDeneb `json:"execution"` ExecutionBranch [][]string `json:"execution_branch"` } ``` ```go type LightClientBootstrapResponseCapella struct { Version string `json:"version"` Data *LightClientBootstrapCapella `json:"data"` } type LightClientBootstrapResponseDeneb struct { Version string `json:"version"` Data *LightClientBootstrapDeneb `json:"data"` } ``` ```go type LightClientBootstrapCapella struct { Header *LightClientHeaderCapella `json:"header"` CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"` CurrentSyncCommitteeBranch []string `json:"current_sync_committee_branch"` } type LightClientBootstrapDeneb struct { Header *LightClientHeaderDeneb `json:"header"` CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"` CurrentSyncCommitteeBranch []string `json:"current_sync_committee_branch"` } ``` I defined the Capella and Deneb versions of the function `createLightClientBootstrap` too but not linking them there as they would make this doc too big. You can find them [here](https://github.com/prysmaticlabs/prysm/pull/14376/files#diff-71162ec9303e401546e2ff2dd39e0ce36bd410e99e7e737d2756d2d7e66c0dd9). In the `GetLightClientBootstrap` handler, the appropriate function had to be called for example, if the block version is Capella, we have to call `createLightClientBootstrapCapella` and so on. I did it with adding a simple switch case which calls the function according to the block version and if the version is not Altair, Capella or Deneb, then it returns an error. I have also added tests for the `GetLightClientBootstrap` function. Right now I am left with the work mentioned in the 4th bullet point mentioned above in the doc and a blocker on how to populate all the fields of `LightClientHeaderCapella` and `LightClientHeaderDeneb`.