You are viewing a single comment's thread from:

RE: Mempool Consolidation Bitcoin UTXO: Unspent Transaction Output

in LeoFinance2 months ago

Is there any risk of replaying old transfers which are already committed to previous blocks if you reuse a Bitcoin address which you drained before? Or how are these replays prevented? Obviously one reason for draining the address is to prevent uncommitted old transactions from being added in the new blocks as these transactions don't have expiry time if I remember correctly.

Sort:  

It's also important to point out that this is impossible on Hive because operations on Hive do actually expire quite quickly (after like a couple hours). This is due to the ref_blocknum variables that all Hive operations have.

I remember reading about the time limit on Hive transactions and I'm confused when anyone mentions cold wallets and offline signing of transactions. Apparently there is plenty of time for moving the transaction in and out of the signing station.

https://bitcoin.stackexchange.com/questions/9709/do-unconfirmed-transactions-expire#:~:text=Oh%2C%20and%20I%20forgot%20the,but%20that%20is%20really%20unlikely.

Oh, and I forgot the most important part: transactions on Bitcoin (tx frames in the protocol) don't have a 'time' field, which means that transaction expiration can't be a feature of Bitcoin.

To summarize: yes, the transaction can expire, but that is really unlikely.

It looks like you're sort of right.

Someone could troll you by saving an expired operation and rebroadcasting it to the network later.

However, none of those UTXOs would be spendable if they've already been spent.
Again because it's not an account based system the pubkey itself is irrelevant.
Only the UTXO matters in this regard.

Therefore if you consolidated your UTXOs you could use the same pubkey and this would create a new UTXO that was completely unspendable by an expired transaction (because that expired transaction points to a spent TX). Basically if you spend that UTXO it can't be spent again which is why this model is so important in the first place.

I mixed up UTXO and the unique output addresses and assumed that one could just fill an input address to the same balance as on a previous drain and replay the old transaction from the ledger. It seems that the implementation is much better thought out and that aligns with the reality as we would have seen much news about those replay attacks already if it was that simple.