feat(db): add support for custom tables #13125
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 typeTableIter
which is an iterator over theTable
trait (the idea is to iterate over all the tables). To be precise, it's an iterator over aTableMetadata
trait which is an helper trait I created that is object safe, otherwise the compiler wouldn't let me create an iterator overTable
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 calledtable_set
, that is of typeTableSet::TableIter
. And also i've added theTableSet
trait to theFullNodeComponents
type. Not sure if this is the best approach.@mattsse