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

Extract reth-trie-types from reth-trie #8514

Closed
mattsse opened this issue May 30, 2024 · 4 comments
Closed

Extract reth-trie-types from reth-trie #8514

mattsse opened this issue May 30, 2024 · 4 comments
Assignees
Labels
A-db Related to the database C-debt Refactor of code section that is hard to understand or maintain

Comments

@mattsse
Copy link
Collaborator

mattsse commented May 30, 2024

Describe the feature

reth-trie mixes db implementations with type definitions, which is problematic if we want to use these types in evm for different targets (risc, maybe even no_std).

hence we should extract the core types to a standalone crate, primarily the TrieUpdates type

currently this type has functions that make use of db:

pub fn flush(self, tx: &(impl DbTx + DbTxMut)) -> Result<(), reth_db::DatabaseError> {

or

pub fn finalize_storage_updates<C>(
&mut self,
hashed_address: B256,
walker: TrieWalker<C>,
hash_builder: HashBuilder,
) {

The triewalker functions could be inverted and implemented on triewalker instead,
for the flush function we could use a tmp wrapper type instead

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels May 30, 2024
@mattsse mattsse added C-debt Refactor of code section that is hard to understand or maintain A-db Related to the database and removed S-needs-triage This issue needs to be labelled labels May 30, 2024
@emhane emhane removed the C-enhancement New feature or request label May 31, 2024
@RomanHodulak
Copy link
Contributor

I'd love to take this

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 Jun 26, 2024
Copy link
Contributor

github-actions bot commented Jul 5, 2024

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 Jul 5, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Jul 5, 2024
@shekhirin shekhirin reopened this Jul 31, 2024
@shekhirin shekhirin removed the S-stale This issue/PR is stale and will close with no further activity label Jul 31, 2024
@shekhirin shekhirin self-assigned this Jul 31, 2024
@shekhirin shekhirin assigned RomanHodulak and unassigned shekhirin Aug 1, 2024
@RomanHodulak
Copy link
Contributor

Solved by #10008

Can be closed

@mattsse mattsse closed this as completed Aug 8, 2024
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
Projects
Archived in project
4 participants