# Implementing Semantic Payload Chunking (EIP-8101) in CL While working on prototyping Semantic Payload Chunking (EIP-8101) in Prysm, I noticed several things that I would like to highlight in order to help other developers while implementing the EIP. It's worth noting that my work was based on Fulu fork, and a lot of things would change with Gloas and ePBS ([EIP-7732](https://eips.ethereum.org/EIPS/eip-7732)). ## Chunk Count In order for clients to know when validating individual Chunks and CALs (ChunkAccessLists) is finished, they need to have access to chunkCount. This is currently not part of the ExecutionPayload, but I think it should be. ## Block Body One of the main design questions is where in BlockBody to put Chunks and CALs. There are two most direcy ways of doing it: 1. Add two fields directly into BlockBody (`chunk_headers_root`, `chunk_access_lists_root`) containing commitments to chunks (contaning chunk header, transactions and withdrawals) and chunk access lists. 2. Add `chunks` field in the BlockBody. It is a list of `ChunkBundle` containers, each containing chunk header, transactions, withdrawals, chunk access lists. - Generating inclusion proofs for these objects is not as straight forward as in previous case, but it's doable It's worth mentioning that withdrawals, since present only in the last chunk, don't need to be included (they can be extracted from the State of the previous block). But this might complicate things a bit. ## Execution Payload validation Since Execution Payload no longer contains transaction, it can't be validated in the same manner as before. This would likely require larger refactoring. Once BeaconBlock is received (and `ExecutionPayloadHeader` with it), we can start validating and processing chunks and chunk access lists. Once they are validated, we can "finalize" the block and validate the entire execution. Only then can we consider the EL block valid. This might became simpler when done on top of ePBS ([EIP-7732](https://eips.ethereum.org/EIPS/eip-7732)), as some changes seem to be overlapping.