0

I understand that TxIDs are simply the double hash of tx data. But who creates them? I assume that all the nodes create the TXIDs of the transactions on their own and the TxIDs are not transferred along with the tx data. I am asking this because I want to create custom TxIDs (for some application) for the Txs and do not want the IDs to be double hash of the tx data. Is it possible to do so, or would the nodes then reject my tx.

0

You cannot do that.

The txid is not "chosen"; it is defined as the double-SHA256 of the transaction data (excluding the witness, when it is a segwit transactio ). Every node computes the txid independently.

  • Also worth mentioning -- All nodes will produce the same TXid as long as the transaction isn't "malleable". Same input in a hash function will always produce the same result. Custom/vanity TXids are technically possible if you brute force an OP_RETURN output but naturally can only contain A-F and 0-9. – KappaDev Nov 15 '18 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.