Bitcoin Forum

Other => Beginners & Help => Topic started by: ihadanny on July 18, 2011, 06:26:44 PM



Title: transactions in limbo
Post by: ihadanny on July 18, 2011, 06:26:44 PM
Hey,
What happens if I broadcast a new transaction to the network, but it only gets picked by miners that lost, and the winning miner for the next block did not receive my transaction?
How will it enter the block chain?


Title: Re: transactions in limbo
Post by: Captain Bitcoin on July 18, 2011, 06:28:33 PM
It definitely  will ... somehow (I'm noob, but I somehow I know it's not a problem).


Title: Re: transactions in limbo
Post by: theymos on July 18, 2011, 06:32:56 PM
Bitcoin will automatically rebroadcast it every 30 minutes or so until it gets into a block.


Title: Re: transactions in limbo
Post by: ihadanny on July 18, 2011, 07:36:51 PM
thanks! could you be more specific? who re-broadcasts the transactions every 30 minutes - my specific client? or everybody on the network aware of my transaction?
does a miner queue up all the unconfirmed transactions known to him when considering who will enter his next block according to their age?
if not, isn't it possible for my transaction to starve forever?
where can i see the code for this process?


Title: Re: transactions in limbo
Post by: Xephan on July 18, 2011, 07:55:15 PM
thanks! could you be more specific? who re-broadcasts the transactions every 30 minutes - my specific client? or everybody on the network aware of my transaction?
does a miner queue up all the unconfirmed transactions known to him when considering who will enter his next block according to their age?
if not, isn't it possible for my transaction to starve forever?
where can i see the code for this process?


That's why there's an option to pay a transaction fee, it will push your transaction up the queue. Although so far from my limited grand total of 3 transactions, this doesn't seem to be an issue. At least not at the moment when so many people are mining.


Title: Re: transactions in limbo
Post by: Stephen Gornick on July 18, 2011, 08:05:35 PM
thanks! could you be more specific? who re-broadcasts the transactions every 30 minutes - my specific client?

If the client knows it has spent a coin but doesn't see that spend transaction in any blocks received, it will resend that transaction.  It is done infrequently and randomly to avoid giving away that the client is the origin of those transactions.

where can i see the code for this process?
 - https://github.com/bitcoin/bitcoin/blob/master/src/wallet.cpp#L693

You can see which transactions at least one node knows about yet have not yet been included in a block:
  - http://www.bitcoincharts.com/bitcoin


Title: Re: transactions in limbo
Post by: Maged on July 18, 2011, 08:14:56 PM
In addition to the above...
thanks! could you be more specific? who re-broadcasts the transactions every 30 minutes - my specific client? or everybody on the network aware of my transaction?
If you happen to connect to a client that isn't aware of your transaction (or rejected it in the past), and they accept it, they will broadcast the transaction to anyone they are connected to when you rebroadcast the transaction.

does a miner queue up all the unconfirmed transactions known to him when considering who will enter his next block according to their age?
Pretty much. However, age is just one factor taken into account.

if not, isn't it possible for my transaction to starve forever?
Yes, that's possible. That's why the client has built-in checks to make sure that you pay enough fees so that this won't happen (at least, currently; all bets are off once most mining pools start modifying their clients).