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

Merged
merged 4 commits into from
Nov 14, 2024

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 3 times, most recently from dbe20bf to d854349 Compare October 31, 2024 13:52
@palas palas added the next-update Needs a dependency to be updated to be merged label Nov 6, 2024
@palas palas force-pushed the hash-check-in-transaction-build branch from d854349 to 6d4ba3b Compare November 14, 2024 14:30
@palas palas enabled auto-merge November 14, 2024 14:31
@palas palas added this pull request to the merge queue Nov 14, 2024
Merged via the queue into master with commit a3166e9 Nov 14, 2024
24 of 25 checks passed
@palas palas deleted the hash-check-in-transaction-build branch November 14, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE next-update Needs a dependency to be updated to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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