This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1 addition
and
85,464 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1 @@ | ||
This library is useful when you need to calculate Ethereum root hash many times on top of the same parent block using reth database. | ||
|
||
To use this, for each parent block: | ||
* create `SparseTrieSharedCache` | ||
* call `calculate_root_hash_with_sparse_trie` with the given cache, reth db view and execution outcome. | ||
|
||
|
||
### Speedup example. | ||
|
||
* block 20821340 | ||
* machine with 64 cores, Samsung 980Pro SSD | ||
|
||
We calculate root hash of some specific blocks in a loop using the same changes. | ||
This implemenation caches only disk access, all storage and main trie hashes are calculated fully on each iteration. | ||
|
||
``` | ||
reth parallel root hash: | ||
first iteraton : 220 ms | ||
next iterations: 140 ms (median, stable) | ||
eth-sparse-mpt: | ||
first iteraton : 225 ms | ||
next iterations: 5.1 ms (median, stable) | ||
``` | ||
This repository was moved to https://github.com/flashbots/rbuilder |
Oops, something went wrong.