We need "blocks" and "chainstate" folders from Bitcoin Core, fresh, so sync it before doing next things. Core need txindex=1 in bitcoin.conf file to download chainstate. You may need to start Core with -reindex or something similar. then: rsync -avtu --delete /mnt/d/Bitcoin/chainstate/ /home/user/.bitcoin/chainstate/ Change first folder to source, second to target from which you will take data. Pubkeys unpacked = 58.24 GiB, packed pigz = 38.12 GiB. It may spoil the blockchain, Core will need to reindex. Use on copy. Last: build the below C++ program and run it: 1. g++ -O2 -std=c++17 btc_addr_pubkey.cpp -lssl -lcrypto -lleveldb -o btc_addr_pubkey 2. ./btc_addr_pubkey --both ~/.bitcoin tmp.tsv 3. sort -S80% -u --parallel=30 < tmp.tsv > pubkeys.txt 4. pigz -9 pubkeys.txt