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

Mismatch for Conway predicate failures #4666

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented Oct 7, 2024

Description

This is the second (Conway) part of #4619.

Checklist

  • 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)
  • 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

@aniketd aniketd changed the title Aniketd/mismatch for conway Mismatch for Conway predicate failures Oct 7, 2024
@aniketd aniketd force-pushed the aniketd/mismatch-type-for-predicate-failures branch from 87dba8f to a6572dd Compare October 8, 2024 10:13
Base automatically changed from aniketd/mismatch-type-for-predicate-failures to master October 8, 2024 12:26
@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch 3 times, most recently from 7e89bac to 99cee0e Compare October 10, 2024 19:53
@aniketd aniketd marked this pull request as ready for review October 10, 2024 19:53
@aniketd aniketd requested a review from a team as a code owner October 10, 2024 19:53
@aniketd aniketd requested review from teodanciu and lehins October 10, 2024 19:53
Copy link
Contributor

@neilmayhew neilmayhew left a comment

Choose a reason for hiding this comment

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

Very nice improvement! Your handling of the protocol encoding variations is neat, too.

My suggestions are mostly cosmetic.

However, there's a more substantial one at the end. It doesn't affect the functionality, but it does affect the readability.

I've also suggested a few additional places where Mismatch could be used.

@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch from 99cee0e to 0ff6cfb Compare October 14, 2024 14:49
Copy link
Collaborator

@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.

All my comments in BBODY rule module apply to all other rules affected by this PR.

@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch 2 times, most recently from 0437261 to 3f8dd45 Compare October 17, 2024 15:22
@aniketd aniketd requested review from lehins and TimSheard October 17, 2024 15:28
@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch from 3f8dd45 to c47d53d Compare October 17, 2024 15:37
Copy link
Contributor

@TimSheard TimSheard left a comment

Choose a reason for hiding this comment

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

OK I only commented on the Coders parts.
The extra constraint should not be there. We should try hrd to get rid of it.

Copy link
Collaborator

@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 looking great!
A few more simplifications and improvements and it will ready to go

@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch 3 times, most recently from 34b1182 to e8ec767 Compare October 18, 2024 12:05
@aniketd aniketd requested review from TimSheard and lehins October 18, 2024 12:07
@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch from 44395aa to 1e058b9 Compare October 19, 2024 13:51
@aniketd aniketd requested a review from teodanciu October 19, 2024 13:51
@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch from 1e058b9 to cb9eed2 Compare October 22, 2024 13:53
@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch from cb9eed2 to 0d410a1 Compare October 23, 2024 11:36
@aniketd aniketd requested a review from lehins October 23, 2024 14:12
Copy link
Collaborator

@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.

There is one change that is still necessary that I overlooked and @teodanciu caught. It needs to be fixed. Otherwise it is ready to be merged.

@aniketd aniketd force-pushed the aniketd/mismatch-for-conway branch 4 times, most recently from 6cb0bdf to 20c3fab Compare October 24, 2024 13:23
Also, add {Enc,Dec}CBORGroup instances for Mismatch
Rules:
- BBODY
- GOV
- GOVCERT
- LEDGER
- UTXO
- UTXOW
@lehins lehins force-pushed the aniketd/mismatch-for-conway branch from 20c3fab to 7ab118d Compare October 24, 2024 14:15
@lehins lehins enabled auto-merge October 24, 2024 14:15
@lehins lehins merged commit 21cc2be into master Oct 24, 2024
151 of 154 checks passed
@lehins lehins deleted the aniketd/mismatch-for-conway branch October 24, 2024 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.

5 participants