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.
[ ] Commit sequence broadly makes sense and commits have useful messages
[ ] New tests are added if needed and existing tests are updated
[ ] All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
New section is never added with the code changes. (See RELEASING.md)
[ ] When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
versioning process.
[ ] The version bounds in .cabal files for all affected packages are updated.
If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
[x] Code is formatted with fourmolu (use scripts/fourmolize.sh)
[x] Cabal files are formatted (use scripts/cabal-format.sh)
[x] hie.yaml has been updated (use scripts/gen-hie.sh)
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
CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md).cabal
andCHANGELOG.md
files according to the versioning process..cabal
files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)