policy: don’t CheckEphemeralSpends on reorg #33616

pull instagibbs wants to merge 3 commits into bitcoin:master from instagibbs:2025-10-bypass_checkephemeral changing 8 files +168 −51
  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.

    based on #32587 to improve reorg test reliability

  2. move the method create_empty_fork to test_framework (blocktools.py) so that it can be used by other tests as well f1ede0e611
  3. fix: reorg behaviour in mempool tests to match real one 0f1f02995b
  4. policy: don't CheckEphemeralSpends on reorg 04832d0110
  5. 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. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #33629 (Cluster mempool by sdaftuar)
    • #33591 (Cluster mempool followups by sdaftuar)
    • #32587 (test: Fix reorg patterns in tests to use proper fork-based approach 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.

  6. instagibbs renamed this:
    2025 10 bypass checkephemeral
    policy: don't CheckEphemeralSpends on reorg
    on Oct 13, 2025
  7. DrahtBot added the label TX fees and policy on Oct 13, 2025
  8. 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.
  9. in src/validation.cpp:1611 in 04832d0110
    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.

  10. 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?

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: 2025-10-27 00:13 UTC

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