Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ElDalmatino on December 22, 2023, 03:53:34 PM



Title: Is there a list of public keys
Post by: ElDalmatino on December 22, 2023, 03:53:34 PM
Hi, is there maybe a list of known public keys, or a script to get them from addresses with balance ?


Title: Re: Is there a list of public keys
Post by: Lakai01 on December 22, 2023, 04:23:34 PM
Is this what you are looking for? All Bitcoin Public Keys with non-zero balance (https://bitcoin.stackexchange.com/questions/37291/all-bitcoin-public-keys-with-non-zero-balance)

In the posted link you will also find scripts on how to extract the values.
Basically, however, you won't be able to avoid installing and completely syncing the blockchain, I think.

Perhaps there would be even more suitable suggestions if you briefly describe what exactly you intend to do and what you need the information for?


Title: Re: Is there a list of public keys
Post by: hosseinimr93 on December 22, 2023, 04:28:41 PM
Hi, is there maybe a list of known public keys, or a script to get them from addresses with balance ?
It's not possible to have such list at all.
Note that you can know the public key of an address only if there's an outgoing transaction from that address. Having balance is not enough.

If there's an outgoing transaction from an address, you can get its public key from the raw transaction.


Title: Re: Is there a list of public keys
Post by: BitMaxz on December 22, 2023, 04:31:01 PM
What exactly do you plan to achieve?

Add more info on what exactly you need or a sample of public keys you mean? You might be pointing to the extended public key or xPub and you are looking for a list of them.
I never heard of any sites or explorers that have a list of xPub and only the wallet owner should know about xPub and you can only find this key under your wallet details like in Electrum.

Or are you talking about the xPub tool to scan all addresses with balances?
There is a tool called xPub Analyzer that can do that check the link below

- https://blockpath.com/wallets/local/101?action=appxpub


Title: Re: Is there a list of public keys
Post by: ElDalmatino on December 22, 2023, 05:24:50 PM
On my waiting for Christmas time, i came over this github script https://github.com/GonzoTheDev/BitcoinPublicKeyGrabber (https://github.com/GonzoTheDev/BitcoinPublicKeyGrabber), and ask my self is there maybe a list somebody has made.

The grabber works fine, you put in all addresses from http://addresses.loyce.club/ (http://addresses.loyce.club/), and it gives you the known public keys,
he recommend 10sec timeout between the request, i did 5-8 and it went good but it takes loooooooong.

I did a modification on the python script, of kangaroo, and can now run simultan 5 public keys on search.

Ok itīs still in the beta, but works fine till now, i split the search and loose only a small amount of keys/sec.

Also i include a python start.py that changes my search every 5 min to next key, and never search the same range ( ignores it ), when come back
( that is only because i realize that kangaroo goes full in a range and sometimes donīt start from beginning), i include 2 sqlite dbīs for some operations.

I know some will ask why python, because this is what i can change things, and this is what is more playfull for experimental things.

I know sharing is caring, when i got to the point of workīs without error i will put it here in.


Title: Re: Is there a list of public keys
Post by: BTCW on December 23, 2023, 09:05:16 PM
Fire up Electrum (a portable executable/binary is good enough, regardless of OS), open the console tab and

Code:
getbalance('3ERBHeQ9SENDcsbmZMBTCFvY1LfGiCMEH8')

does what you are looking for. Since Electrum is native Python, it is very "scriptable" too.

That's the good news. The bad news is that it will never work for what you probably want to achieve: scan "all" public addresses, hoping to strike gold.

Please don't hammer the Electrum network with a gazillion pointless requests. If you need 10 or 20 lookups a day, sure. If more than that, do it offline with a recently updated list.






Title: Re: Is there a list of public keys
Post by: pbies on December 24, 2023, 07:11:50 AM
Such list for now (just checked) is 26934 MiB in size (27 GiB).

It can be done with utxodump program.

You get txids, pubkeys, addresses and few other info.


Title: Re: Is there a list of public keys
Post by: ABCbits on December 24, 2023, 09:30:05 AM
Please don't hammer the Electrum network with a gazillion pointless requests. If you need 10 or 20 lookups a day, sure. If more than that, do it offline with a recently updated list.

FWIW OP could run his own full node and Electrum server, then configure Electrum wallet software only connect to his own server.

Such list for now (just checked) is 26934 GiB in size.

It can be done with utxodump program.

You get txids, pubkeys, addresses and few other info.

But it seems OP wants public key from all address though, not only public key from current UTXO.


Title: Re: Is there a list of public keys
Post by: ymgve2 on December 24, 2023, 10:47:45 AM
Such list for now (just checked) is 26934 GiB in size.

It can be done with utxodump program.

You get txids, pubkeys, addresses and few other info.

I think you missed a decimal point somewhere. The Bitcoin blockchain itself isn't even 600GB yet.


Title: Re: Is there a list of public keys
Post by: pbies on December 25, 2023, 01:52:58 PM
I think you missed a decimal point somewhere. The Bitcoin blockchain itself isn't even 600GB yet.

Yep, sorry! Fixed.

But it seems OP wants public key from all address though, not only public key from current UTXO.

I've given nice approach. For more data he should scan Bitcoin Core blocks or "chainstate" folder with "txindex=1" option.