1
When I try to broadcast a transaction, my bitcoin core throw a "dust" exception.
amount: 0.00029
fee: 0.00001
bitcoin core version: v0.16.0
The same transaction can success in testnet, but fail in mainnet.
When I send 0.0003 BTC to an account in my bitcoin core, it can success. So, I think send 0.00029 BTC out of the node is still possible.
I set the fee to such a small number to lower the transaction cost, since there will be many transactions like this one. If this fee will not work, then what is the lowest fee?
I try to set the option "discardfee", but didn't make anything change.
Any advice is helpful, thanks in advance.
There will be many addresses has dust in it, typically 0.0003BTC each. I want to collect them into a single address. How to do the math in this situation? – Allen_Tsang – 2018-08-11T01:29:37.290
0.0003 BTC is not dust. The problem is not that you are spending small outputs. Rather the problem is that you are creating a dust output. If the addresses are part of your Bitcoin Core wallet, let Bitcoin Core do the work. You can create a transaction using createrawtransaction which has no inputs and only the outputs that you want the coins to go to with the full amount of your wallet. Then, using fundrawtransaction, you can set it so that the fee is deducted from this output. Core will select the coins and set the fee for you. – Andrew Chow – 2018-08-11T01:37:07.503
The commands are:
createrawtransaction '[]' '[{"<address>":<wallet balance>}]'and thenfundrawtransaction <tx hex from createraw> '{"subtractFeeFromOutputs":[0]}'– Andrew Chow – 2018-08-11T01:38:49.560I trying your suggestion. But I still don't fully understand. You mean the problem is that the size of output is too small, even the amount (0.0003BTC) is big enough. But how the app client do the similar transaction? I use Copay to send 0.0003BTC to the address in my bitcoin core. When I try to send the same amount out of bitcoin core, the dust problem occurs. – Allen_Tsang – 2018-08-13T02:01:50.397
I believe I have solve the problem. Your advice is really helpful. @Andrew – Allen_Tsang – 2018-08-15T04:01:14.963