Hello all, Anti-fee-sniping with nLockTime has been present in Bitcoin Core since 2014 and in Electrum since 2017. BIP326 assumes this nLockTime behavior as the baseline and uses nSequence instead for some taproot spends. However, the nLockTime rules themselves were never specified in a BIP.
https://github.com/nervana21/bips/blob/anti-fee-snipe/bip-anti-fee-sniping-with-locktime.md The BIP draft follows Bitcoin Core's DiscourageFeeSniping and IsCurrentForAntiFeeSniping functions. nLockTime is set to the current tip height. With probability 10%, a uniform random integer in 0..99 is subtracted and the result is clamped at 0. A locktime equal to the tip height cannot be included in a remine of the tip. An older locktime chosen on the privacy branch can. nLockTime is set to 0 during initial block download or when the tip is more than 8 hours old. The policy is not applied when nLockTime is already set or when any input already has a preset nSequence. Test vectors are included. Constructive criticism is greatly appreciated. Cheers, nervana21 -- You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/wWGWjMw9TI22vp4VzCm4xJJS3IGA1UhndMKynUkB04BqeoRjhe-QbDbJU-GMQq0nnOnXuB__u8KcdIcxU5i8Cy9pbTbtJ7Hi583FzLVojek%3D%40pm.me.
