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

    No conflicts as of last run.

  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. 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
  14. fjahr force-pushed on Feb 19, 2026
  15. DrahtBot added the label CI failed on Feb 19, 2026
  16. DrahtBot removed the label Needs rebase on Feb 19, 2026
  17. DrahtBot removed the label CI failed on Feb 19, 2026
  18. seduless commented at 6:15 pm on February 19, 2026: contributor

    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.

  19. rpc: Add exportasmap RPC 24fabb2030
  20. in src/rpc/net.cpp:1130 in b065ec9acc
    1125+{
    1126+    return RPCHelpMan{
    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"},
    


    maflcko commented at 8:15 am on February 20, 2026:
    should clarify that this will overwrite any prior file?

    fjahr commented at 12:37 pm on February 27, 2026:
    Added, thanks!
  21. fjahr force-pushed on Feb 27, 2026
  22. DrahtBot added the label CI failed on Feb 27, 2026
  23. DrahtBot removed the label CI failed on Mar 2, 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-03-13 09:13 UTC

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