Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail PParamsUpdate deserialization for invalid costmodels in Conway #3861

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

teodanciu
Copy link
Contributor

Description

Closes #3772

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • 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)
  • 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)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch from abd1c0c to c8874b4 Compare November 9, 2023 21:15
@teodanciu teodanciu requested review from a team as code owners November 9, 2023 21:22
@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch from 4cd69de to c8874b4 Compare November 9, 2023 21:36
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite what needed to be done, but close. Test cases are very nice! Thank you for that

@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch from c8874b4 to daeea08 Compare November 12, 2023 18:06
@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch 3 times, most recently from b41863e to 3d207b0 Compare November 12, 2023 18:11
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to update what sort of CostModel we generate fro PParamUpdates here: https://github.com/input-output-hk/cardano-ledger/blob/3d207b01dca78b231874ab27a2e016cf22753f86/eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Arbitrary.hs#L507

I suspect that is the reason for CI failures

@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch from 3d97e8e to 951a04f Compare November 13, 2023 14:58
@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch 2 times, most recently from 303b817 to 19a24a4 Compare November 14, 2023 09:54
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is beautiful!

I love the extensive test suite for this functionality!

All of the comments I made are mere suggestions.

@teodanciu teodanciu force-pushed the td/invalid-costmodels-for-known-languages branch from 19a24a4 to c7393c3 Compare November 14, 2023 16:02
@teodanciu teodanciu enabled auto-merge (rebase) November 14, 2023 16:58
@teodanciu teodanciu merged commit 77853ae into master Nov 14, 2023
9 of 28 checks passed
@iohk-bors iohk-bors bot deleted the td/invalid-costmodels-for-known-languages branch November 14, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent CostModels for known languages to be decoded in PParamsUpdate
2 participants