mempool: Remove -persistmempoolv1 option #36294

pull fjahr wants to merge 4 commits into bitcoin:master from fjahr:2026-09-rm-persistmempoolv1 changing 7 files +25 −24
  1. fjahr commented at 7:27 AM on September 18, 2026: contributor

    -persistmempoolv1 was added in #28207 as a temporary option to allow downgrading to v26 and earlier, which can't read the XOR'ed mempool.dat. v26 has now been EOL for a while. So any version this option could help downgrade to is unsupported now. It seems ready for removal. I don't think this requires an additional deprecation cycle since the feature is useless for any maintained version and docs have always stated that this was a "temporary option that will be removed in the future".

    Reading v1 files is still supported, so upgrading directly from an old version keeps the persisted mempool.

    mempool_compatibility.py now uses v28.2 as the old node, the oldest release in get_previous_releases.py that writes the current format.

  2. DrahtBot added the label Mempool on Sep 18, 2026
  3. DrahtBot commented at 7:27 AM on September 18, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. in test/functional/mempool_compatibility.py:31 in 0dc5253539
      27 | @@ -28,7 +28,7 @@ def skip_test_if_missing_module(self):
      28 |  
      29 |      def setup_network(self):
      30 |          self.add_nodes(self.num_nodes, versions=[
      31 | -            200100,  # Last release without unbroadcast serialization and without XOR
      32 | +            280200,  # Oldest available release with the current (XOR) mempool.dat format
    


    maflcko commented at 8:29 AM on September 18, 2026:

    huh? Shouldn't this set -persistmempoolv1=1, so that the reading path is still covered?

    Otherwise you are removing coverage (see corecheck)


    fjahr commented at 9:05 AM on September 18, 2026:

    Right, I got confused here. Added the option and also a comment making the coverage explicit where it happens.


    maflcko commented at 11:35 AM on September 18, 2026:

    This still drops coverage for LogInfo("Failed to deserialize mempool data on file: %s. Continuing anyway.\n", e.what());, but I guess the coverage there was only implicit (due to missing unbroadcast set), and we don't really care about it anyway?


    fjahr commented at 12:41 PM on September 19, 2026:

    Right, since we didn't have an explicit check for it, it seems like this coverage was mostly incidental. But some general coverage of a failing import on a malformed mempool file seems like a good idea, so I added that in a separate commit and put it into mempool_persist.py since that seems a more fitting place.

  5. maflcko approved
  6. maflcko commented at 8:30 AM on September 18, 2026: member

    lgtm. Seems fine. If anyone really wanted to write this, they can just use a previous release and do a start-stop with `-persistmempoolv1=1

    But the test patch looks broken

  7. maflcko added this to the milestone 33.0 on Sep 18, 2026
  8. fjahr force-pushed on Sep 18, 2026
  9. in test/functional/mempool_compatibility.py:32 in 6e0bfbb591
      29 |  
      30 |      def setup_network(self):
      31 | -        self.add_nodes(self.num_nodes, versions=[
      32 | -            200100,  # Last release without unbroadcast serialization and without XOR
      33 | +        self.add_nodes(self.num_nodes, extra_args=self.extra_args, versions=[
      34 | +            280200,  # Oldest available release with -persistmempoolv1
    


    maflcko commented at 11:35 AM on September 18, 2026:

    I think we prefer the last release (aka youngest, not oldest), or the comment should say "Any release with ..."


    fjahr commented at 12:23 PM on September 19, 2026:

    I changed the version to v31 and updated the comment, though it's going to be stale in a little bit since v32 will still have the option and then that will be the last release with the option. But I am not sure this worth splitting hairs over right now...

  10. maflcko approved
  11. maflcko commented at 11:36 AM on September 18, 2026: member

    lgtm

  12. test: Use v31.0 as old node in mempool_compatibility.py
    Also removes the -nowallet flag because it is unnecessary since the switch to MiniWallet.
    86a31b93d0
  13. mempool: Remove -persistmempoolv1 option d1dfdf8276
  14. doc: Add release note for -persistmempoolv1 removal 4c01625f79
  15. fjahr force-pushed on Sep 19, 2026
  16. test: Check that importmempool fails on a malformed mempool.dat 731b89c09b
  17. DrahtBot added the label CI failed on Sep 19, 2026
  18. DrahtBot removed the label CI failed on Sep 19, 2026
Labels

Milestone
33.0


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-09-20 20:52 UTC

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