Bitcoinjs-lib: Dust transaction error or warning

Created on 8 Jul 2019  路  4Comments  路  Source: bitcoinjs/bitcoinjs-lib

  • [x] Bug
  • [x] Scope: Transaction builder

When I build my transaction to send small amount of satoshi (< 5460) bitcoinjs-lib generates me transaction raw without any errors and warnings. But when I try to push generated transaction raw via blockchain or blockchyper I get dust transaction error

I found this PR of bitcore. It doesn't allow to send transactions which value is smaller than 5460 Satoshi (a.k.a. dust)

So, I think it will be better for thousand of users to show warning or throw error about dust transaction (which won't be pushed anyway). Because now it's not obvious

Related issues in bitcoinjs-lib: #1123, #951

Related links: link1, link2

All 4 comments

4 year old pull request?...

Dust is depending on network. Also in Bitcoin since over a year ago dust is dynamic.

BlockCypher made a new test network, are you trying to use that?

That is not supported.

https://bitcoin.stackexchange.com/a/78097/87485

Here's the most recent "base level"

so 444 satoshis should send.

It is possible blockchain and others are using 4 year old software, but that is not our problem.

IMO, dust should be a network parameter, but since it changes so frequently, it is not good to add it there.

So wallet makers should set their own dust limit based on what limit the API they use will allow.

Closing. Thanks for the report.

https://github.com/bitcoin/bitcoin/blob/v0.18.0/src/policy/policy.cpp#L18

huh, so:

non-segwit: 546 satoshis

segwit p2wpkh: 294 satoshis

segwit p2wsh: 330 satoshis

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silence-may picture silence-may  路  3Comments

ghost picture ghost  路  3Comments

dcousens picture dcousens  路  3Comments

zhaozhiming picture zhaozhiming  路  3Comments

Beardcoding picture Beardcoding  路  3Comments