engine: specify bit ordering for the 16-byte custody and cell bitarrays - #856
Open
edg-l wants to merge 1 commit into
Open
engine: specify bit ordering for the 16-byte custody and cell bitarrays#856edg-l wants to merge 1 commit into
edg-l wants to merge 1 commit into
Conversation
custodyColumns and indices_bitarray are both 16-byte bitarrays with no stated bit-to-byte mapping. Reference the SSZ BitVector serialization, which is what go-ethereum already implements.
edg-l
marked this pull request as ready for review
July 31, 2026 08:25
mkalinin
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
engine_forkchoiceUpdatedV4'scustodyColumnsandengine_getBlobsV4'sindices_bitarrayare both 16-byte bitarrays with no stated bit-to-byte mapping. The failure is silent: a reversed order still decodes to a well-formed 128-bit set, so the EL adopts the wrong custody set, or returns cells the CL did not ask for, instead of returning an error.The ordering specified is the SSZ serialization of
BitVector[CELLS_PER_EXT_BLOB](consensus specs),array[i // 8] |= value[i] << (i % 8). The custody set is SSZ-native, so this introduces no new convention. It matches go-ethereum, wherecore/types/custody_bitmap.gosetsresult[i/8] |= 1 << (i % 8)and marshals the 16 bytes as plain hex. ethrex implements the same ordering.Documentation only: the fields stay
DATA, 16 bytes, nothing on the wire changes, and no OpenRPC change is needed since both are already typedbytes16. Confirmation from other client teams would be welcome, and if any client packs the bits the other way round that is worth surfacing before this merges.EIP-8070 carries the same definitions and has the same gap: ethereum/EIPs#12054, wording kept identical so the documents cannot drift.