Author

Topic: Gap limit change - too many receiving addresses (Read 1131 times)

legendary
Activity: 3682
Merit: 1580
Thanks. Can you point me to a php solution, preferably one that would work with cpanel hosting, i'm not using wordpress.

Sure you can grab the code from that plugin itself. I've explained it here:

https://bitcointalksearch.org/topic/m.17241773
newbie
Activity: 9
Merit: 0
Alright, I really like electrum so far, coming from creating manual wallets via coinb.in, and I really appreciate your help. What would you say is a healthy number of addresses that electrum can handle? I don't mind creating a new wallet every month or so, will it handle my load if I get few hundred transactions per month and create a new wallet every month or so?

I honestly don't know how large a wallet electrum can handle. I only know what I've picked up reading and answering questions here. It would be in the thousands of addresses though.

BTW in that other thread you talk about uploading addresses as a text file. You do realize that you can generate addresses with just the master public key of the wallet, don't you? You cannot spend money with just the master public key so it is safe to install that on a server. You can then generate address on the fly on the server. I've tried explaining this to you above too:

BTW you can generate addresses for ecommerce applications using scripts. All the script will need is the master public key.

As an example you can see this plugin I made for wordpress that does that:

https://wordpress.org/plugins/bitcoin-address/

There are scripts available for a lot of programming languages so if you tell us which language you prefer I can perhaps point one out for you.
Thanks. Can you point me to a php solution, preferably one that would work with cpanel hosting, i'm not using wordpress.
legendary
Activity: 3682
Merit: 1580
Alright, I really like electrum so far, coming from creating manual wallets via coinb.in, and I really appreciate your help. What would you say is a healthy number of addresses that electrum can handle? I don't mind creating a new wallet every month or so, will it handle my load if I get few hundred transactions per month and create a new wallet every month or so?

I honestly don't know how large a wallet electrum can handle. I only know what I've picked up reading and answering questions here. It would be in the thousands of addresses though.

BTW in that other thread you talk about uploading addresses as a text file. You do realize that you can generate addresses with just the master public key of the wallet, don't you? You cannot spend money with just the master public key so it is safe to install that on a server. You can then generate address on the fly on the server. I've tried explaining this to you above too:

BTW you can generate addresses for ecommerce applications using scripts. All the script will need is the master public key.

As an example you can see this plugin I made for wordpress that does that:

https://wordpress.org/plugins/bitcoin-address/

There are scripts available for a lot of programming languages so if you tell us which language you prefer I can perhaps point one out for you.
newbie
Activity: 9
Merit: 0
Just read your posts, can we clarify this. If i set my gap limit to 250, and received some coins to the 166th address then electrum will look up to my gap limit (250) and create additional addresses until I have (166+250=416) total addresses?

Yep on the "receiving" chain.

The change address chain also has a gap limit but it is a fixed number. New change addresses are generated to maintain unused addresses just like with the main chain but the gap limit there is not user configurable.

Quote
And it's not possible for me to lose some addresses/bitcoins, as long as I remember my seed words and have the ability to increase the gap limit, because the default one is 20, right?

Yes this is correct. But you should know that electrum is not optimized to support thousands of addresses. It tends to get slow if there are a lot of addresses in a wallet. So periodically you will have to migrate your funds to fresh electrum wallet that you create using the file> new/restore option.

BTW you can generate addresses for ecommerce applications using scripts. All the script will need is the master public key.
Alright, I really like electrum so far, coming from creating manual wallets via coinb.in, and I really appreciate your help. What would you say is a healthy number of addresses that electrum can handle? I don't mind creating a new wallet every month or so, will it handle my load if I get few hundred transactions per month and create a new wallet every month or so?
legendary
Activity: 3682
Merit: 1580
Well, I used 2 of the 250 addresses, so I guess that had to do something with gap limit.
Yes, it says "gap_limit": 252,

This shouldn't have happened. If you configured it to 250 then that's where it should have remained. If you can reproduce it then it looks like you found a bug.
legendary
Activity: 3682
Merit: 1580
Just read your posts, can we clarify this. If i set my gap limit to 250, and received some coins to the 166th address then electrum will look up to my gap limit (250) and create additional addresses until I have (166+250=416) total addresses?

Yep on the "receiving" chain.

The change address chain also has a gap limit but it is a fixed number. New change addresses are generated to maintain unused addresses just like with the main chain but the gap limit there is not user configurable.

Quote
And it's not possible for me to lose some addresses/bitcoins, as long as I remember my seed words and have the ability to increase the gap limit, because the default one is 20, right?

Yes this is correct. But you should know that electrum is not optimized to support thousands of addresses. It tends to get slow if there are a lot of addresses in a wallet. So periodically you will have to migrate your funds to fresh electrum wallet that you create using the file> new/restore option.

BTW you can generate addresses for ecommerce applications using scripts. All the script will need is the master public key.
newbie
Activity: 9
Merit: 0
i don't know why the gap limit increased to 252 rather than 250. does it say the following when you view the file in notepad:

Code:
"gap_limit": 252,

Or are you counting the addresses manually and determining the gap limit that way?

To answer your second question the gap limit is the number of unused addresses, beyond the index of the last used address in your wallet, that electrum keeps track off. So 250 gap limit doesn't mean you have just 250 addresses in your wallet. I've explained it here:

https://bitcointalksearch.org/topic/m.18535357
Well, I used 2 of the 250 addresses, so I guess that had to do something with gap limit.
Yes, it says "gap_limit": 252,
As for counting the addresses, I'm using
listaddresses() - receiving addresses + change addresses
or
print "\n".join(i for i in wallet.get_receiving_addresses() ) - only receiving addresses

Then copy all of the addresses to excel and I get 346 or 352 rows.

Just read your posts, can we clarify this. If i set my gap limit to 250, and received some coins to the 166th address then electrum will look up to my gap limit (250) and create additional addresses until I have (166+250=416) total addresses? And it's not possible for me to lose some addresses/bitcoins, as long as I remember my seed words and have the ability to increase the gap limit, because the default one is 20, right?
legendary
Activity: 3682
Merit: 1580
i don't know why the gap limit increased to 252 rather than 250. does it say the following when you view the file in notepad:

Code:
"gap_limit": 252,

Or are you counting the addresses manually and determining the gap limit that way?

To answer your second question the gap limit is the number of unused addresses, beyond the index of the last used address in your wallet, that electrum keeps track off. So 250 gap limit doesn't mean you have just 250 addresses in your wallet. I've explained it here:

https://bitcointalksearch.org/topic/m.18535357
newbie
Activity: 9
Merit: 0
Hello,
I used these commands to create 250 receiving addresses.
wallet.change_gap_limit(250)
wallet.storage.write()
After I received and sent btc from 2 of the addresses, the gap limit automatically changed to (252) (checked it when i opened my unencrypted wallet file with notepad) - this is normal, right? But today, after listing all of my addresses, I get a number of 346 total addresses (the gap limit is still 252) instead of 252 total addresses. How and why?
Jump to: