erigontech / erigontech/silkworm
Improve unit test support for snapshots
- Dominant language
- C++
- Stars
- 318
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
We use some sample header/body/transaction snapshots for unit testing, which were generated without any specific automation some time ago and have a slightly custom format, in the sense they start at block `1'500'012` and contain just 2 blocks. See [here](https://github.com/erigontech/silkworm/blob/master/silkworm/db/test_util/temp_snapshots.hpp) for more details.
A better overall solution would be:
- introduce some subcommand in `snapshots` command-line utility to generate (short) sample snapshots
- use some other command-line utility (maybe new `embed_binary`?) to generate C++ code for sample snapshots
- regenerate sample snapshots without custom start point (i.e. add initial empty blocks)
- remove `IndexBuilder::set_base_data_id` as it becomes unnecessary
See also https://github.com/erigontech/silkworm/pull/2419#discussion_r1801275577
Contributor guide
Assessment
This issue has not been assessed yet.