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

feat(db): add support for custom tables #13125

Conversation

alessandromazza98
Copy link
Contributor

@alessandromazza98 alessandromazza98 commented Dec 4, 2024

Following #13104

With this pr the goal is to generalize the tables that are inserted into the reth database by modifying the TableSet trait.

That trait has a tables function that returns the associated type TableIter which is an iterator over the Table trait (the idea is to iterate over all the tables). To be precise, it's an iterator over a TableMetadata trait which is an helper trait I created that is object safe, otherwise the compiler wouldn't let me create an iterator over Table directly.

Right now i'm facing some compiler issues because I need to modify the node builder patter to account for the tables, but I thought it would be better to have some pointers if you could give me any, as I'm not 100% sure how you would like it to be.

Now I added to the NodeConfig a field called table_set, that is of type TableSet::TableIter. And also i've added the TableSet trait to the FullNodeComponents type. Not sure if this is the best approach.

@mattsse

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is a bit too invasive for the initial integration.

what we should do first is making it possible to initialize a db with a tableset, how we integrate this in the node trait we need to figure out separately, so let's focus on unblocking it first

@alessandromazza98
Copy link
Contributor Author

this is a bit too invasive for the initial integration.

what we should do first is making it possible to initialize a db with a tableset, how we integrate this in the node trait we need to figure out separately, so let's focus on unblocking it first

got it, closing this in favor of #13130

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