kristapsk/bitcoin-scripts

Research Stonewall and improve fake-coinjoin.sh

Closed this issue · 4 comments

The following changes are made to fake-coinjoin.sh as a result for now:

  • UTXO order for default coin selection algorithm are randomized (previously listunspent order was used).
  • Outputs from the same transaction are never used more than once as inputs in the fake coinjoin transaction for the same "set" (in our case - single virtual "maker" or "taker", as we emulate JoinMarket).

Otherwise we are somewhat even more strict than Stonewall rules, because of trying to pretend to be a JoinMarket. Only exception is "Utxos of higher value replace utxos of lower value belonging to the same transaction" (when inputs from the same txid would be choosen in a single set otherwise; currently we use either random one or smallest one, depending on choosen coin selection algorithm). Not sure how important it is, only thing that comes into my mind is that this potentially reduces number of inputs needed for a single transaction.

Concept ACK ;)

@SamouraiDev , so no additional comments on that "Utxos of higher value replace utxos of lower value belonging to the same transaction" rule?

No, as you stated it's about keeping the number of inputs to the minimum necessary.