Introduce a new method on NodeStore that lists the currently valid checkpoints:
The NodeStore interface already has methods to create and release a checkpoint, as well as retrieving the root state for a checkpoint, but it is currently not possible to list checkpoints. Using the checkpoint facility as designed right now can lead to a situation where a checkpoint is orphaned. That is, some code created a checkpoint but was unable to store the reference because the system e.g. crashed. Orphaned checkpoints can affect garbage collection because they prevent it from cleaning up old data. Right now, this requires users to run tools like oak-run to get rid of those checkpoints.
As suggested in
OAK-4826, client code should be able to automatically clean up unused checkpoints. This requires a method to list existing checkpoints.