Bitcoin Forum
November 05, 2024, 01:11:31 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum - How to create more Receiving Addresses?  (Read 218 times)
zkquality (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 7


View Profile
October 09, 2021, 04:00:15 PM
 #1

Electrum

How do I create more receiving addresses (more than 20) by UI or Terminal/CMD?

I can't find a button even on the UI.

https://i.ibb.co/Zdt5NBJ/ddd.png

Thanks a lot great community.
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3139



View Profile
October 09, 2021, 04:09:09 PM
Merited by pooya87 (2), ABCbits (2), Pmalek (1), hosseinimr93 (1)
 #2

How do I create more receiving addresses (more than 20) by UI or Terminal/CMD?

You need to change the gap limit. Go to the Console (enable it first by selecting View -> Show Console) and type in the following command.

wallet.change_gap_limit(number)
zkquality (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 7


View Profile
October 09, 2021, 04:12:03 PM
 #3

How do I create more receiving addresses (more than 20) by UI or Terminal/CMD?

You have to change the gap limit. Go to the Console (enable it first by selecting View -> Show Console) and type in the following command.

wallet.change_gap_limit(number)

It worked thanks!, but why many addresses are marked as red? this is normal? I've generated 1000x address
TryNinja
Legendary
*
Offline Offline

Activity: 3010
Merit: 7429


Top Crypto Casino


View Profile WWW
October 09, 2021, 04:17:17 PM
Merited by ABCbits (1), Pmalek (1), LeGaulois (1)
 #4

It worked thanks!, but why many addresses are marked as red? this is normal? I've generated 1000x address
Probably because they are too far away from the used addresses on the default gap limit, so if you later import your wallet (from the seed), Electrum won't search that far away and will miss the addresses that may have some balance (until you increase the gap again).

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18746


View Profile
October 09, 2021, 04:18:34 PM
 #5

It worked thanks!, but why many addresses are marked as red? this is normal? I've generated 1000x address
Yes, it's normal. It's just Electrum's way of telling you that these addresses are beyond the default gap limit and so won't appear automatically when you recover the wallet until you again increase the gap limit.

If you try restarting Electrum and reopening your wallet, the red background may disappear.

Also, if you make the gap limit too high, your wallet will be very slow, take a long time to sync, or might crash altogether. Don't generate thousands of addresses just for the sake of it.
zkquality (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 7


View Profile
October 09, 2021, 04:26:41 PM
 #6

Also, if you make the gap limit too high, your wallet will be very slow, take a long time to sync, or might crash altogether. Don't generate thousands of addresses just for the sake of it.

The main goal is run my electrum as merchant system for users to deposit / withdraw on a website, I'm coding a win server application to do that. Do you suggest an other way to do that?
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18746


View Profile
October 09, 2021, 04:46:10 PM
 #7

Running your own Electrum server to point your Electrum client to would be a good start, as many Electrum servers will throttle users who try to query thousands of addresses at once or implement some form of DDoS protection which will slow things down. It's also better for the privacy of you and your customers.

Beyond that, Electrum is not designed to hold tens of thousands of addresses in a single wallet. Given that each address should only be single use and you should present each customer with a new address for each new deposit, then you should not need to constantly monitor old addresses. Having them accessible in an old wallet file in the event a customer accidentally sends coins to an old address should be sufficient. With that in mind, then once you hit (say) 10k addresses (or whenever you start to notice significant lag), simply open a new wallet with the same seed phrase but the next account number, so at derivation path m/84'/0'/1' instead of m/84'/0'/0', for example. Keep several copies of the old wallets as a buck up so you can recover any funds mistakenly sent to them.

Or use a different client altogether.
LoyceV
Legendary
*
Offline Offline

Activity: 3486
Merit: 17632


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 09, 2021, 04:46:41 PM
 #8

I'm coding a win server application to do that. Do you suggest an other way to do that?
Your other topic would be a better place to discuss this, but it's locked already. Electrum has it's limits, if you're expecting to use thousands of addresses on your website, you'll probably need your own node instead of Electrum.

▄▄███████████████████▄▄
▄█████████▀█████████████▄
███████████▄▐▀▄██████████
███████▀▀███████▀▀███████
██████▀███▄▄████████████
█████████▐█████████▐█████
█████████▐█████████▐█████
██████████▀███▀███▄██████
████████████████▄▄███████
███████████▄▄▄███████████
█████████████████████████
▀█████▄▄████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6332


Self-proclaimed Genius


View Profile
October 10, 2021, 03:20:13 AM
 #9

-snip-
wallet.change_gap_limit(number)
It worked thanks!, but why many addresses are marked as red? this is normal? I've generated 1000x address
Means that it reverted back to default gap limit or just need time to display as "within the gap limit",
as mentioned above, those "marked red" are addresses beyond the wallet's gap limit (gap limit is saved in the wallet file itself);
However, it actually means your current gap_limit is only up to the last non-red-highlighted address.
If you'll use the wallet in that state, it will only generate 20 more addresses (instead of another 1000) after the 1000th is used.

Restart Electrum first, then check if those addresses are still red, if still red, there may be something preventing the setting.
But I bet it just needs a restart/time.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11009


Crypto Swap Exchange


View Profile
October 10, 2021, 05:26:50 AM
 #10

I'm coding a win server application to do that. Do you suggest an other way to do that?
Your other topic would be a better place to discuss this, but it's locked already. Electrum has it's limits, if you're expecting to use thousands of addresses on your website, you'll probably need your own node instead of Electrum.
It is always best to run your own node if you are running a business and want to accept payment, but technically you can still use Electrum with some small modification. The problem with Electrum for large number of addresses is only the wallet file. It is a JSON file ergo the whole thing is being read and written each time instead of being a database where only a small part of it is read or updated each time. If that small part is changed, the issue will be solved.

I wonder if anyone has ever done this modification?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pmalek
Legendary
*
Offline Offline

Activity: 2940
Merit: 7540


Playgram - The Telegram Casino


View Profile
October 10, 2021, 06:55:07 AM
Merited by hosseinimr93 (1)
 #11

Have you considered using a non-custodial payment processor on your website to accept bitcoin payments?
On this list you will see both hosted and non-hosted services that you can try out.

BTCPay Server would be an obvious and recommended choice for many, but it requires a bit of time to set up.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1694
Merit: 8324


Bitcoin is a royal fork


View Profile WWW
October 10, 2021, 09:01:00 AM
 #12

wallet.change_gap_limit(number)

Instead of this solution that requires to restart Electrum, I'm providing another one that doesn't have this requirement.



Go to View -> Console and type:
Code:
for i in range (n): print (wallet.create_new_address(False))

If you want to generate receiving addresses or:
Code:
for i in range (n): print (wallet.create_new_address(True))

If you want change addresses. Replace n with the number of addresses you want to generate.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18746


View Profile
October 10, 2021, 09:16:45 AM
Merited by BlackHatCoiner (4), ABCbits (1)
 #13

Instead of this solution that requires to restart Electrum, I'm providing another one that doesn't have this requirement.
You don't need to restart Electrum with this. When you change the gap limit, it does so instantly and generates new addresses up to your new gap limit. If they show up with a red background, which signals they are still below your gap limit (this shouldn't happen), then a restart should remove the red background.

The solution you have given generates new addresses beyond the gap limit. Since these addresses are beyond the gap limit, they will always have a red background until you use the original command to increase your gap limit to cover these addresses or you start receiving coins to earlier addresses.
zkquality (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 7


View Profile
October 10, 2021, 10:18:46 AM
 #14

Have you considered using a non-custodial payment processor on your website to accept bitcoin payments?
On this list you will see both hosted and non-hosted services that you can try out.

BTCPay Server would be an obvious and recommended choice for many, but it requires a bit of time to set up.

Thank you very much for that! I was searching for it long time ago.

P.S Is there any way to reduce bitcoin node stroage & data usage?
Pmalek
Legendary
*
Offline Offline

Activity: 2940
Merit: 7540


Playgram - The Telegram Casino


View Profile
October 10, 2021, 12:43:25 PM
Last edit: October 11, 2021, 08:47:10 AM by Pmalek
 #15

Thank you very much for that! I was searching for it long time ago.

P.S Is there any way to reduce bitcoin node stroage & data usage?
If you are talking about running a full-node, you have to download and verify the entire Bitcoin blockchain. After that, you can use pruned mode that requires only a few GBs of storage on your hard disk.

But Electrum is an SPV client, so you don't have to worry about storage limitations.
And if you decide to go for a payment processor such as BTCPay Server, you would also not be dealing with full-nodes.

Edit: While going to work, I thought about what I said. So I did some research and it indeed looks like you do require a full-node with BTCPay Server, but it comes with the installation. Sorry for giving you the wrong information initially.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
zkquality (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 7


View Profile
October 10, 2021, 04:27:57 PM
 #16

Thank you very much for that! I was searching for it long time ago.

P.S Is there any way to reduce bitcoin node stroage & data usage?
If you are talking about running a full-node, you have to download and verify the entire Bitcoin blockchain. After that, you can use pruned mode that requires only a few GBs of storage on your hard disk.

But Electrum is an SPV client, so you don't have to worry about storage limitations.
And if you decide to go for a payment processor such as BTCPay Server, you would also not be dealing with full-nodes.

Edit: While going to work, I thought about what I said. So I did some research and it indeed looks like you do require a full-node with BTCPay Server, but it comes with the installation. Sorry for giving you the wrong information initially.

Thank you for replying. I've read their docs that why I asked for that no problem at all friend.
BitMaxz
Legendary
*
Online Online

Activity: 3430
Merit: 3165


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
October 10, 2021, 06:40:25 PM
 #17

Edit: While going to work, I thought about what I said. So I did some research and it indeed looks like you do require a full-node with BTCPay Server, but it comes with the installation. Sorry for giving you the wrong information initially.

Yes, it's required to have a full node with BTCpayserver but they also have options to use a 3rd party if you don't have a budget to build a full node.

@zkquality

If you are looking for 3rd party BTCpay hosts you can find them from the link below
- https://directory.btcpayserver.org/filter/hosts

Some of them are free and paid but if you care about your privacy then you would need to build a full node.

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
zkquality (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 7


View Profile
October 11, 2021, 06:53:56 PM
 #18

Thank you guys. It's clear now finally.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!