bitcoin/contrib/asmap
2025-03-03 18:09:54 +01:00
..
asmap-tool.py Compare ASMaps with respect to specific addresses 2024-06-27 16:35:15 +02:00
asmap.py contrib: Add asmap-tool 2024-04-25 17:27:08 +02:00
README.md doc: Expand documentation on asmap feature and tooling 2025-03-03 18:09:54 +01:00

ASMap Tool

Tool for performing various operations on textual and binary asmap files, particularly encoding/compressing the raw data to the binary format that can be used in Bitcoin Core with the -asmap option.

Example usage

To decode/encode asmap files use the decode and encode commands.

python3 asmap-tool.py encode /path/to/input.file /path/to/output.file
python3 asmap-tool.py decode /path/to/input.file /path/to/output.file

The diff command computes the differences between two asmap files. They can be text or binary.

python3 asmap-tool.py diff /path/to/first.file /path/to/second.file

The diff_addrs command computes the differences between two asmap files but limited to a set of addresses that need to be passed as a third argument. This should be a list of known addresses from getnodeaddresses.

bitcoin-cli getnodeaddresses 0 > addrs.json
python3 asmap-tool.py diff /path/to/first.file /path/to/second.file addrs.json