Time Interpreter / Slotting Arithmetic #267
KtorZ
started this conversation in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe your idea, in simple words.
The local-state-query protocol provides a
GetInterpreter
query which returns an interface for running various queries regarding time and slotting arithmetic on Cardano. Behind the scene, the interpreter is constructed from a list of epoch summaries objects, which are also transferred over the wire. This is also how Ogmios currently provides support for this query (callederaSummaries
in Ogmios).While already useful, it does not however provide the full power of the internal
TimeInterpreter
abstraction from ouroboros-network. This abstraction is used to perform queries for converting times to slot, epochs and the like. It is not possible to transfer such abstraction over the wire, but, it may possible to turn it into a mini-protocol and offer a simple query/response pattern to clients.Note that, these could be supported via both WebSocket and plain HTTP?
Why is it a good idea?
There's a lot of pitfalls and rooms for error in the time interpretation of the chain. Since a lot of this intelligence has already been put into the Haskell
TimeInterpreter
, providing support for it via Ogmios could be extremely useful for those looking into slot arithmetic, especially across eras. In particular, the following queries are currently available from theTimeInterpreter
:Are you willing to work on it yourself?
Yes.
Beta Was this translation helpful? Give feedback.
All reactions