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

Add anchor hash checks to transaction build #951

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

palas
Copy link
Contributor

@palas palas commented Oct 22, 2024

Changelog

- description: |
    Added anchor data hash checks to `transaction build`
  type:
  - feature

Context

This is part of work related to solving #882. Each individual command has optional checks for verifying the hash matches the anchor data. But this PR adds a check to transaction build which combines the pieces and creates the actual transaction (so it is one of the last steps).

Related PRs

How to trust this PR

You can see the new test in this PR in cardano-testnet and the old tests updated to pass.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@palas palas self-assigned this Oct 22, 2024
@palas palas linked an issue Oct 22, 2024 that may be closed by this pull request
@palas palas force-pushed the hash-check-in-transaction-build branch 2 times, most recently from 15286a9 to 4da36e3 Compare October 24, 2024 11:37
@palas palas marked this pull request as ready for review October 24, 2024 14:29
Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

I think those hash checking bits should go to cardano-api. It feels like it's a reusable code, which we could expose to api users.

cardano-cli/src/Cardano/CLI/EraBased/HashChecking.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

I agree with @carbolymer . Those changes need to be made first.

cardano-cli/src/Cardano/CLI/EraBased/HashChecking.hs Outdated Show resolved Hide resolved
@palas palas force-pushed the hash-check-in-transaction-build branch from 78f05e0 to 5e8cbc0 Compare October 28, 2024 21:48
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM but I don't agree with AnchorDataFromCertificateException as a name. I made a comment on the relevant api PR.

@palas palas force-pushed the hash-check-in-transaction-build branch from 0564c0e to 114680d Compare October 31, 2024 11:35
@palas palas force-pushed the hash-check-in-transaction-build branch from 114680d to ca3eee5 Compare October 31, 2024 13:50
Co-authored-by: Mateusz Galazyn <[email protected]>
@palas palas force-pushed the hash-check-in-transaction-build branch from dbe20bf to d854349 Compare October 31, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] - Add File Hash Validation when Building Transaction
3 participants