Add Forkchoice changes for ePBS #502
Open
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.
Major changes:
The whole logic is based on the idea that it doesn't matter how you reach the segment-level identifiers. i.e though ePBS introduces a separate envelope object, but the same segment structure can be followed. So the difference between a envelope(full block)/ empty block is which state is read from that block. One of the ways to do that is by following the existing pattern of keeping a chunk of the Store fields inside Chainlink
The changed structure of empty/full block pretty much behave as siblings if it is looked from view of part of forkchoice calculation which depends on reading parent information.
so the the most common structure that is going to happen is:
both weight propagation purposes as well as the insertion purpose of full/empty block of arrival, the choice of introducing dual maps is much easier than differentiation at
unfinalized_blocklevel or usingchain_linkfields.the key currently for both the map is
block_root. A previous approach was made to keep unfinalized_locations_full maps key asexecution_hashand unfinalized_locations_empty throughblock_root. But there was significant overhead in terms of number of conversion calla/reverse lookup for hash to root and viceversa. plus as only one variant of full/empty per blockroot can reach till forkchoice, there is ideally no problem with having the same keys.a way to move forward with the changes is to look at in which scenarios(insertion into segment, calculation supporting vote, tiebraker , weight propagtion/childern filter/setting
ForkChoicePayloadStatus) empty vs full is preferred across spec and current code.