Export embedded ASMap RPC #33920

pull fjahr wants to merge 1 commits into bitcoin:master from fjahr:2025-11-asmap-export changing 3 files +83 −7
  1. fjahr commented at 11:53 pm on November 20, 2025: contributor

    This depends on the embedded data PR itself (#28792), until merge this will remain in draft status. All commit but the last one are from there.

    There has been interest in exporting the embedded data back into a file. This is implemented here with a simple exportasmap RPC which provides this functionality. The exported file can be used to verify the data integrity or statistical analysis using e.g. contrib/asmap-tool.py.

  2. DrahtBot commented at 11:53 pm on November 20, 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/33920.

    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:

    • #33878 (refactor, docs: Embedded ASMap [2/3]: Refactor asmap internals and add documentation by fjahr)
    • #33770 (init: Require explicit -asmap filename by ryanofsky)
    • #33631 (init: Split file path handling out of -asmap option by fjahr)
    • #31260 (scripted-diff: Type-safe settings retrieval by ryanofsky)
    • #17783 (common: Disallow calling IsArgSet() on ALLOW_LIST options by ryanofsky)
    • #17581 (refactor: Remove settings merge reverse precedence code by ryanofsky)
    • #17580 (refactor: Add ALLOW_LIST flags and enforce usage in CheckArgFlags by ryanofsky)
    • #17493 (util: Forbid ambiguous multiple assignments in config file by ryanofsky)

    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.

  3. fjahr force-pushed on Nov 20, 2025
  4. DrahtBot added the label CI failed on Nov 20, 2025
  5. fjahr force-pushed on Nov 21, 2025
  6. fjahr force-pushed on Nov 21, 2025
  7. fjahr force-pushed on Nov 21, 2025
  8. DrahtBot removed the label CI failed on Nov 21, 2025
  9. DrahtBot added the label Needs rebase on Nov 22, 2025
  10. fjahr force-pushed on Feb 19, 2026
  11. fjahr commented at 8:59 am on February 19, 2026: contributor
    Rebased and taken out of draft status since embedding asmap was merged.
  12. fjahr marked this as ready for review on Feb 19, 2026
  13. rpc: Add exportasmap RPC b065ec9acc
  14. in src/rpc/net.cpp:1132 in 8b4b8a3d26
    1127+        "exportasmap",
    1128+        "Export the embedded ASMap data to a file.\n",
    1129+            {
    1130+                {"filepath", RPCArg::Type::STR, RPCArg::Optional::NO, "The path where the ASMap file is saved"},
    1131+            },
    1132+            RPCResult{RPCResult::Type::NONE, "", ""},
    


    maflcko commented at 9:39 am on February 19, 2026:

    According to the dev notes:

    • Try to make the RPC response a JSON object.

      • Rationale: If a RPC response is not a JSON object, then it is harder to avoid API breakage if new data in the response is needed.

    Also, could clang-format new code?


    fjahr commented at 10:04 am on February 19, 2026:
    Made it return an empty json object and ran clang-format
  15. fjahr force-pushed on Feb 19, 2026
  16. DrahtBot added the label CI failed on Feb 19, 2026
  17. DrahtBot removed the label Needs rebase on Feb 19, 2026
  18. DrahtBot removed the label CI failed on Feb 19, 2026
  19. seduless commented at 6:15 pm on February 19, 2026: none

    Tested b065ec9acc98112f4ea9a6d2bae9a7a6187ee2a8

    Built with and without embedded asmap. Ran feature_asmap.py, passes in both configurations. Commented out file << asmap_data and confirmed the test fails.


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-20 15:13 UTC

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