How to get all Bitcoin public keys from transactions

5 replies 215 views
fork_2016Member
Posts: 3 · Reputation: 97
#1Jan 18, 2017, 11:27 PM
Hey everyone, I could really use some help here. I'm trying to figure out how to download all the Bitcoin public keys that have been involved in transactions, but I can't seem to find a method to do it.
2 Reply Quote Share
stack_2017Senior Member
Posts: 201 · Reputation: 1389
#2Jan 19, 2017, 02:02 AM
Do you mean the bitcoin addresses? If so, then take a look here: https://bitcointalk.org/index.php?topic=5254914.0 This doesn't list all addresses that made a transaction though. Only the ones with a balance.
5 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#3Jan 19, 2017, 10:13 PM
For pubkeys, start reading around this post. I haven't updated it anymore, and since my server is gone (I'm currently in the process of replacing it), I can't easily work on the data now.
5 Reply Quote Share
sage_moonSenior Member
Posts: 273 · Reputation: 1371
#4Jan 20, 2017, 02:48 AM
If you adapt it to Bitcoin Core, it will be faster. python >>Start block height: 735000 >>End block height: 735003 INFO:root:Processing block: 735000 INFO:root:Saved 1834 unique public keys from block 735000 to pubkeys.txt INFO:root:Processing block: 735001 INFO:root:Saved 2360 unique public keys from block 735001 to pubkeys.txt INFO:root:Processing block: 735002 INFO:root:Saved 2244 unique public keys from block 735002 to pubkeys.txt INFO:root:Processing block: 735003 INFO:root:Saved 795 unique public keys from block 735003 to pubkeys.txt
1 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#5Jan 20, 2017, 08:59 AM
I'm not aware of any website which share list of public keys that made a transaction. But you can see thread Bitcoin Public Key Database with balance 2009-2022 for ways to obtain it by yourself. Looks great, but what kind of address can be parsed? From quick read, it seems it only support P2PKH and P2WPKH.
3 Reply Quote Share
sage_moonSenior Member
Posts: 273 · Reputation: 1371
#6Jan 20, 2017, 12:32 PM
TY!, here is an improved script that extracts the different addresses where Pubkey is exposed: >>Start block height: 874101 End block height: 874102 INFO:root:Processing block: 874101 INFO:root:Saved 3814 unique public keys and addresses from block 874101 to pubkeys.txt INFO:root:Processing block: 874102 INFO:root:Saved 2918 unique public keys and addresses from block 874102 to pubkeys.txt and for a unique TX: >>Tx hash: 4c51abc2d2972e9ad4044ad55d1d26c5c6a41c77ab3ac68fc91249d1920837e6 INFO:root:Processing tx: 4c51abc2d2972e9ad4044ad55d1d26c5c6a41c77ab3ac68fc91249d1920837e6 INFO:root:Saved 4 unique public keys and addresses from transaction 4c51abc2d2972e9ad4044ad55d1d26c5c6a41c77ab3ac68fc91249d1920837e6 to pubs_tx.txt
2 Reply Quote Share

Related topics