Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
reduced dust threshold to 543, in line with electrum
Browse files Browse the repository at this point in the history
  • Loading branch information
Belcher committed Apr 27, 2015
1 parent eaa3baf commit 652ee06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ConfigParser import SafeConfigParser
import os
nickname = ''
DUST_THRESHOLD = 5430
DUST_THRESHOLD = 543
bc_interface = None
ordername_list = ["absorder", "relorder"]
debug_file_handle = None
Expand Down

5 comments on commit 652ee06

@CohibAA
Copy link
Contributor

@CohibAA CohibAA commented on 652ee06 Jul 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately, electrum-servers utilize the core client to broadcast transactions, so shouldn't the dust threshold be in-line with bitcoin core? Is this something that can be set in joinmarket.cfg based on user preference?

I believe this is now dynamic in the core client (estimated fees won't be more than 1/3 of new ouput, or output would be considered dust, iirc). There are probably some miners that would accept outputs as low as 543, but not many, I imagine. Personally, I think 5500 would be a safer dust limit for transaction propagation.

That said, I'm sure you had your reasons for lowering it here, and I'd like to hear more about them if you find time. Thanks.

@chris-belcher
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't much read about how dust works, I know vaguely that miners won't mine something without outputs smaller than a certain limit. I basically just copied electrum which is used by many people every day.

Do you have a justification for a 5500 dust limit? Find in bitcoin core where it's dealt with or ask a core dev on #bitcoin-dev and link here.

@CohibAA
Copy link
Contributor

@CohibAA CohibAA commented on 652ee06 Jul 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relevant code from core is here. The actual value is 546 satoshis below which the default core client won't accept the transaction.

There have been lots of changes over time, and plenty of bad information to sort through, it seems, but I believe that 546 is still current. minRelayTxFee can be set by miner's in their configuration, though, so I am trying to find sources to confirm that many/most miners are using higher minrelaytxfee settings, necessitating the higher (~5500) dust limit for usability. It's a problem of whether to code for defaults, which I think may reduce usability, versus coding to match the majority of miner configs, which is hard to verify and may change as mining economics change. Again, maybe this is best left to the makers to decide by way of joinmarket.cfg.

Note to self, I'm having a hard time wrapping my head around what exactly these lines do, and why they were different before the dust limit was lowered.

@CohibAA
Copy link
Contributor

@CohibAA CohibAA commented on 652ee06 Jul 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

electrum dust_threshold is set at 546 currently, matching the core client default.

@chris-belcher
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work.
For help understanding those lines, it's probably easiest to ask in a bitcoin IRC channel.

I have a utxo of value 800 satoshi which confirmed fine when it was made.

An option in the cfg file won't necessarily solve the problem as most people won't change it, and it will add mental effort to them because it's one more thing they have to understand. Notice how it's not configurable in electrum.

Maybe there should be another configurable variable called like preferred minimum output where the bots try their best to not create outputs smaller than it, but will if there's no other option. The name is less confusing than dust too.

Please sign in to comment.