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

Increased the probability of generating the same hash more than once #4543

Merged
merged 3 commits into from
Aug 31, 2024

Conversation

Soupstraw
Copy link
Contributor

@Soupstraw Soupstraw commented Aug 12, 2024

Description

This is supposed to make it easier to find a counterexample for IntersectMBO/formal-ledger-specifications#514

I managed to catch the bug with the modified generators by making it more likely to generate the same credential in multiple places. I also created an ImpTest that uses a manually constructed state to reproduce the bug.

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

@Soupstraw Soupstraw changed the title Increased the frequency of generating the same hash more than once Increased the likelihood of generating the same hash more than once Aug 12, 2024
@Soupstraw Soupstraw changed the title Increased the likelihood of generating the same hash more than once Increased the probability of generating the same hash more than once Aug 13, 2024
@Soupstraw Soupstraw force-pushed the jj/generator-uniqueness branch 11 times, most recently from b263ca0 to 80cb218 Compare August 15, 2024 15:14
@Soupstraw Soupstraw force-pushed the jj/generator-uniqueness branch 6 times, most recently from e8466ee to 5aba417 Compare August 22, 2024 09:19
@Soupstraw Soupstraw marked this pull request as ready for review August 22, 2024 09:20
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

The message of the first commit seems totally unrelated to the content - i would squash it with the second one to avoid confusion.

Looks good to me otherwise, just a few questions.

@Soupstraw Soupstraw force-pushed the jj/generator-uniqueness branch 3 times, most recently from 3e308de to 9b3bc57 Compare August 23, 2024 10:40
@Soupstraw Soupstraw force-pushed the jj/generator-uniqueness branch 10 times, most recently from 6d4375d to 0256b0e Compare August 29, 2024 09:16
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.

Looks good. Needs a manual rebase, since there are some conflicts (likely due to SRP)

@Soupstraw Soupstraw force-pushed the jj/generator-uniqueness branch 3 times, most recently from a6d10e2 to 6e5001d Compare August 30, 2024 14:45
@lehins lehins enabled auto-merge August 30, 2024 17:37
@lehins lehins merged commit f288949 into master Aug 31, 2024
153 of 155 checks passed
@lehins lehins deleted the jj/generator-uniqueness branch August 31, 2024 01:23
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.

3 participants