Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: arosca on April 25, 2014, 03:50:47 PM



Title: sendfrom fails with amounts < 0.0001
Post by: arosca on April 25, 2014, 03:50:47 PM
Does anyone know why the first call (BTC 1e-5) fails while the second one (BTC 1e-4) succeeds?

The default account has sufficient balance for either transaction, including any fees.

I was able to replicate this behavior with repeated calls and with different addresses. (All addresses are in the same wallet though)

Thanks!

Code:
>>> client.sendfrom('', 'mwL5MSSqxC6RF2Sw2ix96oM5p8nxQz1Ya2', 1e-5)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\jsonrpc\proxy.py", line 45, in __call__
    raise JSONRPCException(resp['error'])
JSONRPCException
>>> client.sendfrom('', 'mwL5MSSqxC6RF2Sw2ix96oM5p8nxQz1Ya2', 1e-4)
'091447498aef2fed9ea84a728455306ae677b0d70b53e3b97b6cccf098013b76'


Title: Re: sendfrom fails with amounts < 0.0001
Post by: jonald_fyookball on April 25, 2014, 08:27:00 PM
There's code in bitcoin to reject very small amounts (known as dust) on purpose to prevent
spamming (sending millions of transactions of 1 satoshi, etc).


Title: Re: sendfrom fails with amounts < 0.0001
Post by: arosca on April 25, 2014, 11:05:05 PM
Aah, that makes perfect sense, since the current dust limit is about 5.4e-5

Thanks!


Title: Re: sendfrom fails with amounts < 0.0001
Post by: Soappa on April 26, 2014, 01:13:56 PM
There's code in bitcoin to reject very small amounts (known as dust) on purpose to prevent
spamming (sending millions of transactions of 1 satoshi, etc).

The dust threshold was introduced in 0.8.2 and was set at 5430 satoshi.
https://bitcointalk.org/index.php?topic=219504.0

Quote
0.8.2 Release notes

Fee Policy changes

The default fee for low-priority transactions is lowered from 0.0005 BTC
(for each 1,000 bytes in the transaction; an average transaction is
about 500 bytes) to 0.0001 BTC.
Payments (transaction outputs) of 0.543 times the minimum relay fee
(0.00005430 BTC) are now considered 'non-standard', because storing them
costs the network more than they are worth and spending them will usually
cost their owner more in transaction fees than they are worth.

Anyone knows whether the threshold has been changed after the min relay fee has been dropped in 0.9.0?