silkworm icon indicating copy to clipboard operation
silkworm copied to clipboard

Performance tests

Open yperbasis opened this issue 3 years ago • 1 comments

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.

yperbasis avatar Feb 13 '22 15:02 yperbasis

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.

greg7mdp avatar Feb 13 '22 15:02 greg7mdp