First, thank you guys for taking the time to answer all my questions. I appreciate.
Now here's more.
What happen if a node is seeing t2 before t1, it should reject it right?
Yes.
Isn't that a problem? Looks like one should never try to use an UTXO even if coming from his own address...
Now that I think about it, there is actually other issues coming with that. What happen it the transaction id is altered before being integrated it in a block. That would basically make the second transaction invalid. What if there is not 2 transactions, but a dozens? I can't afford having a hundred transactions rejected just because the first one saw its transaction id altered.
Am I missing something or trying to use my own UTXO is a really bad idea?
Why must these outputs be assigned to the same address rather than multiple addresses? What do you gain?
Well, I would say that the less bitcoin addresses you have to manage, the better.
That's why you use wallet software. The wallet keeps track of the addresses for you, so you don't have to. As Satoshi recommended in the original whitepaper, a new bitcoin address should be used for EVERY transaction. When used properly, to maximize security and privacy, you should never receive more than one output at any address.
(You lose a fair amount).
Oh! Interesting... Would you mind providing more information on this part?
I'm not quite sure how using the same address will make me lose more money compared to using different addresses.
Or were you talking about money when saying "You lose a fair amount"?
You lose privacy and you lose a bit of security.
You mention twice the fact that using a different change address every time will result in a security improvement.
Could you provide more detail about this? Even though the privacy improvement is obvious to me, I don't see how doing it would improve security.
We could maybe imagine a system where having only one address to manage is a hard requirement?
I'm not sure what you are suggesting.
My bad I wasn't clear... I sometimes forget that people can't read my mind
My point was that a random user using the bitcoin client to manage his bitcoins is not the only way to use it (the client). We could imagine some systems built on top of the bitcoin client that have other requirements/restrictions than a classic user would have. One of this requirement could be the need of using only one bitcoin address.
So my question is, given a system that can only use one bitcoin address but have a constant flow of transactions to create/send, how to manage the fact that I can't safely use the change of one of my transaction until it's part of a block?
My solution was to implement some kind of "output fragmentation". But if a system has a "only one bitcoin address" requirement, the destination of the "output fragments" needs to be one address.
So I tried to create a transaction with several outputs sharing the same destination address and got rejected by bitcoind.
I was wondering why bitcoind was behaving like this given that having a transaction with 5 outputs to the same address or 5 outputs to different addresses is basically the same thing (from a transaction size/complexity standpoint).
Any ideas?