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

Integrate write_to_db from State to provider #4620

Closed
rakita opened this issue Sep 15, 2023 · 3 comments
Closed

Integrate write_to_db from State to provider #4620

rakita opened this issue Sep 15, 2023 · 3 comments
Labels
A-db Related to the database C-debt Refactor of code section that is hard to understand or maintain S-stale This issue/PR is stale and will close with no further activity

Comments

@rakita
Copy link
Collaborator

rakita commented Sep 15, 2023

Comment from here: #3512 (comment)

the naming is very confusing to me, because writing reverts results in wiped storage, because this does not actually write anything and instead deletes?

I inherited this, can bikeshed a little on this, should be fruitful.

little history, this pattern was used when we still were not sure how to handle Provider and needed to decide on the pattern for how to write things to the database. At that point in time this was one of the promising paths that we had.

What we have decided and have now is @joshieDo had split the Provider with the traits so I think this should be moved there and have BundeStateProvider trait that will have commit_state(bundle: State) and commit_reverts(reverts:Reverts). This feels nicer imo and it shouldn't be a big change.

@rakita rakita added C-debt Refactor of code section that is hard to understand or maintain A-db Related to the database labels Sep 15, 2023
@alessandromazza98
Copy link
Contributor

alessandromazza98 commented Sep 21, 2023

Hi,
I would like to work on it but it's not clear for me what is the required work to be done.

I mean, what I understand from the comments is:

  • create a new BundleStateProvider trait (maybe inside state.rs file)
  • that trait should have commit_state(bundle: State) and commit_reverts(reverts: Reverts) functions.

But then I don't understand how to split the write_to_db function into this trait.

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 21 days with no activity.

@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label Oct 13, 2023
@github-actions
Copy link
Contributor

This issue was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database C-debt Refactor of code section that is hard to understand or maintain S-stale This issue/PR is stale and will close with no further activity
Projects
Archived in project
Development

No branches or pull requests

2 participants