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

Ensure we don't confuse the double hash of a transaction with it's txid #656

Closed
ffranr opened this issue Nov 6, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working gRPC
Milestone

Comments

@ffranr
Copy link
Contributor

ffranr commented Nov 6, 2023

In some instances we've confused the double hash of a transaction with the transaction ID (txid). I think this is one example:

AnchorTxid: p.AnchorTx.TxHash(),

There may be others.

This confuses users because they can't use the "txid" as to look up a transaction in a mempool explorer. I think we should check our other uses of transaction hash and transaction ID.

I've created this PR in btcd to help make our code clearer: btcsuite/btcd#2055

@dstadulis
Copy link
Collaborator

itest might be the location for the text to be added

@dstadulis dstadulis moved this to 🔖 Ready in Taproot-Assets Project Board Nov 6, 2023
@ffranr ffranr added bug Something isn't working and removed security labels Nov 7, 2023
@ffranr ffranr added this to the v0.3.2 milestone Nov 7, 2023
@ffranr
Copy link
Contributor Author

ffranr commented Nov 7, 2023

If we are to use string for txid then we should probably rename SQL field chain_txns.txid to tx_hash. This field is a blob and we currently set it to the tx hash.

@ffranr
Copy link
Contributor Author

ffranr commented Nov 8, 2023

With the exception of the db change I mention in this comment, this issue will be redundant once we complete #654 .

@ffranr ffranr closed this as completed Nov 13, 2023
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Taproot-Assets Project Board Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gRPC
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants