(Note: putting this on hold until #12257 is merged.)
#10065 brings up a privacy issue where a user can send a bunch of near-dust transactions to an address, which would be picked up by the coin select code when the owner funded transactions, connecting multiple transactions and addresses to the same user.
This adds a (by default turned off) flag -avoidreuse
. When enabled, the wallet will mark any addresses that were used to fund a transaction as “dirty” and will avoid using them in funding additional transactions, unless an “allow dirty” flag is set.
It also adds support to allow dirty addresses in sendtoaddress
. More tweaks to other RPC commands is necessary but I wanted to keep the PR as small as possible.
Retroactive flagging of dirty addresses can be done by rescanning the chain.