Setting up regression tests for bugs in the RPC methods is demanding. It often requires recreating a complicated blockchain state or loading a snapshot file, which can weigh several gigabytes. Most of the data in the snapshot will be unused, though, and if we trim out dead values, the snapshot files may be small enough to be included in the regression tests.
[ ] Write a Blockstore wrapper, which loads a CAR file, keeps track of which keys are accessed, and writes a minimal CAR file when dropped. This new CAR file can then be used in the regression test.
[ ] Create convenience functions for invoking RPC methods without spinning up a networked node.
[ ] Add regression test for #4446. This bug is reproducible with a 4GiB snapshot. If the required data can be reduced to a few KiB, it can be included in the repository.
If the required data is larger, perhaps we could move it to a submodule or a downloadable artefact. If all regression snapshots would take less than 1 GB it'd be already great.
Issue summary
Setting up regression tests for bugs in the RPC methods is demanding. It often requires recreating a complicated blockchain state or loading a snapshot file, which can weigh several gigabytes. Most of the data in the snapshot will be unused, though, and if we trim out dead values, the snapshot files may be small enough to be included in the regression tests.
Blockstore
wrapper, which loads a CAR file, keeps track of which keys are accessed, and writes a minimal CAR file when dropped. This new CAR file can then be used in the regression test.Other information and links