IntersectMBO / IntersectMBO/ouroboros-network

`invariantSummary` fails validating era with same start and end

Open
#4,100 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
296
Forks
104
Avg merge
2d 10h
Merged PRs (30d)
4

Description

I am using `invariantSummary` to validate a given era history for a particular cardano network. I realize that this requires unsafely extracting the inner `Summary` from the `EraHistory` - but I believe that is irrelevant to this discussion.

https://github.com/input-output-hk/ouroboros-network/blob/7c55754386932f83010cffc87070238178b87a3f/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/History/Summary.hs#L425

This snippet suggests that EraHistory should not consist of "empty" eras. That is, eras should have an end that is strictly greater than the start. However, this seems conflicting to networks such as Cardano Preview Testnet. Which directly started in Alonzo, and has all previous eras set as "empty" eras.

Many private testnets also use similar empty eras. Is `invariantSummary` not meant for `EraHistory` at all? Is there a different function that properly lists/verifies the invariants expected by a Cardano network's `EraHistory`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.