Description
From @stormer78
There are kind of two scenario's I see:
- Regular resolution of the DID using the latest published version - likely to be the highest use case by high frequency services like messaging systems etc.
- Historical lookups for issued data from the past (critical to support, likely lowers in frequency over the years).
Right now webvh has the inverse problem. The oldest LogEntries (which are likely to be lowest frequency over time) are the cheapest to resolve. The latest version which is likely to be highest frequency has the highest cost to resolve (cost being CPU/time). Especially on mobile devices or wearables.
Ideally a shortcut for the latest version that provides the option to do a quick resolution with least amount of checking would be best.
In some ways the witnesses can help if we apply the logic that for a witness to provide proof, they are doing a full end-to-end validation and is that enough that if the latest LogEntry is correctly witnessed, check the integrity of the newest Entry and Proofs - and it is ok to use.
If you want to do a full validation, feel free, but it is not always required. The more the heavy lifting can be shifted back to the controller, witnesses and watchers - the better. Client side should be as cheap as we can make it (if possible).
TTL will help with caching this, but that initial resolution is high.