-
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 spending an unconfirmed UTXO, it can happen that we back-date the locktime of our transaction to a locktime before the locktime of the unconfirmed parent. In this case, the "transaction signed earlier but only broadcast now" is unrealistic I think (please correct me if you think there is a protocol where this makes sense). This is a fingerprint that we are a Bitcoin Core or Electrum wallet.
related #26526
electrum issue: spesmilo/electrum#8073
darosior, murchandamus and TheCharlatan