Bitcoin Forum

Bitcoin => Electrum => Topic started by: pitham1 on March 16, 2017, 12:17:54 PM



Title: Importing Private Keys
Post by: pitham1 on March 16, 2017, 12:17:54 PM
Hi,

I have created a new Electrum wallet by importing private keys from another client.
A few of the addresses are highlighted with a bright red colour in the background.
Is there anything I should know before using these addresses?


Title: Re: Importing Private Keys
Post by: mocacinno on March 16, 2017, 12:26:34 PM
Hi,

I have created a new Electrum wallet by importing private keys from another client.
A few of the addresses are highlighted with a bright red colour in the background.
Is there anything I should know before using these addresses?


Normally, a red color means that the addresses were created beyond the gap limit... In your case, there is no gap limit because you imported private keys (so you don't have a deterministic wallet).
I guess you could call it a "bug", altough i doubt it will do any harm, it's a feature for HD wallets that still gets triggered on a non-HD wallet.

I suppose the red background color will disappear once a couple of those adresses got inputs, and electrum deems the red colored addresses to be within the predefined gap limit.

But, anyways, bug or no bug, since you imported the private keys, there isn't much that could go wrong (or am i missing something here). Worst case scenario, you could always download core and import the same private keys there (altough i doubt it would ever come to that).

BTW: you could try to edit the gap limit to a number higher than the total amount of imported addresses, if you do this, the red background *SHOULD* dissapear.

EDIT => to increase the gap limit in 2.8.0
  • open electrum
  • go to the console
  • wallet.storage.put('gap_limit',1000)
  • close electrum
  • restart electrum


Title: Re: Importing Private Keys
Post by: pitham1 on March 16, 2017, 03:11:06 PM
Hi,

I have created a new Electrum wallet by importing private keys from another client.
A few of the addresses are highlighted with a bright red colour in the background.
Is there anything I should know before using these addresses?


Normally, a red color means that the addresses were created beyond the gap limit... In your case, there is no gap limit because you imported private keys (so you don't have a deterministic wallet).
I guess you could call it a "bug", altough i doubt it will do any harm, it's a feature for HD wallets that still gets triggered on a non-HD wallet.

I suppose the red background color will disappear once a couple of those adresses got inputs, and electrum deems the red colored addresses to be within the predefined gap limit.

But, anyways, bug or no bug, since you imported the private keys, there isn't much that could go wrong (or am i missing something here). Worst case scenario, you could always download core and import the same private keys there (altough i doubt it would ever come to that).

BTW: you could try to edit the gap limit to a number higher than the total amount of imported addresses, if you do this, the red background *SHOULD* dissapear.

EDIT => to increase the gap limit in 2.8.0
  • open electrum
  • go to the console
  • wallet.storage.put('gap_limit',1000)
  • close electrum
  • restart electrum

Thanks! I was just concerned because I saw the red colour for the first time.
Wanted to make sure that I didn't do anything wrong in the import process. Seems like everything is okay.


Title: Re: Importing Private Keys
Post by: Coin-Keeper on March 16, 2017, 08:20:23 PM
Hi,

I have created a new Electrum wallet by importing private keys from another client.
A few of the addresses are highlighted with a bright red colour in the background.
Is there anything I should know before using these addresses?


Normally, a red color means that the addresses were created beyond the gap limit... In your case, there is no gap limit because you imported private keys (so you don't have a deterministic wallet).
I guess you could call it a "bug", altough i doubt it will do any harm, it's a feature for HD wallets that still gets triggered on a non-HD wallet.

I suppose the red background color will disappear once a couple of those adresses got inputs, and electrum deems the red colored addresses to be within the predefined gap limit.

But, anyways, bug or no bug, since you imported the private keys, there isn't much that could go wrong (or am i missing something here). Worst case scenario, you could always download core and import the same private keys there (altough i doubt it would ever come to that).

BTW: you could try to edit the gap limit to a number higher than the total amount of imported addresses, if you do this, the red background *SHOULD* dissapear.

EDIT => to increase the gap limit in 2.8.0
  • open electrum
  • go to the console
  • wallet.storage.put('gap_limit',1000)
  • close electrum
  • restart electrum

Thanks! I was just concerned because I saw the red colour for the first time.
Wanted to make sure that I didn't do anything wrong in the import process. Seems like everything is okay.

I have never seen that either.  Once you run a few transactions through the address, and if the color changes to normal, will you please come back and post it here so we know for sure?  I love this forum.  Every single day I come here to read and learn.  When I find a thread like this I watch it.  Thanks in advance.


Title: Re: Importing Private Keys
Post by: torusJKL on March 19, 2017, 01:16:50 PM
I would recommend that you move the bitcoins from these imported addresses to one of the addresses Electrum has created.
This way you can toss the private key of those away and will only need the seed to recover you bitcoins in the future.


Title: Re: Importing Private Keys
Post by: Coding Enthusiast on March 19, 2017, 03:18:01 PM
Please update us in the future in case you found out why this was happening or in case it was fixed.
Thanks.


Title: Re: Importing Private Keys
Post by: Quickseller on March 19, 2017, 06:55:22 PM
IIRC, an address being highlighted in red means that BTC ended up in a change address that is expected to receive BTC after the next change address that is expected to receive change from a transaction spent from your wallet.

This could be an indication that a transaction that you sent (that includes a change address) failed to confirm and has dropped from the electrum server's mempool that you are using for whatever reason. It could also be an indication that you directed someone to send BTC to a change address in your wallet that is not the next change address in line to be used.


Title: Re: Importing Private Keys
Post by: pitham1 on March 26, 2017, 04:24:43 AM
I have never seen that either.  Once you run a few transactions through the address, and if the color changes to normal, will you please come back and post it here so we know for sure?  I love this forum.  Every single day I come here to read and learn.  When I find a thread like this I watch it.  Thanks in advance.

Please update us in the future in case you found out why this was happening or in case it was fixed.
Thanks.

The reason given by mocacinno was spot on.
As soon as my wallet had a few transactions, the red colour disappeared.


Title: Re: Importing Private Keys
Post by: ThomasV on March 26, 2017, 04:23:39 PM
Hi,

I have created a new Electrum wallet by importing private keys from another client.
A few of the addresses are highlighted with a bright red colour in the background.
Is there anything I should know before using these addresses?


which version of Electrum are you using?
could you please post a screenshot of your addresses tab?
(blur the addresses if you want)


Title: Re: Importing Private Keys
Post by: Coin-Keeper on March 27, 2017, 08:24:48 PM
I have never seen that either.  Once you run a few transactions through the address, and if the color changes to normal, will you please come back and post it here so we know for sure?  I love this forum.  Every single day I come here to read and learn.  When I find a thread like this I watch it.  Thanks in advance.

Please update us in the future in case you found out why this was happening or in case it was fixed.
Thanks.

The reason given by mocacinno was spot on.
As soon as my wallet had a few transactions, the red colour disappeared.


Thanks for posting back on this.  Hope you noticed Thomas' post asking for some more detail from your wallet.  Please keep this going if it sheds any light on this for the rest of us.

I am always a little afraid to import private keys.  Its seems like it causes "unique" issues.  Still learning.


Title: Re: Importing Private Keys
Post by: mocacinno on March 28, 2017, 06:03:22 AM
Hi,

I have created a new Electrum wallet by importing private keys from another client.
A few of the addresses are highlighted with a bright red colour in the background.
Is there anything I should know before using these addresses?


which version of Electrum are you using?
could you please post a screenshot of your addresses tab?
(blur the addresses if you want)

I can verify OP's problem, i recreated it by :
  • running vanitygen => vanitygen.exe -o mo.txt -k 1mo
  • Cleaning up mo.txt so it only included the private keys (about ~900 keys were created)
  • opening electrum 2.8.0, file => new/restore => delme => standard wallet => use public or private keys => paste 102 keys from my cleaned text file (i set my gap limit at 20)
  • output of the addresses-tab in screenshot

http://i63.tinypic.com/142br4y.png


I'm going out on a limb here, but it is my assumption that electrum does not diversifys between HD wallets created from seed and non-HD wallets created by importing private keys when it comes to marking addresses that are beyond the gap limit.
It might be a little bit annoying, but i don't think there's any harm.

BTW: ThomasV: if you're unable to replicate the situation, i would certainly be willing to zip up the wallet i created and send it to you in PM or over email... It's just some random generated vanity addresses with 0 inputs, so i wouldn't mind sharing those with you...