or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Ethereum mainnet - MPT analysis
Context
Previously, we’ve explored which are the cryptographic primitive's differences and measured their overhead; for more information, see:
Apart from comparing MPT and VKT cryptographic primitives, it’s also worth looking at their shapes since the number of cryptographic operation in each case depend on the shape (e.g: depth) of the trees.
We’ll analyze the:
What’s the approach for these results?
The results described in this document correspond to Ethereum mainnet at the end of November 2022:
How do I reproduce these results?
The tool to generate these results is open-source and part of the verkle-vs-patricia repo, particularly the
analytics
tool. Anyone having a synced Geth node can run it and must see almost the same results (since these tree traits evolve slowly).The tool generates a preliminary set of results in the standard output every couple of seconds, and when the program is interrupted (Ctrl+C), it dumps multiple
.csv
files with the results. The repository also has Gnuplot files to transform the CSV files into plots. See the README for more instructions.The
.csv
results and the plot files will be shown in the following sections.State Trie
The State Trie is the main trie that holds the information for every Ethereum address (EOAs and SCs).
Plaintext report
Let’s explain the above report so we can get used to the nomenclature:
Walked XXX (EOA + SC) accounts
indicate how many leaf nodes of the trie were walked (depth-first search) to generate the report results.State Trie - Depths
, shows a histogram with the % of leaf nodes that have a particular depth.<depth>: XX.XX% (Y)
means thatXX.XX%
of scanned leaves (a total ofY
leaves), had a depth of<depth>
.Path types
, show a histogram with the % of path types discovered in each branch.B
means a Branch node,E
means an Extension Node, andL
means a Leaf nodeB.B.B.E.L: 42.42% (1234)
indicates that42.42%
of leaves had a branch structure composed of the first three Branch nodes, then a single Extension node, and finally a Leaf nodePlots
This section contains graphical representations of the above plaintext reports.
Storage Tries
While walking the State Trie, whenever we touched a leaf corresponding to an SC account, we jumped into the Storage Trie to gather metrics.
Plaintext report
The tail of
Number of used slots
is pretty long, so it’s truncated.Plots
Appendix
After reading the report Guillaume was interested in knowing the average length of extension nodes.
Here're the results for the State Trie: