Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: robwat on January 04, 2011, 05:30:59 AM



Title: Can't give coins back
Post by: robwat on January 04, 2011, 05:30:59 AM
I just got 0.05 free bitcoins from https://freebitcoins.appspot.com/ and my client says

Status: 0/unconfirmed
Date: 04/01/2011 05:20
From: unknown
To: 1NbytvEvCcHPvCXxXvQVrGVhkbeqa3QJnL (yours, label: Your Address)
Credit: 0.05
Net amount: +0.05

When I try to pay 0.01 back to 15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC I get
"Error, Amount exceeds your balance"

Status
1680 khash/s Generating 8 connections 100950 blocks 1 transaction

Whats wrong?

Thanks
Rob


Title: Re: Can't give coins back
Post by: FreeMoney on January 04, 2011, 05:36:14 AM
Coins can be sent before you get confirmation, but the client is set to disallow it. Wait for a confirmation, shouldn't take too long (10 minutes average).


Title: Re: Can't give coins back
Post by: MoonShadow on January 04, 2011, 05:39:39 AM

Whats wrong?


Nothing.  The regular client won't let you spend new coins until you have at least one more block as a confirmation that the block with your funds in it is going to stick.


Title: Re: Can't give coins back
Post by: robwat on January 04, 2011, 07:33:14 AM
Ah yes,

I've paid 0.01 now and the payment is now showing 1/confirmed.

Thanks


Title: Re: Can't give coins back
Post by: caveden on January 04, 2011, 08:50:51 AM
Why doesn't the default client let unconfirmed coins to be sent? It seems an unnecessary limitation to me...


Title: Re: Can't give coins back
Post by: theymos on January 04, 2011, 09:16:03 AM
Why doesn't the default client let unconfirmed coins to be sent? It seems an unnecessary limitation to me...

https://en.bitcoin.it/wiki/Incidents#Micropayment_contamination


Title: Re: Can't give coins back
Post by: FreeMoney on January 04, 2011, 09:25:33 AM
Why doesn't the default client let unconfirmed coins to be sent? It seems an unnecessary limitation to me...

I think it's nice that it makes spam transactions a little harder so that people can't just do it with virtually no effort. But I can see how it would be annoying if you were in a hurry and were scraping the bottom of your balance. 

Is it easy to get old versions of Bitcoin?


Title: Re: Can't give coins back
Post by: caveden on January 04, 2011, 09:39:40 AM
Wait, but then the correction was not the good one, IMHO...

The best solution would be to change the sending priority. The client would first pick confirmed coins, since unconfirmed ones may remain like that for an indeterminate time. Maybe a warning message when there are only unconfirmed coins to be sent could be useful too. But completely blocking sounds "too authoritarian" to me... it's not up to the software to decide that.

By the way, the wiki section gives the impression that is the network that refuses <0,01 transactions, instead of the default miner. If I mine a block with my custom miner and accept to put <0,01 transactions in it, the default client won't refuse them, right?

Also, one doubt that I once had... can somebody else than the send of a transaction add fees to it? Suppose I'm the receiver of a transaction and I'm in a hurry, but the sender isn't.... so he sends a free transactions, that takes too long to get confirmed... could I add a few bitcents to it in order to get it processed quicker?


Title: Re: Can't give coins back
Post by: theymos on January 04, 2011, 11:48:34 AM
Is it easy to get old versions of Bitcoin?

You wouldn't want to. There have been changes that would tend to give your transactions lower priority. In particular, large transactions will take a long time to be accepted because the allowed size for free transactions has been decreased significantly and now network nodes won't relay transactions that they feel have too-low fees.

It's an easy change to make in the source, though:

Code:
if (!pcoin->IsFinal() || pcoin->fSpent)
(Remove IsConfirmed())

Code:
return (SelectCoinsMinConf(nTargetValue, 1, 6, setCoinsRet) ||
            SelectCoinsMinConf(nTargetValue, 1, 1, setCoinsRet) ||
            SelectCoinsMinConf(nTargetValue, 0, 1, setCoinsRet))||
            SelectCoinsMinConf(nTargetValue, 0, 0, setCoinsRet));
(Add a line that allows 0-confirmation coins)

Transactions using coins with few confirmations have a low priority for generators. Make sure you keep lots of wallet backups if you do this -- you might end up having to double-spend your own invalid transaction.

The best solution would be to change the sending priority. The client would first pick confirmed coins, since unconfirmed ones may remain like that for an indeterminate time. Maybe a warning message when there are only unconfirmed coins to be sent could be useful too. But completely blocking sounds "too authoritarian" to me... it's not up to the software to decide that.

You can change the behavior, as above. That change will prioritize as you described.

Quote
If I mine a block with my custom miner and accept to put <0,01 transactions in it, the default client won't refuse them, right?

Right. That's the only way to do it right now -- I've not heard of any major miners accepting sub-cent transactions.

Quote
Also, one doubt that I once had... can somebody else than the send of a transaction add fees to it?

No.