2

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.

1 Answer 1

3

The current dust limit fee rate is 3 satoshis/byte. If, at 3 satoshis per byte, an output would cost more in fees to spend that it has in value, then that output is considered dust. If you are sending to non-segwit addresses, this limit is 3 sat/byte * 148 bytes = 444 sats. If you are sending to P2SH-segwit addresses (the default address type in Bitcoin Core), then the fee limit is 3 sat/byte * 91 bytes = 273 sat. If you are sending to bech32 addresses, then the fee limit is 3 sat/byte * 68 bytes = 204 sat.

You can lower your dust limit by setting -dustrelayfee to something lower than 0.00003 BTC/kB (equivalent to 3 sat/byte). However I do not recommend that you change this as even though your node will accept transactions with outputs that are otherwise dust, other nodes will not and your transactions will not be relayed.

Furthermore, you should not set your transaction fee rate to be less than 0.00001 BTC/kB (equivalent to 1 sat/byte) as this is the default minimum relay fee and transactions that have a fee rate less than this will not be relayed. Just because your node accepts a transaction does not mean that other people's nodes will.

5
  • 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? Aug 11, 2018 at 1:29
  • 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
    Aug 11, 2018 at 1:37
  • The commands are: createrawtransaction '[]' '[{"<address>":<wallet balance>}]' and then fundrawtransaction <tx hex from createraw> '{"subtractFeeFromOutputs":[0]}'
    – Andrew Chow
    Aug 11, 2018 at 1:38
  • I 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. Aug 13, 2018 at 2:01
  • I believe I have solve the problem. Your advice is really helpful. @Andrew Aug 15, 2018 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.