~snip
Just based on curiosity, op asked for all public keys with addresses that begin with 1 , how exactly are you able to pull up this data? Is it from the node you run or something totally different? I'm asking because what actually came to mind is public keys of addresses that have actually made a transaction.
Well I may be wrong though but what I'm thinking is you can only pull up Data from addresses that have made at least a single transaction because of the data they share with node... Where could I be wrong though?
I am doing that like there will be files info.txt and readme.txt, I am pasting them here:
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 (in WSL2 on Windows 10, Ubuntu 24.04 or 26.04):
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 later.
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.
LC_ALL=C sort -S80% -u --parallel=30 < tmp.tsv > pubkeys.txt
4.
pigz -9 pubkeys.txt
###
first file is 139 GiB
sorted file is 58.3 GiB
dump takes 40 minutes
sort takes 31 minutes
pigz takes 9m44s
38.13 GiB has output file compressed
Core's blockchain is spoiled, make backup!
###
This dump's timestamp is for 2026-05-08 09:15:41 CEST.
###
I can share btc_addr_pubkey.cpp file later.
It was Claude AI's work. C++ code should be on LoyceV's site later.