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

combat dust thru utxo merge policies #173

Merged
merged 2 commits into from
Sep 5, 2015

Conversation

adlai
Copy link
Contributor

@adlai adlai commented Aug 5, 2015

cf #91

@adlai adlai changed the title combat dust thru utxo merge policy combat dust thru utxo merge policies Aug 5, 2015
@CohibAA
Copy link
Contributor

CohibAA commented Aug 5, 2015

Nice PR. Testing...

@tailsjoin
Copy link
Contributor

I will also test. Hopefully it can deprecate my pycoin reallocation tool.

@chris-belcher
Copy link
Collaborator

I realise there's a few different meaning to dust in bitcoin.

  1. Outputs too small to be relayed by the network, as in common.DUST_THRESHOLD
  2. Outputs that cost more to spend than they're worth. Depends on the fee/kB you're using.
  3. Outputs that are small enough to be annoying but otherwise spendable as normal.

Unless I'm wrong, these new utxo selection algos solve the problem of 3. because 1. is already solved and 2. cant be solved yet as joinmarket miner fees are broken.
To me 3. doesn't seem like much of a problem.

@CohibAA
Copy link
Contributor

CohibAA commented Aug 7, 2015

@chris-belcher That is correct, currently. I, for one, would vote to include this code though, as I am one that find those small outputs annoying. If I am not mistaken, having more and smaller outputs eventually contributes to more bandwidth usage and larger blockchain size over time, no? I understand that is not an issue to be solved within scope of joinmarket, but we may as well not contribute to the issue.

@adlai Code is good so far, no issues with it over the last couple days.

@chris-belcher
Copy link
Collaborator

OK yes @CohibAA it's true that combining together lots of small outputs will reduce the size of the UTXO set, which cant be pruned without some new fancy crypto. On the downside, combining together more outputs links them and provides evidence of common ownership to anyone looking at the blockchain. So I don't think it's a good idea to encourage it.

For dust of type 2. I've written about a possible solution here https://gist.github.com/chris-belcher/27b1743ba63e34736863

@tailsjoin whats your pycoin reallocation tool? Maybe tell me by email or start an issue about dust.

@tailsjoin
Copy link
Contributor

@adlai
Copy link
Contributor Author

adlai commented Aug 25, 2015

Outputs are only ever linked from within a single mixdepth; the current privacy model assumes that these are already linkable, so no privacy is lost by signing them into the same transaction. Dust must eventually be swept, and this approach allows some granularity over the manner in which this sweeping is done, although doing a single sendpayment with merge_algorithm = greedy replicates the "one-shot"sweeping behavior provided by other tools.

Most importantly, default behavior is unchanged.

@adlai
Copy link
Contributor Author

adlai commented Sep 5, 2015

Rebased onto latest master.

I still don't see why this shouldn't be merged: it doesn't change default behavior, and only merges within a single depth, leaving the privacy model intact.

- adds an optional config section: [POLICY]
- adds a merge_algorithm option in the new section
- two sample merge algorithms are provided, beyond the default:
  + select_gradual still makes small transactions, clearing dust patiently
  + select_greedy collects dust as quickly as practical
@inaltoasinistra
Copy link
Contributor

I'd add that the default behaviour it's a factory of dust (when it is possible it always use 1 input and the output are 2). Why do not change the default behaviour?

chris-belcher added a commit that referenced this pull request Sep 5, 2015
combat dust thru utxo merge policies
@chris-belcher chris-belcher merged commit 6f3a98c into JoinMarket-Org:master Sep 5, 2015
@adlai adlai deleted the mergy-police branch September 5, 2015 15:06
@adlai
Copy link
Contributor Author

adlai commented Sep 5, 2015

@the9ull I believe it's fairer towards users that new behavior is enabled through opt-in rather than opt-out.

ghtdak pushed a commit to ghtdak/joinmarket that referenced this pull request Oct 1, 2015
ghtdak pushed a commit to ghtdak/joinmarket that referenced this pull request Oct 4, 2015
combat dust thru utxo merge policies
@MMMonsterrr
Copy link

If I understand the privacy model based on mixing depths correctly, then a higher mixing depth usually means a higher level of uncertainty regarding the origin of the utxos, right?

Wouldn't it then make sense to have different merge policies for different mixing depths?

For example:
STRICT policy for depth 0 > never merge outputs
DEFAULT for depth 1-2 > try not to merge, but merge if necessary
GRADUAL for depth 3-4 > gradually reduce utxos
GREEDY for depth 5+ > assume that there's enough uncertainty now to force merging of utxos


sorry, probably should have commented in #91 instead.

@chris-belcher
Copy link
Collaborator

@MMMonsterrr that's somewhat true for the tumbler, depending on in which mixing level the user first deposited their coins. But for the yield generator which is what this thread is mostly about, the mixing levels are circular, after level 4 it goes back to level 0. So it probably makes no difference.

@MMMonsterrr
Copy link

Oh okay, I didn't know that.

But even then, the yield generator would still work, even with these depth dependent policies. STRICT might be a bit annoying in that case though, so maybe the circular jump should go from 4 to 1 instead in that case?

Anyway, was just a thought :)

ghtdak pushed a commit to ghtdak/joinmarket that referenced this pull request Dec 4, 2015
combat dust thru utxo merge policies
[gitreformat yapf-ify (github/ghtdak) on Fri Dec  4 04:51:20 2015]
[from commit: 6f3a98c]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants