Custom transaction IDs

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.

archita

Posted 2018-11-14T18:51:47.573

Reputation: 13

Answers

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.

Pieter Wuille

Posted 2018-11-14T18:51:47.573

Reputation: 54 032

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 2018-11-15T00:20:15.037