Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: 0x77 on April 30, 2021, 08:06:46 AM



Title: How to create millions of Bitcoin addresses
Post by: 0x77 on April 30, 2021, 08:06:46 AM
Welcome, I am new here. I want to ask the question of how millions of Bitcoin addresses worked for personal use for a project without mentioning what it is and linking addresses to a single wallet such as a blockchain. Any money transfer to any of these addresses turns into my account. I know the use of a private key.
For Bitcoin addresses, but it will be tiring to make 10,000 addresses and link them, so what should I do when I do not want to use the API system
This project has some suit because it is a stupid blockchain system. Sometimes it closes the API and the project that will be created cannot be linked to the API permanently.
Are there ideas and solutions?  ???  :-\


Title: Re: How to create millions of Bitcoin addresses
Post by: NotATether on April 30, 2021, 11:00:32 AM
First of all I advise against writing in all bold text because it hurts the eyes especially at night.

Now as for your question, I am guessing that you are looking for a library, and not some web service, for creating millions of private keys.

If you are OK with using Python, you can install the bitcoinaddress (https://pypi.org/project/bitcoinaddress/) module and simply generate an address like this:

Code:
from bitcoinaddress import Wallet

wallet = Wallet()
print(wallet)

Example output addresses: DO NOT USE

Code:
Private Key HEX: 03902e4f09664bc177fe4e090dcd9906b432b50f15fb6151984475c1c75c35b6
Private Key WIF: 5HqrbgkWPqBy6dvCE7FoUiMuiCfFPRdtRsyi6NuCM2np8qBZxq5
Private Key WIF compressed: KwLdv6T2jmhQbswnYrcL9KZHerTpVyjozp1JNjfP5QuD3GchCwCc

Public Key: 04c5389a31ce6149c28ba20d14db8540b2319e5a65000a2919fbf7a6296e7840b53f883a9483fb7f2b43f3eacd857c904d1b70ecc168571b64d8f1ab82b57eea88
Public Key compressed: 02c5389a31ce6149c28ba20d14db8540b2319e5a65000a2919fbf7a6296e7840b5

Public Address 1: 1Bu6YxH64nfvhdDsYNEP8PftoBMqgusdPS   
Public Address 1 compressed: 18i5PtPisxbGiGGEviW7HPcnfNPmcsscwH   
Public Address 3: 38dRrGx5YbrnRWuWcJv5i2XHjYUnHE2wvv 
Public Address bc1 P2WPKH: bc1q2jxe5azr6zmhk3258av7ul6cqtu4eu4mps8f4p   
Public Address bc1 P2WSH: bc1qdveuf0egtfdnd2fnsp0lzfukn2e58czf8323ky6xt8ydew4ecfcqv3ettx

You can run that in a loop and it's never going to rate-limit or block you, because it runs on your local machine  :)

If you are looking to use some other programming language, please tell us which one it is so we can help you specifically about it.


Title: Re: How to create millions of Bitcoin addresses
Post by: mocacinno on April 30, 2021, 11:13:25 AM
NotATether's sollution works...

If you want an easyer method that allows you to greatly simplify the backup procedure, you could also use electrum, let it generate a seed phrase, write down this seed, then go to electrum's console and do:
wallet.change_gap_limit(10000)
wallet.storage.write()
listaddresses()

Then you'll get a list you can import into a db.. Do prepare to wait a LOOOOOONG time... A 10.000 gap limit isn't small...

TBH, my sollution isn't per defenition better than NotATether's, it's just differrent :)


Title: Re: How to create millions of Bitcoin addresses
Post by: LoyceV on April 30, 2021, 11:26:54 AM
millions of Bitcoin addresses worked for personal use for a project without mentioning what it is and linking addresses to a single wallet
The only reason I can think of why someone would need millions of addresses is spam/scam/extortion email, where you'd like to keep track of who paid you.
So I'm curious what your "personal project" involves.

That being said: have you thought about how you're going to keep track of which address got funded? If you import a few million addresses into a wallet, I expect it to grind to a halt. You may like this solution (https://bitcointalk.org/index.php?topic=5254914.0).


Title: Re: How to create millions of Bitcoin addresses
Post by: PrimeNumber7 on April 30, 2021, 03:14:31 PM
NotATether's sollution works...

If you want an easyer method that allows you to greatly simplify the backup procedure, you could also use electrum, let it generate a seed phrase, write down this seed, then go to electrum's console and do:
wallet.change_gap_limit(10000)
wallet.storage.write()
listaddresses()

Then you'll get a list you can import into a db.. Do prepare to wait a LOOOOOONG time... A 10.000 gap limit isn't small...

TBH, my sollution isn't per defenition better than NotATether's, it's just differrent :)
I would say that using a deterministic wallet is superior to generating private keys individually. The resources to monitor transactions sent to the addresses is the same for both, however keeping backups and storing the private key is much easier with a deterministic wallet.

millions of Bitcoin addresses worked for personal use for a project without mentioning what it is and linking addresses to a single wallet
The only reason I can think of why someone would need millions of addresses is spam/scam/extortion email, where you'd like to keep track of who paid you.
So I'm curious what your "personal project" involves.
Running an exchange or service that accepts deposits would be another reason to need to generate many addresses. I would imagine that many bitcoin-related services have many addresses that never receive any amount of coin.


Title: Re: How to create millions of Bitcoin addresses
Post by: BitMaxz on April 30, 2021, 04:09:23 PM
Another suggestion from above you can also use this one.

- https://iancoleman.io/bip39/

It generates addresses instantly including seed so you can backup both seed phrase and private keys.
Just type the number of addresses you want to see under the "show more row" and it will show all addresses with private keys.


Title: Re: How to create millions of Bitcoin addresses
Post by: coinableS on May 01, 2021, 01:26:59 AM
The only reason I can think of why someone would need millions of addresses is spam/scam/extortion email

Bingo or a sad attempt at brute forcing addresses.


Title: Re: How to create millions of Bitcoin addresses
Post by: BlackHatCoiner on May 02, 2021, 01:34:34 PM
Are there ideas and solutions?  ???  :-\
Not sure what exactly you want, but you can derive millions of Bitcoin addresses from one master public key. Check iancoleman (https://iancoleman.io/bip39/) to see how it works.

Loading the balances of millions of addresses won't work if you rely on third parties. You'll have to run your own Bitcoin node for sure. If you're keen on using electrum here's a nice way to achieve what you want:  Electrum Personal Server (https://github.com/chris-belcher/electrum-personal-server).

Not best option, because
1. Electrum wallet isn't scalable (one of the reason is usage of JSON to store the information).
2. Electrum server maximum request for each user.
Can you analyze the first reason a little bit more?

Besides the above, he'll expose all these addresses to electrum nodes, which isn't recommended for privacy reasons, especially if they're clients' addresses.


Title: Re: How to create millions of Bitcoin addresses
Post by: fxsniper on May 03, 2021, 09:27:28 AM

create millions of Bitcoin addresses for real use

if HD wallet can support over millions address, I think it easy to use

create individual private key over 1 million you need to keep it save all it is risk to lost some address if missing
if for you use personal it easy and no problem

I try at https://iancoleman.io/bip39/
type  starting from index  900,000,000  it generate next address


Title: Re: How to create millions of Bitcoin addresses
Post by: NotATether on May 03, 2021, 09:32:23 AM
I try at https://iancoleman.io/bip39/
type  starting from index  900,000,000  it generate next address

Ignoring the privacy concerns of using a live website, this will quickly finish your browser's memory by filling it up with WIF strings.

1 million private keys will use at least 30-50MB and that's just for storing the WIFs themselves. I can't imagine how much memory the internal state would use up if multiplied 1,000,000 times not to mention it will be very slow and slow down other tabs since it's running inside the browser's JS engine.