Open
Description
When crossing an era boundary while using --trace-ledger
, db-analyser crashes due to
To see why, consider the signature of the offending function (that is used in emitTraces
):
with
where
wlsState{Before,After}
are ledger states of the same block/era, but when comparing the ledger states just before/after an era transition, that is not the case.
The minimum goal of this ticket is to make sure that we don't crash on era transitions.
- The straightforward approach would be to return
Maybe a
fromanalyseWithLedgerState
and emit no traces on era transitions. - Going further slightly, we might want to modify the
emitTraces
interface slightly such that one can also compare ledger states from different eras to e.g. still be able to mark the start of an epoch at the point of the era transition. Conceptually, that would involve providing functionsWithLedgerState blk blk' -> a
for all subsequent pairs of blocks inCardanoEras
, cf. the existingInPairs
combinator.