Skip to content

Conversation

@Soupstraw
Copy link
Contributor

@Soupstraw Soupstraw commented Jul 16, 2025

Description

This PR adds a new ScriptIntegrityHashMismatch predicate failure to Conway's UTXOW rule. The new predicate failure is similar to the old PPViewHashesDontMatch failure, but it also contains the bytestring that was hashed by the node in order to compute the script integrity hash. This new predicate failure will be thrown instead of the old one starting from protocol version 11.

close #4517

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@Soupstraw Soupstraw changed the title Added an improved PPViewHashesDontMatch predicate failure to Conway Add an improved PPViewHashesDontMatch predicate failure to Conway Jul 16, 2025
@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch 5 times, most recently from 6ca8034 to d3b33ca Compare July 17, 2025 11:26
@Soupstraw Soupstraw marked this pull request as ready for review July 17, 2025 11:30
@Soupstraw Soupstraw requested a review from a team as a code owner July 17, 2025 11:30
@Soupstraw Soupstraw requested a review from lehins July 17, 2025 11:35
@Soupstraw Soupstraw changed the title Add an improved PPViewHashesDontMatch predicate failure to Conway Replace PPViewHashesDontMatch with ScriptIntegrityHashMismatch starting from PV 11 Jul 17, 2025
@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch 4 times, most recently from 597064e to cbc948b Compare July 17, 2025 11:43
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.

Overall the idea is the right one, but there is a problem with reporting the bytes, since they can be SNothing.

Also by doing this implementation in Alonzo era, we'll be able to simplify it after the hard fork and just pretend like it was always done this way.

@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch 5 times, most recently from c5f21b8 to 91fc55c Compare July 21, 2025 15:42
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 great. Except there is a slight performance regression which needs a fix.

@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch 7 times, most recently from 82eeaf9 to 0e05796 Compare July 24, 2025 10:33
@Soupstraw Soupstraw requested a review from lehins July 24, 2025 10:38
@Soupstraw Soupstraw enabled auto-merge (rebase) July 24, 2025 10:38
@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch 3 times, most recently from 812d2a4 to 35f22c2 Compare July 28, 2025 15:42
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.

Very nice improvement! Thank you!
Only some minor suggestions about naming, changelogs and such

@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch 3 times, most recently from ae44196 to 52739e9 Compare July 29, 2025 09:47
Co-authored-by: Alexey Kuleshevich <[email protected]>
@Soupstraw Soupstraw force-pushed the jj/ppviewhashes-predfailure branch from 52739e9 to a9b87ed Compare July 29, 2025 10:09
@Soupstraw Soupstraw merged commit 5a975d9 into master Jul 29, 2025
128 of 131 checks passed
@Soupstraw Soupstraw deleted the jj/ppviewhashes-predfailure branch July 29, 2025 15: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.

Improve PPViewHashesDontMatch to include the data for the expected hash

3 participants