Safe API - Registers

How to History?

I created the above register_inspect example with the intention of showing the Register history which is advertised as a feature of the MerkleReg data type used to create the Safe Register data types but have been unable to see how to do this in a generic way. Hence it now inspects structure rather than shows history.

I’ve concluded that for all but trivial cases, such as a single value per Register being overwritten repeatedly, there is no way to provide a history without including logic specific to a particular configuration.

So for many real world use cases the application needs to provide a way to navigate the history within the Register, a bit like leaving breadcrumbs.

I’d like to be contradicted on this and shown a generic way to access history of any Register. So if anyone familiar with the ClientRegister for example, can explain how to extract history from say a tree structure (like a filesystem) without seeding the root nodes to give access to the ‘trail’ I’d be very interested.

Without ‘seeding’ the Register with a trail I don’t see how to access history for application specific purposes using a generic high level register history API.

To avoid limiting applications this may also mean leaving the MerkleReg exposed, as was necessary for me to be able to create the above example.

Can you comment @Anselme? Anyone else who’s looked at Safe Registers or MerkleReg?

2 Likes