IntersectMBO / ouroboros-consensus

Implementation of a Consensus Layer for the Ouroboros family of protocols
https://ouroboros-consensus.cardano.intersectmbo.org
Apache License 2.0
30 stars 21 forks source link

How could we test that era transitions are correctly configured? #542

Open nfrisby opened 1 year ago

nfrisby commented 1 year ago

The Conway PR was misconfigured until we got an eleventh-hour review from Alexei: https://github.com/input-output-hk/ouroboros-network/pull/3971#discussion_r1091994799

Is there a way we could have written a test to catch that?

abailly-iohk commented 1 year ago

Internally, I don't see any because the version number is defined externally (in ledger?). A "simple" integration test moving a chain through this era might have?

abailly-iohk commented 1 year ago

This looks like some kind of "contract testing", in the sense of producer-consumer contract. In the enterprise world there exists the concept of Consumer-driven Contract Testing whereby the consumer side of an API exposes some "artefact" (eg. a binary, or test vectors, or whatever) that can be used by the producer side to check changes to interfaces do not break any existing contract. Perhaps we could some inspiration here?