spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.45k stars 3.09k forks source link

Add listaddressgroupings RPC method from Bitcoin Core #5556

Open JeremyRand opened 5 years ago

JeremyRand commented 5 years ago

It would be useful to add Bitcoin Core's listaddressgroupings RPC call to Electrum. This would improve the ability of users to evaluate their anonymity.

ecdsa commented 5 years ago

A pull request would be welcome. I think the coin chooser could use this.

JeremyRand commented 5 years ago

One interesting subtlety of how listaddressgroupings applies to Electrum is that Electrum contains some optional features that try to obfuscate the change address; AFAIK Bitcoin Core doesn't have any such functionality. So it might be useful to have an optional parameter in Electrum's implementation that controls to what extent obfuscated change addresses are considered to have been "made public". (This isn't a requirement, just a "nice to have" bonus feature.)

SomberNight commented 5 years ago

So this would just group addresses by "Common Input ownership Heuristic"?


Consider the following scenario: Addresses A and D are in wallet. Addresses B and C are external (not in wallet) addresses. There is a transaction T1 with inputs from A and B. There is another transaction T2 with inputs from B and C. Another transaction T3 spends from C and D.

Do you now want to group A and D together? (I assume yes; just wanted to point out it might not be trivial to implement. Note that transaction T2 is unrelated to the wallet.)

JeremyRand commented 5 years ago

Do you now want to group A and D together?

Hmm, what does Bitcoin Core do in this case? If Bitcoin Core doesn't group A and D, then I'd be fine with having Electrum not do so either (although maybe in that case a bug should be filed against Bitcoin Core).

JeremyRand commented 5 years ago

Do you now want to group A and D together?

Relatedly, one intended use case for listaddressgroupings is to figure out what information to hide from the server, so it's probably a bad thing for this method to produce network traffic to the server. Which means downloading transactions that aren't already part of the wallet is probably not doable unless it's done very very carefully (e.g. over a separate server TCP connection and over a separate Tor circuit).