silkworm
silkworm copied to clipboard
Performance tests
We already have a couple of somewhat niche performance tests in cmd/benchmark. However, it'd be great to have more representative performance tests that lie between microbenchmarks on one end and real execution of all main net blocks on the other. Something like executing a bunch (1000?) of some test blocks using MDBX. Ideally those test blocks should capture performance-salient features of recent main net blocks.
Such performance tests could be used, among other things, to prevent performance regressions.
My idea was to execute the last 1000 blocks of the ethereum blockchain, while tracking any accessed mdbx keys, and their value the first time they are accessed. This would provide a db sufficient to execute the last 1000 blocks. It would require some code change in silkworm of course, but it shouldn't be very hard to do. Then, we can package this state, and the 1000 blocks, as json files similar to ethereum tests. We'd need to update the command to run the test to use mdbx and not in_memory_state, but that shouldn't be too hard either.