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

transaction submit: print transaction hash #925

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Oct 4, 2024

Changelog

- description: |
    transaction submit: print transaction hash, like this:

    Transaction successfully submitted. Transaction hash is:
    456c614d5d547b7fe197a4d18fbb86e086cb9080594dabf9059adf08b00cf2bd

    Previously it was:

    Transaction successfully submitted.
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Fixes #896

How to trust this PR

We added a test in cardano-testnet: IntersectMBO/cardano-node#6003

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

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.

We shouldn't add more print statements here. A more principled approach would be to query the mempool to confirm that tx has been submitted and we can derive the txid from the tx itself. Why are we printing the txid here in the first place?

@smelc
Copy link
Contributor Author

smelc commented Oct 7, 2024

Why are we printing the txid here in the first place?

This PR is an answer to this ask by a user: #896. Design has been validated by @CarlosLopezDeLara.

@Jimbo4350
Copy link
Contributor

Why are we printing the txid here in the first place?

This PR is an answer to this ask by a user: #896. Design has been validated by @CarlosLopezDeLara.

Responded. We need to know what they intend to do with the information and that will inform what changes we should make, if any.

@CarlosLopezDeLara
Copy link
Contributor

I believe this feature adds good value. After submitting a transaction, it's common to share the transaction ID (txid) with the recipient or check it in a blockchain explorer. Including the txid in the output seems like a natural addition, as it's the key information needed for any follow-up.

Of course, one can compute the tx-id with cardano-cli conway transaction txid but printing it at submit makes the process more convenient and user-friendly without requiring additional steps to retrieve this essential detail.

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.

[FR] - QoL feature: display txhash on command line after submitting tx
3 participants