CCF
CCF copied to clipboard
Full-state historical queries
Follow-up issue describing the remaining work from #1705.
We can currently run historical queries against the state written by a specific transaction, but not the entire state visible at a specific transaction. The latter is viable thanks to snapshots - it should be possible to recreate the entire state at an arbitrary point in history in reasonable time, rather than linear in the length of the ledger. This will require a new API on the historical state cache, tracking of a full-state request inside the cache, reconstruction of a full-state in the cache (perhaps with a snapshot + supporting ledger range, so we can quickly rollback/re-apply to get nearby states?), and a host-enclave ringbuffer API for retrieving full states. Additionally we need to see track what future features we want that require these full-state historical queries. We previously needed it to verify signatures from old nodes (allowing us to delete retired nodes from the KV), but the recent changes to historical receipt serving means that is no longer necessary.
Out of scope for 2.x, not necessary for current use cases.
There is still no immediate user requirement for this.