wallet: don't back-date locktime when replacing/fee bumping #26526

issue 0xB10C opened this issue on November 17, 2022
  1. 0xB10C commented at 5:35 PM on November 17, 2022: contributor

    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.

    https://github.com/bitcoin/bitcoin/blob/48174c0f287b19931ca110670610bd03a03eb914/src/wallet/spend.cpp#L725-L731

    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: https://github.com/spesmilo/electrum/issues/8073

  2. 0xB10C added the label Feature on Nov 17, 2022
  3. 0xB10C cross-referenced this on Nov 17, 2022 from issue wallet: don't back-date locktime when spending unconfirmed UTXOs by 0xB10C
  4. MarcoFalke added the label Wallet on Nov 17, 2022
  5. MarcoFalke added the label RPC/REST/ZMQ on Nov 17, 2022
  6. 0xB10C cross-referenced this on Nov 17, 2022 from issue Don't back-date locktime during RBF and when spending unconfirmed UTXOs by 0xB10C
  7. 0xB10C cross-referenced this on Nov 17, 2022 from issue Enforce incentive compatibility for all RBF replacements by sdaftuar
  8. murchandamus commented at 8:29 PM on January 10, 2023: contributor

    Good catch, yes that should be checked when we create a replacement.

  9. rodentrabies cross-referenced this on Jan 16, 2023 from issue wallet: do not backdate locktime if it may lead to fingerprinting by rodentrabies

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:53 UTC