Author

Topic: How to remove address from Electrum wallet (Read 256 times)

mk8
newbie
Activity: 10
Merit: 0
November 07, 2019, 06:11:05 AM
#15
Ok, locking topic.
Gap limit is useless for me because electrum watching for all generated addresses by default.
I created addresses for accept BTC on my site, so 5k addresses will be used during 4-6 months.

What you did in the end was more or less the same as creating a new wallet and moving all funds to this new wallet... The big difference is that you sweeped all funds into the first couple of addresses of your existing wallet instead of creating an actual new wallet (by using the same seed as the previous wallet, you restored your old wallet instead of creating a new one).

All in all, this shouldn't be a real problem... As soon as you start deriving addresses that have a history, you'll see some extra transaction history, but that should be about it.

The thing is still wanted to stress (i'm repeating myself here): i don't think there is a real life situation where you'd actually need to pre-generate 60.000, 40.000 or even 5.000 addresses. Nor is there a situation any situation where you'd ever need to leave a gap between 2 derived addresses. It's best just to create a wallet, leave the gap limit at 20 and just use the next unused address in the list (or use the receive-tab, which will automatically present you with the next available, unused address).
There is no real benefit in leaving gaps, other than some security trough obscurity.

But i'm happy you got your problem sorted out. There's no real like-button on bitcointalk, but the post in which you gave thanks to the posters in this thread is certainly appreciated Wink
By the way, it would be nice if you could lock this topic. If you keep a topic open after the problem has been resolved, spammers will keep on replying to this topic in the future.
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
November 07, 2019, 05:59:35 AM
#14
What you did in the end was more or less the same as creating a new wallet and moving all funds to this new wallet... The big difference is that you sweeped all funds into the first couple of addresses of your existing wallet instead of creating an actual new wallet (by using the same seed as the previous wallet, you restored your old wallet instead of creating a new one).

All in all, this shouldn't be a real problem... As soon as you start deriving addresses that have a history, you'll see some extra transaction history, but that should be about it.

The thing is still wanted to stress (i'm repeating myself here): i don't think there is a real life situation where you'd actually need to pre-generate 60.000, 40.000 or even 5.000 addresses. Nor is there a situation any situation where you'd ever need to leave a gap between 2 derived addresses. It's best just to create a wallet, leave the gap limit at 20 and just use the next unused address in the list (or use the receive-tab, which will automatically present you with the next available, unused address).
There is no real benefit in leaving gaps, other than some security trough obscurity.

But i'm happy you got your problem sorted out. There's no real like-button on bitcointalk, but the post in which you gave thanks to the posters in this thread is certainly appreciated Wink
By the way, it would be nice if you could lock this topic. If you keep a topic open after the problem has been resolved, spammers will keep on replying to this topic in the future.
mk8
newbie
Activity: 10
Merit: 0
November 07, 2019, 05:15:35 AM
#13
So I copied private keys for transactions (on old wallet), opened "new wallet" with same seed but without generated addresses, used Wallet -> Private Keys -> Sweep for import this private keys and send this funds to "visible" address.

Then I generated 5k addresses on new wallet and it working like charm.

I also tried all "officially suggested" clients and they  require bitcoin node or are worst.
Bitcoin core is "too hard" for me, I need to make it easy.

It will be good to install Electrum server, but developer have no "guide for newbies" for not install and execute it, so I failed.

Is any way how to "like" posts here? This answers helped me a lot.
legendary
Activity: 3710
Merit: 1586
November 06, 2019, 07:53:20 PM
#12
As for now I have
1) "Old wallet" with 60k addresses, where are transactions that related to "green addresses" and to "red addresses", after 12 hours of synchronization Electrum  found EVERY transaction,  and ismine showing me "true" for each "red address".

2) "New wallet" where are 20 addresses and all transactions from "green addresses" are loaded. But all transactions that related to "red addresses" are not visible here.

What how I need to modify new wallet for get access to transactions that related to "red addresses"?

Other software is not solution for me, Electrum working perfect with wallets where number of addresses are under 10k, so I will use 6 wallets and will be happy.

Please help me to solve my problem with moving from "old wallet" to "new wallet".



I suggest you export all your private keys from oldwallet and import them into bitcoin core. Then wait for bitcoin core to sync the blockchain (all 200GB of it).

Bitcoin core has the blockchain locally so it can handle a large number of addresses. Electrum cannot.

You can export private keys in electrum via wallet > private keys > Export. Electrum exports private keys in the format "address scripttype:privatekey". Remove everything but the private key when importing into bitcoin core:

importprivkey privatekey "" false

When importing the last private key change that last parameter to true. More info here: https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/importprivkey/ and here: https://bitcoin.stackexchange.com/a/5944/5273

legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
November 06, 2019, 08:39:09 AM
#11
from https://electrum.readthedocs.io/en/latest/faq.html:

Quote
Note that the address will be shown with a red background in the address tab to indicate that it is beyond the gap limit. The red color will remain until the gap is filled.

Basically, increasing your gap limit untill no red addresses remain should do the trick...

Since a gap limit of 50 seems to be insufficient, try:
wallet.change_gap_limit(500)
wallet.storage.write()

if that isn't enough, increase the gap limit untill no more red addresses remain...

But am i right in my newfound assumption that you created a wallet with 60.000 addresses, then randomly picked an address each time you wanted to receive a payment instead of using incremental addresses? If so, odds are that your problem isn't easily solvable because electrum wasn't coded for this usecase.... See the link posted by RapTarX.

If you followed best practices and used incremental receiving addresses, there should be no problem (AFAIK), but if you picked random addresses, electrum will stop deriving new addresses as soon as it derived x unused addresses (x = gap limit). By picking random addresses, the derivation will stop as soon as you left a gap between 2 used addresses that's bigger than the gap limit.

In this (nonstandard) case, i guess it would be best to create a new wallet and send all funds from your wallet with 60.000 private keys (and public keys, and addresses) to the new wallet... But this time, don't pre-generate 60k addresses, just use the gui to show you a new receiving address each time you want to receive a payment... The gui will usually show you the first unused address it derived instead of picking a random one, so by following these best practices, you won't end up with a huge wallet full of gaps in the future...
A different approach would be to export the private keys of the funded addresses and import them into a different wallet (right click on every address with a nonzero balance and chose "private key", save them in an ascii file, import them into a new wallet... (warning: if you pc is compromised in any way, this is a very dangerous process)...

Just make sure you always hold on to the 60k wallet, since you never know if somebody is ever going to fund one of your old addresses (either by mistake, or as a habit).
mk8
newbie
Activity: 10
Merit: 0
November 06, 2019, 08:32:06 AM
#10
As for now I have
1) "Old wallet" with 60k addresses, where are transactions that related to "green addresses" and to "red addresses", after 12 hours of synchronization Electrum  found EVERY transaction,  and ismine showing me "true" for each "red address".

2) "New wallet" where are 20 addresses and all transactions from "green addresses" are loaded. But all transactions that related to "red addresses" are not visible here.

What how I need to modify new wallet for get access to transactions that related to "red addresses"?

Other software is not solution for me, Electrum working perfect with wallets where number of addresses are under 10k, so I will use 6 wallets and will be happy.

Please help me to solve my problem with moving from "old wallet" to "new wallet".

legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
November 06, 2019, 07:44:43 AM
#9
2) that was linked to addresses that was marked "as red" and there are not visible inside re-created wallet.
Marked red because Electrum recognized that those addresses wont be visible automatically when you restore from seed.
It's probably because the "n-th" address in the gap limit wasn't used yet.
If there are too many unused addresses between the used ones, chances that you'll get more "red" addresses is high.

AFAIK, Electrum wasn't designed for hodling tens of thousand of addresses transactions.
Bitcoin core (w/the latest hardware) is a better alternative since the blockchain is stored locally unlike Electrum which is relying on a remote server.
But if you really need to keep track/hold all of those addresses, you need to build your own software to handle the task (like exchanges' internal wallet).
mk8
newbie
Activity: 10
Merit: 0
November 06, 2019, 06:31:33 AM
#8
There was transactions:
1) that was linked to addresses that "under gap limit", and this transaction are visible on my "new walled", it make me believe that I re-created waller correctly.
2) that was linked to addresses that was marked "as red" and there are not visible inside re-created wallet.

I have addresses and tx ids for this "invisible" transactions.

How to make them visible?

I did try to:

wallet.change_gap_limit(50)
wallet.storage.write()
and restart application - it is not solved my problem.

I did try to execute ismine("xxxx") with address that related to transaction and it showing false...
What is going on... This is not funny at all... Or it just checking this address in base of stored addresses and answering false if no such address found?
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
November 06, 2019, 06:05:14 AM
#7
Thank you all for very quick reply.

Ok, I saved ids of all transactions and re-created wallet from seed.
How to import that transactions for make them visible and funds usable?

Need to click Tools ->Load transaction -> From the block chain -> Export?




If you re-create your wallet from seed (and you used the correct seed phrase, the one you wrote down when creating the wallet with 60.000 addresses), electrum should have derived exactly the same private keys -> public keys -> addresses as in your initial wallet (the one with 60.000 addresses) and you should see all historic transactions right away (only if your original wallet had any historic transactions offcourse). The difference between your "new" and "old" wallet is that in your new wallet, only 100 unused addresses after the last used address will remain.
In your op, you said you wanted to remove the last 20.000 addresses, but in reality, keeping a gap limit of 100 is more than enough... I don't know why you'd ever want to pre-generate 40.000 addresses... Your wallet will just derive more addresses as soon as less unused addresses as the gap limit are available.

If you don't see your historic transactions, 3 things could have happened:
  • You used the wrong seed phrase (in this case: make sure you used the same seed phrase as the 60k wallet)
  • You hand-picked addresses to get funded that were over the gap limit (in this case: increase the gap limit and restart)
  • There is a connection problem to the electrum node (do you see a green button at the bottom corner)

The Load transaction menu is not meanth for this purpose.
mk8
newbie
Activity: 10
Merit: 0
November 06, 2019, 05:59:43 AM
#6
Thank you all for very quick reply.

Ok, I saved ids of all transactions and re-created wallet from seed.
How to import that transactions for make them visible and funds usable?

Need to click Tools ->Load transaction -> From the block chain -> Export?


legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
November 06, 2019, 05:43:01 AM
#5
I guess there's no such way of removing addresses. You can have all the input into one address and import that address into a newly created wallet. You can't remove the addresses.
I found same topic earlier on this- https://bitcointalksearch.org/topic/my-electrum-wallet-contains-over-17000-addresses-growing-am-i-in-trouble-1118697

This is only true if the OP actually used his 60.000 addresses. But, if my interpretation of his op is correct, he just generated 60.000 addresses beforehand, so most of them will be unused. In this case, the procedure of my first post will probably help him. When the wallet is re-created from seed, electrum will stop deriving new addresses as soon as no funded addresses were found for the last 50 (or 100) newly derived addresses, so his wallet will probably end up containing little over 50 (or 100) addresses (depending on how many of those 60.000 addresses were already funded).
hero member
Activity: 1358
Merit: 851
November 06, 2019, 05:38:30 AM
#4
I guess there's no such way of removing addresses. You can have all the input into one address and import that address into a newly created wallet. You can't remove the addresses.
I found same topic earlier on this- https://bitcointalksearch.org/topic/my-electrum-wallet-contains-over-17000-addresses-growing-am-i-in-trouble-1118697
legendary
Activity: 2464
Merit: 3878
Hire Bitcointalk Camp. Manager @ r7promotions.com
November 06, 2019, 05:35:22 AM
#3
In addition I found this from google: https://bitcoin.stackexchange.com/questions/5385/how-can-i-delete-an-address-private-key-in-the-list-of-received-bitcoins

If you already have used any of the addresses then it's suggested to have the backup of the private keys.
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
November 06, 2019, 05:30:20 AM
#2
The easyest, non-technical way to do this, would be to make sure the gap limit is 50 or 100, then just restore the wallet from seed.
This will only be a problem IF you randomly picked and used addresses and left gaps of unused bigger than 50 (or 100). In this case you'll need to adapt your gap limit to the biggest gap between 2 used addresses.

Step 1, from the console:
wallet.change_gap_limit(50)
wallet.storage.write()

Step 2:
create a new wallet, from existing seed


PS: make a new wallet but keep the old one, especially if you have meta-data attached to transactions or addresses... Restoring from seed means you'll use this meta data (labels)
mk8
newbie
Activity: 10
Merit: 0
November 06, 2019, 05:28:24 AM
#1
Hello every body.

I pre-generated 60k addresses for accept payments on my site.
Unfortunately, it is taking 12 hours to synchronize my wallet.

I want to delete 20k addresses, is any way to do it with interface or console?

Thank you!
Jump to: