Why a Bitcoin transaction that refers its own output as an input is computationally infeasible?

0

It was asked to us as in an assignment : Explain why it is computationally infeasible for anyone to generate a Bitcoin that refers its own output as an input. Inspite of searching throught various resources,I was unable to find a satisfactory answer to it.

Maulik Chaudhary

Posted 2018-08-26T14:41:49.947

Reputation: 11

If it is possible please post the exact assignment, because your question does not really make sense. How do you "generate" a bitcoin? What is the output or the input of a bitcoin? Are you talking about a transaction?thesys 2018-08-26T15:22:58.733

1Based on the title I think that's a typo, I think he meant "generate a bitcoin transaction ..."m1xolyd1an 2018-08-26T15:35:00.253

Yeah in the description it should be Bitcoin ‘transaction’Maulik Chaudhary 2018-08-26T16:11:04.273

Answers

1

A transaction input is an unspent transaction output from an existing transaction.

A transaction's output is the creation of an unspent transaction output from one or more inputs.

It's computationally infeasible because an input MUST exist before an output.

The tricky part is the terminology, input vs output. They are both outputs but in different states. Essentially everything is an output existing in the ever-changing Unspent Transaction Output (UTXO) set, inputs are simply referring to a previous UTXO. An output cannot exist without coming from an input, which can be validated all the way back to its coinbase transaction.

EDIT:
To dig a little further why it's technically not possible, when building a basic raw bitcoin transaction you need the transaction ID, and N out value of the input being used. Creating a transaction with an invalid or non-existent transaction ID would be rejected if broadcast to the network. Since we know an input must come before an output, one cannot refer to its input as its own output as the transaction ID would not exist yet.

How To Create a Raw Transaction

m1xolyd1an

Posted 2018-08-26T14:41:49.947

Reputation: 3 356