Replace EpochInfo Identity
by EpochInfo (Except PastHorizonException)
#2126
Labels
EpochInfo Identity
by EpochInfo (Except PastHorizonException)
#2126
The Shelley ledger as well as the
TPraos
implementation require anEpochInfo Identity
in their config. Such a thing is really an impossibility: theEpochInfo
changes as the ledger changes. The hard fork combinator alleviates this problem to some extent by introducing the concept of a partial config, and constructing the rightEpochInfo
on the fly. However, theEpochInfo
that we pass to the ledger and toTPraos
nonetheless has a limited range, and any attempt to use it beyond that range will result in a pure exception. It would be much better if theEpochInfo
we construct as typeEpochInfo (Except PastHorizonException)
, so that an attempt to look past that horizon will result in an error we can more reliably catch.The changes consensus side are trivial (in fact, we have to do extra work to turn these exceptions into pure exceptions); the more laborious part is updating the
TPraos
and Shelley ledger implementations.That said, this is mostly to aid debugging: any attempt to look past the horizon would be a bug.
The text was updated successfully, but these errors were encountered: