Bitcoin Forum
April 24, 2024, 08:19:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum: Can you recover new change addresses from seed?  (Read 193 times)
rpstatic (OP)
Jr. Member
*
Offline Offline

Activity: 53
Merit: 7


View Profile
July 18, 2018, 07:54:53 AM
 #1

I noticed a a nasty bug on the electrum wallet. If you use it regularly and don't have any change addresses left, electrum will create new ones for you.

If you then restore the wallet from the seed, the newly generated addresses aren't visible / availalable anymore. How can I check the correct balance on my new wallet? Would it be possible to sign from the missing change addresses?
1713989987
Hero Member
*
Offline Offline

Posts: 1713989987

View Profile Personal Message (Offline)

Ignore
1713989987
Reply with quote  #2

1713989987
Report to moderator
1713989987
Hero Member
*
Offline Offline

Posts: 1713989987

View Profile Personal Message (Offline)

Ignore
1713989987
Reply with quote  #2

1713989987
Report to moderator
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
mdayonliner
Copper Member
Sr. Member
****
Offline Offline

Activity: 630
Merit: 420


We are Bitcoin!


View Profile
July 18, 2018, 09:25:47 AM
 #2

How can I check the correct balance on my new wallet?
Isn't it suppose to show the total balance for the wallet on the bottom left corner?

Quote
Would it be possible to sign from the missing change addresses?
I never had this experience however from common sense it should work since the address is associated with the same wallet/seed. May be it does not show by default. If you know the address then why don't you try a test sign for the address?


Good luck.

Be happy be at peace. Looking forward to BTC at $1M
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3458
Merit: 6099



View Profile
July 18, 2018, 11:21:48 AM
 #3

Which version are you using? I'm not aware of such a bug but assuming this is a display issue only:

If you want to check your balance (console command):

Code:
getbalance()

To get all your addresses that have funds inside them:

Code:
listunspent()

After having your address, you could sign a message like this (It will ask you to type your password If you have any):

Code:
signmessage('address_here', 'Message_here')

█▀▀▀











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











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

Activity: 1624
Merit: 2481



View Profile WWW
July 18, 2018, 11:55:46 AM
Last edit: July 20, 2018, 09:17:16 AM by bob123
 #4

AFAIK electrum unfortunately does only allow to create new 'receiving' addresses via the console, but no change addresses.

In order to derive more change addresses from your seed, you will have to use another wallet/tool to derive them.

Since electrum does not use BIP39, you will have to export the master private key of your wallet.
To do this, you will have to open the console ('View' -> 'Show Console' -> 'Console'-tab). Then enter this command:

Code:
getmasterprivate()

This will print you out your mpk (will start with xprv..).

Afterwards either import it into another wallet (using the derivation path: m/44'/0'/1'/, for receiving-addresses: m/44'/0'/0'/ ) or download this site (https://iancoleman.io/bip39/) and run it on an offline PC to generate the private keys of your addresses (which you afterwards can import into another wallet).

BitMaxz
Legendary
*
Online Online

Activity: 3234
Merit: 2942


Block halving is coming.


View Profile WWW
July 18, 2018, 10:45:48 PM
 #5

I just want to add this --> You can disable the change address feature by going to tools>preferences>Click the transaction tab
then uncheck "use change addresses" so that if you send a bitcoin the electrum wouldn't make a new change address again then after that if you want to merge all of your balances in one bitcoin address just send all bitcoins to your own bitcoin address.

█▀▀▀











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











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

Activity: 3598
Merit: 1560



View Profile
July 19, 2018, 06:36:07 AM
 #6

what version of electrum are you using and what is your operating system?

it should generate the new change addresses automatically on restore. try switching servers via tools > network, right click on a server and select use server. If that doesn't do it go to wallet menu > addresses > filter then on the addresses tab you can fine tune the display using the filter selections up top. See if you can find the missing change address. ctrl+f can also be used to search for addresses on the addresses tab.

Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
July 19, 2018, 06:37:10 AM
Merited by pooya87 (1), HCP (1)
 #7

AFAIK electrum unfortunately does only allow to create new 'receiving' addresses via the console, but no change addresses.

you can generate new change addresses via wallet.create_new_address(True). put in a loop to make many change addresses.
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
July 19, 2018, 06:37:41 AM
 #8

I just want to add this --> You can disable the change address feature by going to tools>preferences>Click the transaction tab
then uncheck "use change addresses" so that if you send a bitcoin the electrum wouldn't make a new change address again then after that if you want to merge all of your balances in one bitcoin address just send all bitcoins to your own bitcoin address.

this is bad for your privacy and security and is not recommended.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
July 19, 2018, 01:59:46 PM
Last edit: July 20, 2018, 09:16:50 AM by bob123
 #9

AFAIK electrum unfortunately does only allow to create new 'receiving' addresses via the console, but no change addresses.

you can generate new change addresses via wallet.create_new_address(True). put in a loop to make many change addresses.

No. This does not work. Typos are evil.

This command worked in older versions of electrum.
The current command to create an address in electrum is createnewaddress().

There is no way to actually create a change address via the command line (afaik). createnewaddress doesn't take any parameters.

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 20, 2018, 09:01:05 AM
Last edit: November 15, 2023, 07:53:48 AM by HCP
Merited by bob123 (1)
 #10

you can generate new change addresses via wallet.create_new_address(True). put in a loop to make many change addresses.
No. This does not work.

Yes. It does:

Quote
>> wallet.create_new_address()
'bc1q7d0yqv39nmerhzxreakzhd8d28wn350kgv244e'
>> wallet.create_new_address(True)
'bc1q0x0d36v4wuz7yq629qwwu683qpxzxuk8chdv89'
>>
Which results in this:


You can see that the wallet.create_new_address(True) command created the 'bc1q0x0d...' address which is shown as a "change" address.

As Abdussamad said, if you want to generate multiples... use a loop like this:
Code: (Create 100 new change addresses)
for i in range(0, 100): print wallet.create_new_address(True)

Code: (Create 100 new "receive" addresses)
for i in range(0, 100): print wallet.create_new_address(False)


NOTE: the "True" and "False" are Case-sensitive...

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
July 20, 2018, 09:16:05 AM
 #11

You can see that the wallet.create_new_address(True) command created the 'bc1q0x0d...' address which is shown as a "change" address.

Weird.. i am certainly sure that this hasn't worked when i tried it..
Unfortunately this command doesn't appear in the list of commands (help()).


I guess this was my mistake  Roll Eyes

NOTE: the "True" and "False" are Case-sensitive...

pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10498



View Profile
July 20, 2018, 12:13:28 PM
 #12

very interesting. i messed around a little based on comments here and here is what i figured (my knowledge of Python is still zero Tongue) correct me if i am wrong.

when you call createnewaddress() inside the console, you are running a predefined command. so you are basically accessing this here which calls wallet.create_new_address() which passes False as its argument.

when you call wallet.create_new_address() you are calling the method itself directly from wallet.py file and False is just telling it that it is a receiving address not a change.
now what i don't get is that whether this is a python thing that you can call methods from one of the classes or whether the console.py file is responsible. i have tried reading it but honestly i have no idea what is happening there ...

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!