Conversation
|
Do u have any benches on improvements here? |
Yes, key flattening is used to fetch all required headers all at once in the first stage (during fetching) which eliminates over-fetching as it used to be (i.e., headers were requested at different stages and were often re-fetched over and over again). For receipts and transactions, with this PR we only construct the transaction and receipt Merkle tree once per queried block instead of Without optimization: With optimization: The optimized run reduced the total test time from 55,130 s to 44,287 s—a roughly 19,7% improvement overall. Notably, one test improved by nearly 39%, while the others had around a 20% speed-up. Also, those optimizations are particularly effective to avoir over-fetching of Ethereum headers in several scenarios (i.e., typically when multiple keys access the same block). |
|
@codyx Can u run same benches as above and paste them here before merge? |
|
Pretty much identical, small delta due to network latency/randomness. |
EVM only: