policy: don’t CheckEphemeralSpends on reorg #33616

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2025-10-bypass_checkephemeral changing 3 files +24 −20
  1. instagibbs commented at 5:37 pm on October 13, 2025: member

    Similar reasoning to #33504

    During a deeper reorg it’s possible that a long sequence of dust-having transactions that are connected in a linear fashion. On reorg, this could cause each subsequent “generation” to be rejected. These rejected transactions may contain a large amount of competitive fees via normal means.

    PreCheck based PreCheckEphemeralSpends is left in place because we wouldn’t have relayed them prior to the reorg.

  2. DrahtBot commented at 5:37 pm on October 13, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33616.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK darosior, ismaelsadeeq, sedited

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #33959 (test: use ForkGenerator to deduplicate reorg test code by yuvicc)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • Does context-less checks about a single transaction. -> Performs context-less checks on a single transaction. [Subject-verb mismatch: “Does … checks” is ungrammatical; “Performs … checks on” is correct and clearer]

    2026-02-25 14:24:30

  3. instagibbs renamed this:
    2025 10 bypass checkephemeral
    policy: don't CheckEphemeralSpends on reorg
    on Oct 13, 2025
  4. DrahtBot added the label TX fees and policy on Oct 13, 2025
  5. in test/functional/test_framework/blocktools.py:116 in f1ede0e611 outdated
    112@@ -113,6 +113,26 @@ def create_block(hashprev=None, coinbase=None, ntime=None, *, version=None, tmpl
    113     block.hashMerkleRoot = block.calc_merkle_root()
    114     return block
    115 
    116+def create_empty_fork(node, fork_length):
    


    optout21 commented at 9:52 am on October 14, 2025:
    I think create_empty_fork() can be deleted from mempool_updatefromblock.py.
  6. in src/validation.cpp:1611 in 04832d0110 outdated
    1607@@ -1608,7 +1608,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std::
    1608     }
    1609 
    1610     // Now that we've bounded the resulting possible ancestry count, check package for dust spends
    1611-    if (m_pool.m_opts.require_standard) {
    1612+    if (!args.m_bypass_limits && m_pool.m_opts.require_standard) {
    


    glozow commented at 5:33 pm on October 15, 2025:
    I think it’s impossible for m_bypass_limits to be true in this function, so undoing this diff doesn’t make a difference. Could we omit it or Assume(!args.m_bypass_limits)?

    instagibbs commented at 6:39 pm on October 15, 2025:

    Took feedback in other PR ahead of time #33504 (review)

    I can definitely put an Assume() on it.


    darosior commented at 10:43 pm on February 24, 2026:

    Mild preference for consistency between the two checks that are disabled upon reorgs: either we gate both TRUC and ephemeral dust on !bypass_limits in both code paths, or we gate both only on the AcceptSingleTx code path. Since the TRUC bypass is not enabled in AccecptMultiTx, the easier seems to be dropping it in this PR. Assume sounds good.

    Not a blocker for me. Happy to re-ACK if you drop it and/or add an Assume.


    sedited commented at 1:07 pm on February 25, 2026:
    This confused me until I read the discussion here. I would appreciate if it were dropped.

    instagibbs commented at 2:23 pm on February 25, 2026:
    dropped it
  7. glozow commented at 5:36 pm on October 15, 2025: member
    This seems to make sense. I’d feel more confident if we add some more test cases for topologies and reorg scenarios that this does (not) apply to?
  8. DrahtBot added the label Needs rebase on Nov 25, 2025
  9. instagibbs force-pushed on Nov 25, 2025
  10. instagibbs marked this as a draft on Nov 25, 2025
  11. instagibbs commented at 4:04 pm on November 25, 2025: member
    marking as draft for now until it becomes dependency-less and I’ve looked over the tests some more
  12. DrahtBot removed the label Needs rebase on Nov 25, 2025
  13. instagibbs force-pushed on Nov 26, 2025
  14. instagibbs force-pushed on Dec 1, 2025
  15. instagibbs marked this as ready for review on Dec 1, 2025
  16. instagibbs commented at 5:42 pm on December 1, 2025: member
    Added some more coverage and now has no dependencies.
  17. fanquake added this to the milestone 31.0 on Dec 4, 2025
  18. ismaelsadeeq commented at 2:01 pm on February 20, 2026: member
    Concept ACK
  19. darosior commented at 7:59 pm on February 20, 2026: member
    Concept ACK
  20. ismaelsadeeq commented at 1:00 pm on February 24, 2026: member

    ACK a5299c3509a126916ce3b87cb1fcf1e9a3631b1b

    The comment for CheckEphemeralSpends seems incorrect. It currently states, “Must be called for each package/transaction with dust.” That is no longer the case. It wasn’t the case before either, because on the test chain, you can override and accept non-standard transactions, and then it won’t be called.

  21. DrahtBot requested review from darosior on Feb 24, 2026
  22. instagibbs force-pushed on Feb 24, 2026
  23. instagibbs commented at 3:42 pm on February 24, 2026: member
    @ismaelsadeeq dropped the “must” in both places, since they are not true.
  24. ismaelsadeeq commented at 4:13 pm on February 24, 2026: member

    reACK 2854de7b0baa29f294b4dc64cc4d2c4233ce1f24

    9a3631b1b..2854de7b fixed a comment as mentioned in #33616 (comment)

  25. darosior approved
  26. darosior commented at 10:38 pm on February 24, 2026: member
    ACK 2854de7b0baa29f294b4dc64cc4d2c4233ce1f24
  27. sedited commented at 1:31 pm on February 25, 2026: contributor

    Approach ACK

    Looks good, but I would prefer to see glozow’s original comment addressed.

  28. policy: don't CheckEphemeralSpends on reorg 33fbaed310
  29. instagibbs force-pushed on Feb 25, 2026
  30. darosior commented at 2:27 pm on February 25, 2026: member
    re-ACK 33fbaed310a
  31. DrahtBot requested review from ismaelsadeeq on Feb 25, 2026
  32. DrahtBot requested review from sedited on Feb 25, 2026
  33. ismaelsadeeq commented at 3:07 pm on February 25, 2026: member
    reACK 33fbaed310a6a37d41d26af8fb34308d088d72c8
  34. sedited approved
  35. sedited commented at 4:20 pm on February 25, 2026: contributor
    ACK 33fbaed310a6a37d41d26af8fb34308d088d72c8
  36. sedited merged this on Feb 25, 2026
  37. sedited closed this on Feb 25, 2026


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-02-26 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me