What sort of guarantees are made by the ledger API (and underlying implementations) regarding access to historical ledger events?
- Are historical ledger events generally available? (The gRPC API does have a
beginoffset that looks like it enables a caller to request events starting from a point in the past: Ledger API Reference — Daml SDK 1.14.0 documentation )
- The HTTP-JSON API has an
offsetparameter to stream queries that looks intended for use to pick a stream up where it left off. How long should an
offsetbe considered valid? (Can they be retained for hours/days/weeks/months and still be used?)
- Is there a ledger API (or JSON API) mechanism for fetching the ACS as it was at a specific ledger offset?
- Is there a retention period after which a ledger event might not available via the ledger API? (Can this be configured?)
At the top of this question, I’m deliberately vague about whether or not I am referring to the ledger API or a specific implementation. I’d be interested in thoughts regarding how much of the answer is driven by the ledger API specification and how much of it might vary from one implementation to another.
(I’m asking all of this in the contest of historical reporting. Imagine it’s July, and I’m interested in generating a report summarizing ledger activity that occurred in June. If I know
end for June, access to historical events from the ledger API would make it possible to stream just a view of what occurred in that month. )