Published on: 2014-07-15T13:56:20+00:00
In an email conversation, Mike from Plan99.net explains the concept of transactions in the blockchain. He mentions that all transactions in the blockchain exist on a single timeline, which is quantized into blocks. However, duplicated transactions can occur, and while Satoshi assumed that this could not happen due to everything being hash-based, it did happen at one point. To handle this, a rule change was implemented and there is now a BIP covering this new rule.Richard Moore raised a question regarding the validity of self-referencing transactions in an email sent on July 13, 2014. He asked if a transaction X whose input was X and had an output Y would result in Y being a valid UTXO (unspent transaction output) without being a generation transaction input. However, even if such a transaction did exist and was valid, it still couldn't create new coins. This is because the sum of the outputs must be less than or equal to the sum of the inputs, except for coinbase transactions. If a transaction spent its own output, the input would be completely used up by the output, leaving no balance for a second output.In the blockchain, all transactions are on a single timeline that is quantised into blocks. While it is a strict line, duplicated transactions can occur despite being hash-based. Satoshi assumed this would never happen, but duplicating coinbases is possible and was banned by a rule change. Older parts of the chain may still have this issue, so it is essential to be able to process them. A BIP exists to cover the new rule.In a conversation between Aaron Voisine and Jeff Garzik, it was confirmed that transactions (tx) must be ordered sequentially within a block and cannot reference themselves or later transactions in the same block. Garzik suggested adding a test to the suite to confirm the validity of a block containing self-referential transactions. Garzik is a Bitcoin core developer and open-source evangelist at BitPay Inc.A question was raised by Richard Moore regarding the validity of a situation he found in his Python implementation of bitcoind. Block #546's 4th transaction had its first input use its own block's 3rd transaction as an input. He asked if the 3rd transaction of a block could use the 4th transaction from the same block as an input, or are transactions processed strictly top to bottom. Additionally, he asked what would happen if a transaction was self-referencing, where a transaction X has an input of X and an output Y. Aaron Voisine responded that transactions have to be ordered sequentially within a block and since a transaction is referenced by its hash, it's practically impossible to make a self-referential transaction.A developer is working on the UTXO database for their Python implementation of bitcoind and has come across a situation they did not realize was valid. They are asking if the 3rd transaction of a block could use the 4th transaction from the same block as an input, or if transactions are processed strictly top to bottom. They also ask what would happen if a transaction was self-referencing and had an output Y, would Y be a new valid UTXO, without being a generation transaction input.
Updated on: 2023-08-01T09:42:04.398252+00:00