Skip to content

Move get_block_root_node to FCR - #39

Merged
mkalinin merged 4 commits into
fork-choice-refactorfrom
fc-refactor2
May 22, 2026
Merged

Move get_block_root_node to FCR#39
mkalinin merged 4 commits into
fork-choice-refactorfrom
fc-refactor2

Conversation

@mkalinin

Copy link
Copy Markdown
Owner

Moves get_block_root_node definition from FC spec to the FCR spec.

  • In the FCR spec, tests and test helpers get_block_root_node is used
  • In FC tests and test helpers get_fork_choice_node function is used which semantics is a superset of get_block_root_node semantics

cc @brech1

Comment thread specs/phase0/fast-confirmation.md Outdated
version.

```python
def get_block_root_node(block_root: Root) -> ForkChoiceNode:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is great!

I would remove the note and rename to get_node_for_root. In this scenario, I would make sure this replaces inline constructions for default payloads in gloas

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Done!

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

lmk, if this now looks good to you. I personally think it’s a better way of handling default payload status than how it is done in the original PR. Also, get_node_for_root is a much better name to me

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM! Thank you for the changes

@mkalinin
mkalinin merged commit 9029d71 into fork-choice-refactor May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants