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

Introduce BuilderInternals abstraction layer #14592

Open
fgimenez opened this issue Feb 19, 2025 · 0 comments · May be fixed by #14686
Open

Introduce BuilderInternals abstraction layer #14592

fgimenez opened this issue Feb 19, 2025 · 0 comments · May be fixed by #14686
Assignees
Labels
A-sdk Related to reth's use as a library

Comments

@fgimenez
Copy link
Member

fgimenez commented Feb 19, 2025

NodeTypeWithComponents adds adapters as part of the build process; most of this might become simpler if we could combine generics into an additional trait. Instead of enforcing specific types in node builder fields we want to introduce an additional abstraction layer in the form of a BuilderInternals trait that represents the node builder state.

The builder operates on the adapter types. We can try to operate on traits and generics entirely, remove the fields with the adapter types and use instead a single adapter that implements the internal helper trait BuilderInternals.

  • trait BuilderInternals with associated types
  • BuilderComponentsAdapter as concrete struct
  • changes in NodeTypeWithComponents to have a single field BuilderComponentsAdapter
@fgimenez fgimenez added the A-sdk Related to reth's use as a library label Feb 19, 2025
@fgimenez fgimenez self-assigned this Feb 19, 2025
@fgimenez fgimenez moved this from Todo to In Progress in Reth Tracker Feb 20, 2025
@fgimenez fgimenez linked a pull request Feb 24, 2025 that will close this issue
@fgimenez fgimenez changed the title Introduce BuilderInternals trait Introduce BuilderInternals abstraction layer Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sdk Related to reth's use as a library
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant