-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Open
Description
As mentioned in #26451 (comment) example 3:
If we do anti-fee sniping, the Bitcoin Core wallet has a 10% chance to back-date the locktime of a transaction to up to 100 blocks. Electrum has similar behavior.
Lines 725 to 731 in 48174c0
// Secondly occasionally randomly pick a nLockTime even further back, so | |
// that transactions that are delayed after signing for whatever reason, | |
// e.g. high-latency mix networks and some CoinJoin implementations, have | |
// better privacy. | |
if (rng_fast.randrange(10) == 0) { | |
tx.nLockTime = std::max(0, int(tx.nLockTime) - int(rng_fast.randrange(100))); | |
} |
When we fee-bump a transaction, it can happen that we have a higher locktime in replaced transaction that in the replacement transaction. This is a clear indication that we are in fact a Bitcoin Core or Electrum wallet doing the replacement. I think this is something we should try to avoid.
related: #26527
electrum issue: spesmilo/electrum#8073
murchandamus and jgabarda