Author

Topic: A couple of Electrum questions (Read 175 times)

legendary
Activity: 3472
Merit: 10611
January 25, 2018, 12:10:07 AM
#5
My question now is: If im using Electrum as cold storage, how will my wallet know when it needs to generate new coins? Since the wallet is never updated as it's never connected to the internet, it cannot know if an address was used, therefore it cannot know when to generate new addresses.

you don't have to worry about that, it works. because when you create an unsigned raw transaction on your online computer your watch only Electrum includes necessary data in the tx hex for your offline Electrum to know what to do. next time check the ScriptSig of your raw unsigned transaction and you will see your public key there.

after that i assume your cold storage seeing this pubkey tries to see if it belongs to your MPK and if it does then it allows you to sign the transaction and generates the requires private key from your seed on the fly.
legendary
Activity: 1372
Merit: 1252
January 24, 2018, 02:06:26 PM
#4
Thanks, I will stick to the addresses list then, since I don't really need to generate QR codes right now in the "Receive" tab. I will also try "listaddresses()" later.

My question now is: If im using Electrum as cold storage, how will my wallet know when it needs to generate new coins? Since the wallet is never updated as it's never connected to the internet, it cannot know if an address was used, therefore it cannot know when to generate new addresses.
legendary
Activity: 3710
Merit: 1586
January 23, 2018, 12:28:25 PM
#3
1) The purpose of the receive tab is explained here. It's just to provide a workflow for receiving bitcoin. If you prefer to use the addresses tab instead then that is ok too.

2) Disable full wallet file encryption if opening electrum is too cumbersome for you. That is go to wallet menu > password enter your password in all three fields and uncheck encrypt wallet file at the bottom. If you do it like this you will still need the password to spend your bitcoins but not to view your wallet file and get receiving addresses.

Otherwise do as xdrpx said. That command can also be run on the command line `electrum listaddresses` on linux and MacOSx.

3) Addresses are generated in sequence and behind the scenes each address has an index number like 0,1,2 etc. Electrum considers an address as "used" if it has received bitcoin to it at least once. Electrum maintains 20 unused addresses past the index of the last used address. That number 20 is the default gap limit or lookahead window. So the answer to your question is that as you start to receive funds to your addresses Electrum will generate new ones automatically.

Note that if you change the gap limit like xdrpx said you better make sure to note it down alongside your seed backup so that if, in future, you restore your Electrum wallet you can change the gap limit again. You will have to do that if you restore from seed.
hero member
Activity: 616
Merit: 603
January 23, 2018, 11:57:58 AM
#2
1) Do you have to have the addresses on "Receive" in order to receive the coins, or can you receive coins by giving the address straight from the "Addresses" tab? I assume you don't need to since you still own the private key but just in case..

A- You can copy the addresses and receive to any of those addresses from the address tab. You can either choose to do this or you can just stick to the receiving address that electrum newly generates for you after a payment has already been received on the old one.

2) Can I import the list of addresses so I don't need to open Electrum every time I need an address? I saw that exporting "Labels" only exports the ones where you added a label name, I just need the list of addresses. Also I had 2 addresses with 2 labels and the resulting .json file had it in the wrong order (Label for the addresses was flipped for some reason)

A- I used to be able to run
Code:
listaddresses() 
in console to view all my receiving addresses. It's been a while since I've opened up my client to retry this, but you could give it a shot and let me know if it works? Also, there's a good post here https://bitcointalksearch.org/topic/m.7378379 on how you can print a list of addresses with 0 balance and no transaction history.

3) What happens when I run out of addresses from the "Address" tab and I need new addresses?

A- Electrum will keep generating a couple of addresses for you everytime you use one of them. You can also change how many addresses electrum can generate for you by adjusting the gap limit -
 
Code:
wallet.change_gap_limit(30)
wallet.storage.write()
After this restart Electrum.
legendary
Activity: 1372
Merit: 1252
January 23, 2018, 11:51:57 AM
#1
Im trying out Electrum lately for the first time in order to be able to use bech32 addresses and im a bit confused about the layout.

We have the "Receive" tag, and this opens a section where you only see one address. You can click "new" and it creates another address. These are addresses taken from the "Addresses" tag which is hidden by default.

So my questions are:

1) Do you have to have the addresses on "Receive" in order to receive the coins, or can you receive coins by giving the address straight from the "Addresses" tab? I assume you don't need to since you still own the private key but just in case..

2) Can I import the list of addresses so I don't need to open Electrum every time I need an address? I saw that exporting "Labels" only exports the ones where you added a label name, I just need the list of addresses. Also I had 2 addresses with 2 labels and the resulting .json file had it in the wrong order (Label for the addresses was flipped for some reason)

3) What happens when I run out of addresses from the "Address" tab and I need new addresses?
Jump to: