This repository has been archived by the owner on May 13, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reduced dust threshold to 543, in line with electrum
- Loading branch information
652ee06
There was a problem hiding this comment.
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.
652ee06
There was a problem hiding this comment.
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.
652ee06
There was a problem hiding this comment.
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.
652ee06
There was a problem hiding this comment.
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.
652ee06
There was a problem hiding this comment.
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.