user323: Would a block containing a transaction with an identical hash as a previous transaction be considered valid? That is, if someone made a transaction for generating Bitcoins and solve two blocks with the same coinbase transaction, would the second block using that transaction valid?

user403: That's valid (and has happened) for coinbase transactions and transactions built off of coinbase transactions. Other than those strange cases, putting the same transaction in the chain twice isn't allowed.
Coinbase duplicates are only allowed due to an oversight. It will be corrected soon.

user-1: The transaction would be valid - there is nothing in the protocol that forbids this. 
This is also the cause of the "duplicate coinbase" bug in the Satoshi client which I discovered a few months ago. If you create a block with a duplicate coinbase and that block then becomes orphaned it will cause the both the original and duplicate tx to be removed from the database.

323: <p>Would a block containing a transaction with an identical hash as a previous transaction be considered valid? That is, if someone made a transaction for generating Bitcoins and solve two blocks with the same coinbase transaction, would the second block using that transaction valid?</p>
 403: <p>That's valid (and <a href="https://blockexplorer.com/block/00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721" rel="noreferrer">has happened</a>) for coinbase transactions and transactions built off of coinbase transactions. Other than those strange cases, putting the same transaction in the chain twice isn't allowed.</p>

<p>Coinbase duplicates are only allowed due to an oversight. It will be corrected soon.</p>
 -1: <p>The transaction would be valid - there is nothing in the protocol that forbids this. </p>

<p>This is also the cause of the "duplicate coinbase" bug in the Satoshi client which I discovered a few months ago. If you create a block with a duplicate coinbase and that block then becomes orphaned it will cause the both the original and duplicate tx to be removed from the database.</p>
