Description
Description
Not sure how much of a pain this would be but it might clean up the block production code a bit.
PartialBeaconBlock
is essentially a state and the info/operations required to propose a block. As we've added block fields across forks we've added optional fields PartialBeaconBlock
rather than superstruct
-ing it. This has worked pretty well, but we do end up having to handle Options
where fields should really be required. In Electra, we've also got to handle fork-specific variants of operations too. So we're introducing more paths we have to handle that should never happen. superstruct
-ing PartialBeaconBlock
should let us grab all operations we need based on the state's fork and constructing a PartialBeaconBlock
with all the required fields at once.