Skip to content

Cumulus: Simplify parent search for block-building#10998

Merged
skunert merged 18 commits intomasterfrom
skunert/find-parents-remove-aligned-with-pending
Feb 18, 2026
Merged

Cumulus: Simplify parent search for block-building#10998
skunert merged 18 commits intomasterfrom
skunert/find-parents-remove-aligned-with-pending

Conversation

@skunert
Copy link
Copy Markdown
Contributor

@skunert skunert commented Feb 5, 2026

While reviewing #10973 I found once more that our parent search is totally overengineered:

  • It offers the option to search branches that do not contain the pending block -> These branches can never be taken
  • It returns a list of potential parents -> Nobody uses the list, we only care about the latest block that we should build on

By eliminating these two annoyances, the code is a lot more simple and easier to follow. There are still some defensive checks that are not strictly necessary, but does not hurt to keep them.

In summary, the mental model is: Build on the latest descendant of the pending block that is still inside the relay parent ancestry. If no pending block is available, use the included block in its place.

@skunert skunert added the T0-node This PR/Issue is related to the topic “node”. label Feb 5, 2026
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Feb 5, 2026

/cmd prdoc --audience node_dev --bump major

@skunert skunert marked this pull request as ready for review February 5, 2026 11:14
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Feb 5, 2026

/cmd fmt

@skunert skunert requested a review from a team February 6, 2026 08:45
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Feb 18, 2026

/cmd fmt

@skunert skunert added this pull request to the merge queue Feb 18, 2026
Merged via the queue into master with commit 37c9bed Feb 18, 2026
222 of 226 checks passed
@skunert skunert deleted the skunert/find-parents-remove-aligned-with-pending branch February 18, 2026 18:53
lexnv added a commit that referenced this pull request Mar 6, 2026
This reverts commit 37c9bed.

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants