-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Erigon 3: Prune canonical markers -
CanonicalHash
, HeaderNumber
f…
…rom chaindata (#11634) We prune `CanonicalHash` and `HeaderNumber ` in `chaindata`. this leads to a -99% in these 2 tables and reduce their total size to 40 pages in TOTAL (from >500k pages). Benchmarks: ``` Total time taken to query blocks from 1000000 to 3000000: 1720.1410 seconds (OLD) Total time taken to query blocks from 1000000 to 3000000: 1747.4729 seconds (New) Amortized delta cost: 0.1ms/req ``` Is the RPC working for those ranges? Yes. ## How does it work? Query canonical hash from snapshots by: `viewHeaderByNumber` -> `header.Hash()` if db hit is missed Query header number from snapshots by: `viewHeaderByHash` -> `header.Num64` if db hit is missed
- Loading branch information
1 parent
6c387bf
commit c78450c
Showing
48 changed files
with
1,050 additions
and
613 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.