Skip to content

Enable late re-org and re-org interactive tests #9405

Open
hopinheimer wants to merge 16 commits into
sigp:unstablefrom
hopinheimer:re-enable-re-orgs
Open

Enable late re-org and re-org interactive tests #9405
hopinheimer wants to merge 16 commits into
sigp:unstablefrom
hopinheimer:re-enable-re-orgs

Conversation

@hopinheimer
Copy link
Copy Markdown
Member

Issue Addressed

#8959

WIP still working on adding more re-org tests and refactoring existing.

.get_advanced_hot_state(head_block_root, slot, parent_state_root)
.map_err(BlockProductionError::FailedToLoadState)?
.ok_or(BlockProductionError::UnableToProduceAtSlot(slot))?;
//TODO(manas): deal with this weird shit here with the parent_payload_status
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should just be the head_payload_status as before, I think?

Copy link
Copy Markdown
Member

@michaelsproul michaelsproul Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: need to handle the fork boundary case (use empty if gloas is not enabled at parent_state.slot(), or equivalently !state.fork_name_unchecked().gloas_enabled()).

Comment on lines +244 to +248
let parent_payload_status = match self
.canonical_head
.fork_choice_read_lock()
.should_extend_payload(&re_org_parent_block)
{
Copy link
Copy Markdown
Member

@michaelsproul michaelsproul Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should experiment with choosing based on weight, because should_extend_payload is now firmly only for the previous slot. In the case we are doing a reorg, the parent is not the previous slot (it'll be N - 2 where N is the proposal slot)

Spec change:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, should_extend_payload does work at slots prior to previous, but I think it's still not quite the right choice because it prioritises the PTC rather than the attesters.

I think instead we should choose based on attestation weight. We could use:

self
    .canonical_head
    .fork_choice_read_lock()
    .get_canonical_payload_status(&re_org_parent_block, &self.spec)?

Comment on lines +557 to +558
// own execution block hash. We skip this when B will be re-orged, since the execution layer
// must never be told about a block that is about to be re-orged away.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not true in general (it is OK for the EL to know)

})
}

// TODO(gloas): wrong for Gloas, needs an update
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After Gloas we just shouldn't call this function (the ELs will handle the reorgs without this hack).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants