IntersectMBO / cardano-ledger

The ledger implementation and specifications of the Cardano blockchain.
Apache License 2.0
262 stars 155 forks source link

Better bootstrap-aware Imp tests #4713

Closed teodanciu closed 1 month ago

teodanciu commented 1 month ago

This PR is enabling conway Imp tests to run with both protocol version 9 and 10.

Instead of having tests grouped in functions with respect to whether they should be run for both versions, each test is individually specifying whether it should run only for version 10 , in case there are operations involved that are disallowed in version 9.

Where I felt it made sense, i have ran them for both versions, checking that the expected DisallowedProposalDuringBootstrap / DisallowedVotesDuringBootstrap predicate failure is returned - I chose to this where i thought that the test is more about submission of proposals, rather than the logic involving disallowed proposals.

The PR contains a few other improvements - extracting some commonly used logic to functions, moving a few tests where it seems like they would make more sense, removing some that didn't make sense to me.

Because of this moving around of code, I preferred to keep the commits like this for the moment - in order to make reviewing easier. To avoid all this noise in master, it would be better to squash at least all the commits that are enabling ImpTests for both versions - there is no point to have one commit per file in the end.

Closes https://github.com/IntersectMBO/cardano-ledger/issues/4703

Description

Checklist