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

chore(trie): replace ParallelStateRoot with AsyncStateRoot #11213

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

fgimenez
Copy link
Member

In #10927 tokio::sync::oneshot channels used for synchronization in AsyncStateRoot were replaced by sync versions because we were awaiting results in order and the overhead of setting up and using the tokio runtime was not giving any benefit. With these changes, AsyncStateRoot is no longer async.

Given that ParallelStateRoot is not used and that AsyncStateRoot is an optimization over it keeping its parallel nature, in this PR the current ParallelStateRoot is removed, and AsyncStateRoot is renamed to ParallelStateRoot.

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.

nice

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

lgtm pending feature removal

@fgimenez fgimenez force-pushed the fgimenez/rename-async-parallel-state-root branch from 12365f7 to 456db3b Compare September 26, 2024 07:35
@fgimenez fgimenez requested a review from rakita as a code owner September 26, 2024 07:35
@fgimenez fgimenez enabled auto-merge September 26, 2024 07:37
@fgimenez fgimenez disabled auto-merge September 26, 2024 07:51
@fgimenez fgimenez enabled auto-merge September 26, 2024 07:51
@fgimenez fgimenez force-pushed the fgimenez/rename-async-parallel-state-root branch from 456db3b to a55dc13 Compare September 26, 2024 08:12
@fgimenez fgimenez added the A-trie Related to Merkle Patricia Trie implementation label Sep 26, 2024
@fgimenez fgimenez added this pull request to the merge queue Sep 26, 2024
Merged via the queue into main with commit 42d2e48 Sep 26, 2024
36 checks passed
@fgimenez fgimenez deleted the fgimenez/rename-async-parallel-state-root branch September 26, 2024 08:39
@ZanCorDX ZanCorDX mentioned this pull request Nov 27, 2024
3 tasks
ZanCorDX added a commit to flashbots/rbuilder that referenced this pull request Nov 28, 2024
## 📝 Summary

- Dependency hell.			
- In lots of generics (eg:ProviderFactory) the need of DB+Spec was
replaced for NodeTypesWithDB.
- DatabaseProviderFactory DB now is asociated type and have 2 more. In
lots of places now we need Provider: BlockReader.
- Lots of types moved to alloy_primitives.
- encode/decode_enveloped now are XXX_2718 with minimal changes.
- New alloy TrieNode::EmptyRoot .
- CachedReads moved to reth::revm::cached.
- AsyncStateRoot replaced by ParallelStateRoot
(paradigmxyz/reth#11213).
- Some HashMap/Set changed to custom versions (eg:
alloy_primitives::map::HashMap).
- TransactionPool needs stronger restrictions on Transaction.
- Updated block finalization (pectra).
- Pectra relay submition.

## 💡 Motivation and Context

- We needed this for Pectra and to be up to date with reth.
- My life was going so well that I needed something to balance it so I
did this boring PR.

## ✅ I have completed the following steps:

* [X] Run `make lint`
* [X] Run `make test`
* [ ] Added tests (if applicable)

---------

Co-authored-by: Liam Aharon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants