Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] DAS friendly lookup sync #5496

Closed
wants to merge 13 commits into from

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Mar 27, 2024

Combines two to simplify block lookup code:

1. Remove child_components, cache them inside the existing request State enum

Add a new intermediary state where a single block request state can be paused if its parent is unknown, and resumed once the parent is processed.

2. Re-use single lookups to do parent requests

Parent lookups are cached separately to bound:

  • max concurrent parent lookup branches
  • max depth of parent lookup branches

We can iterate the existing single block lookups and enforce those conditions

Point 1. unlocks this simplification, adding some more logic in the known parent path to:

  • Filter failed chains
  • Enforce the parent lookup branches bounds
  • Re-process paused lookups when their parent is known

We lose a slight optimization of processing the pending chain of unknown parent blocks as a batch, but this shouldn't make a big different IMO, but please tell me otherwise.


The simplification is quite big, preview this over to @realbigsean who really dig with it.

Next steps

  • Enforce the parent lookup branches bounds
  • Better name for the Action enum?
  • Update tests

@dapplion dapplion changed the base branch from stable to unstable March 27, 2024 16:59
@dapplion
Copy link
Collaborator Author

Implemented in

@dapplion dapplion closed this May 15, 2024
@dapplion dapplion deleted the das-friendly-lookup-sync branch January 24, 2025 18:11
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