refactor: [move-only] Merge core_io module, remove from libkernel #34296

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2601-core_io changing 7 files +261 −282
  1. maflcko commented at 7:31 am on January 15, 2026: member

    Currently the core_io module is split across two translation units. This will confuse code readers and tooling about the real state of the module.

    Fix that by merging the module and removing the mapping workarounds.

    Also, remove the module from the kernel lib, because it is not used there: The kernel does not use any json or string parsing or formatting.

  2. DrahtBot renamed this:
    refactor: [move-only] Merge core_io module, remove from libkernel
    refactor: [move-only] Merge core_io module, remove from libkernel
    on Jan 15, 2026
  3. DrahtBot added the label Refactoring on Jan 15, 2026
  4. DrahtBot commented at 7:31 am on January 15, 2026: 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/34296.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto, sedited, stickies-v

    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:

    • #34338 (ci, iwyu: Fix warnings in src/zmq and treat them as errors by hebasto)
    • #34319 (Drop some IWYU pragma: export and document IWYU usage by hebasto)
    • #34308 (doc: Document IWYU workaround by hebasto)
    • #32729 (test,refactor: extract script template helpers & widen sigop count coverage by l0rinc)
    • #28690 (build: Introduce internal kernel library by sedited)

    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.

  5. DrahtBot added the label CI failed on Jan 15, 2026
  6. DrahtBot removed the label CI failed on Jan 15, 2026
  7. hebasto commented at 5:33 pm on January 15, 2026: member
    Concept ACK.
  8. hebasto approved
  9. hebasto commented at 5:55 pm on January 15, 2026: member
    ACK fa93e014c8a3482c3084f88b7fe4734022633398, I have reviewed the code and it looks OK.
  10. sedited commented at 11:39 am on January 16, 2026: contributor

    Concept ACK

    This became possible after introducing a bespoke small hex parser in bitcoin-chainstate.cpp in #30595. We should eventually re-use our own internal utilities for things like hex parsing in our small tool binaries. The strencodings module can be used for that, so removing core_read from the kernel doesn’t make this more complicated.

  11. maflcko commented at 11:52 am on January 16, 2026: member
    I agree, and we may even go further: Make core_io use the kernel, instead of re-implementing the logic? I think in combination with #30595 (review) this would even lead to a speedup for free? Happy to work on this in a follow-up, if there is no obvious issue I am missing.
  12. sedited commented at 12:30 pm on January 16, 2026: contributor

    The strencodings module can be used for that, so removing core_read from the kernel doesn’t make this more complicated.

    Although looks like the strencodings and string modules could be removed from the kernel lib now too?

  13. maflcko force-pushed on Jan 16, 2026
  14. sedited approved
  15. sedited commented at 4:07 pm on January 17, 2026: contributor
    ACK fa994e41eb6eb941cd283c3140322ea7382d8160
  16. DrahtBot requested review from hebasto on Jan 17, 2026
  17. hebasto approved
  18. hebasto commented at 9:44 am on January 18, 2026: member
    re-ACK fa994e41eb6eb941cd283c3140322ea7382d8160.
  19. DrahtBot added the label Needs rebase on Jan 19, 2026
  20. kernel: Remove unused core_read.cpp from kernel
    Also, util/string and util/strencodings
    fa6947f491
  21. refactor: [move-only] Merge core_io module
    This can be reviewed with the git option
    --color-moved=dimmed-zebra
    faf66673ac
  22. doc: Fix typo found by LLM faf07bd1ab
  23. maflcko force-pushed on Jan 19, 2026
  24. maflcko commented at 11:59 am on January 19, 2026: member
    rebased due to adjacent changes. Should be trivial to re-review via git range-diff bitcoin-core/master fa994e41eb faf07bd1ab --word-diff-regex=. -U0.
  25. hebasto approved
  26. hebasto commented at 12:12 pm on January 19, 2026: member
    re-ACK faf07bd1ab26621e7c76fe78d2bf3c16ad3792b7, only rebased since my recent review.
  27. DrahtBot requested review from sedited on Jan 19, 2026
  28. sedited approved
  29. sedited commented at 12:26 pm on January 19, 2026: contributor
    Re-ACK faf07bd1ab26621e7c76fe78d2bf3c16ad3792b7
  30. DrahtBot removed the label Needs rebase on Jan 19, 2026
  31. stickies-v approved
  32. stickies-v commented at 2:17 pm on January 19, 2026: contributor

    ACK faf07bd1ab26621e7c76fe78d2bf3c16ad3792b7

    It seems like there was no strong need for this separation when it was introduced in https://github.com/bitcoin/bitcoin/pull/4332/commits/ae775b5b311982a3d932a9e34ddc94ce597dcaaf, and cleaning it up now makes sense.

  33. sedited merged this on Jan 19, 2026
  34. sedited closed this on Jan 19, 2026

  35. maflcko deleted the branch on Jan 19, 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-01-22 03:13 UTC

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