vergecurrency / verge

Official Verge Core Source Code Repository :muscle:
https://VergeCurrency.com
MIT License
1.4k stars 393 forks source link

Same recieving address on both Qt 4.0 and Electrum wallet. (2 wallet linked together) #613

Closed typer0186 closed 6 years ago

typer0186 commented 6 years ago

Context

Long story short. I tried to import a paper wallet into Qt 4.0. Tried "walletlock","walletpassphrase 600"," importprivkey" but keep on getting this error "error adding key to wallet". So I decide to install Windows Electrum and import the paper wallet. It worked. Electrum have my paper wallet balance. Qt have my pre-electurm balance only, (no paper wallet balance)

Now here is the issue:

1 Both wallet Qt and Electrum have the same receiving addresses.

2 Everytime I send XVG from my Electrum wallet, it deducts from my Electrum and Qt wallet at the same time. Both balances goes down. (but when i send from Qt 4.0, electrum wallet doesnt get deducted)

Somehow the Receiving address is linked to both wallet.

As of now I can't send out XVG, because both of my wallet balances will go down what I send out. I have tried to test send some XVG to @warmwires on Discord with the same outcome. He knows my situation. we deleted Qt, scanalltrx, did a lot of things but nothing has worked yet. My Discord: GreenTea

The address that appears on both Qt and Electrum: DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR

Screenshots

These screenshots are from when I sent my brother 7 XVG for a test.

capture Qt 4.0 wallet

capture1 Electrum Wallet

capture2 Qt wallet

capture3 Electrum wallet (unverified on all transaction)

typer0186 commented 6 years ago

Electrum sent 7 xvg, both wallet shows -7. Electrum sent 4 xvg, Electrum shows -4 but Qt shows -1 (for the 1 xvg fee?) but not -4.

typer0186 commented 6 years ago

No help? If I add the old wallet.dat back (pre issue), will it delete the duplicate addresses?

jrsikors commented 6 years ago

Sorry I missed this one ..

First off -- toss up a screenshot of your QT wallet -- help -> debug window (information tab that shows block status and version)

jrsikors commented 6 years ago

And what does your balance show on: Electrum - DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR QT - DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR

Does it show: Electrum: 6976.70000000 Verge: 6979.70000000 (3 higher than electrum)

jrsikors commented 6 years ago

Also you said this:

Electrum sent 7 xvg, both wallet shows -7. Electrum sent 4 xvg, Electrum shows -4 but Qt shows -1 (for the 1 xvg fee?) but not -4.

You made the 4 XVG transaction on February 12th. Your -1 'transaction' on QT is from your transfer on February 11th.

So your QT is completely missing the "4 xvg transaction" on the 12th.. not partial as you stated .. that's worth noting while troubleshooting... big difference :smile:

jrsikors commented 6 years ago

And sorry I'm a spammer, couple more things:

1) try doing the scanforalltxns again on your verge-qt wallet ... help -> debug window -> console -> scanforalltxns (and wait 10-30 mins until it finishes)

2) is your Electrum wallet online/connected/sync'd? After fork some of the old electrum servers are not so good.

https://www.reddit.com/r/vergecurrency/comments/7uelnl/electrum_wallet_offline_please_help/

There's a link to a youtube video that looks good

Nutshell instructions: Step 1) Close down Electrum wallet Step 2) Browse to where your Electrum 'installation' is Step 3) Go into the Lib folder Step 4) Open network.py in notepad or textpad , some kind of text editor Step 5) Replace this chunk of code:

DEFAULT_SERVERS = { 'electrum-verge.xyz':{'t':'50001', 's':'50002'}, 'electrum-xvg.stream':{'t':'50001', 's':'50002'}, 'electrum-xvg.party':{'t':'50001', 's':'50002'} } With this chunk of code:

DEFAULT_SERVERS = { 'electrum-verge.xyz':{'t':'50001', 's':'50002'}, 'electrum-xvg.stream':{'t':'50001', 's':'50002'}, 'electrum-xvg.party':{'t':'50001', 's':'50002'}, 'e1.verge-electrum.com':{'t':'50001', 's':'50002'}, 'e2.verge-electrum.com':{'t':'50001', 's':'50002'}, 'e3.verge-electrum.com':{'t':'50001', 's':'50002'} } step 6) Open Electrum step 7) Go to tools -> network step 8) Make sure "Auto-connect" is checked, and the 3 electrum servers are listed: e1.verge-electrum.com e2.verge-electrum.com e3.verge-electrum.com

jrsikors commented 6 years ago

This is what I would do if I were you to get back to normalcy: Step 1) Identify all addresses where you have coins ... verify on verge-blockchain.info Step 2) Export/write down all private keys of those addresses that have coins from step 1 Step 3) With Verge-QT closed down, rename your wallet.dat to walletold.dat Step 4) Open Verge-QT Step 5) Encrypt wallet ... verify you can lock it and unlock it... close QT out .. re-open .. try to unlock/lock Step 6) Import private key(s) from step 2 Step 7) Backup the new wallet.dat Step 8) Create/put all older wallet.dats in a folder called "Really_Old_Verge_Stuff_For_Emergency_Only"

justinvforvendetta commented 6 years ago

yeah of course both wallets show different balances because multiple addresses in each and each have combined balances

typer0186 commented 6 years ago

sorry i was away for a time being. Jrsikors, I will try what you say. Justinvforvendetta, The issue is not the balances on both wallet. The main issue is funds from both wallet are separate funds, but when I send xvg out of Electrum it also deducts that amount on Qt. Electrum only has 1 imported paper wallet for the total balance. Qt have my other xvg's (no paper wallet balance was imported) but somehow the address of the paper wallet was imported (not the funds)

typer0186 commented 6 years ago

@jrsikors image

typer0186 commented 6 years ago

Balance on Electrum: 6976.7 How do I check the balance of DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR on QT? Original paper wallet amount was 7018.7 Xvg. That amount is correctly imported into Electrum. But no where I see that balance on QT but the receiving address is on Qt.

jrsikors commented 6 years ago

https://verge-blockchain.info/address/DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR You have 6976.7 on that address ..

On Verge-QT-- Open Help -> Debug Window -> Console type: listaddressgroupings

It should list all the addresses in your QT Wallet, and how many XVG they have on each.

You MIGHT need to give each address in receiving address a "label"... I've noticed that if you have a bunch of blank addresses, sometimes it groups them together and gives confusing results.

But try it before you give them labels and see what you get

typer0186 commented 6 years ago

Electrum was synced. But did all of the above to change the network.py Still the same

typer0186 commented 6 years ago

Qt is still on scanforalltxns Will see listaddressgroupings when it's done

jrsikors commented 6 years ago

I think it's probably what @justinvforvendetta said ... you are probably set up like this but don't know:

EXAMPLE:

QT Wallet: AddressA - 1000 coins AddressB - 500 coins AddressC - 5 coins

Electrum Wallet: AddressA - 1000 coins AddressD - 25 coins

Note how your QT wallet has addresses A, B , C Note how your Electrum wallet only has addresses A, D

So QT is missing D Electrum is missing B and C

Thus -- difference balances

typer0186 commented 6 years ago

I will let you know after I scan the balance on the address

jrsikors commented 6 years ago

And what I posted a couple days ago is still true ... on what you should do to get out of this confusion:

This is what I would do if I were you to get back to normalcy: Step 1) Identify all addresses where you have coins ... verify on verge-blockchain.info ... in both Electrum and Verge-QT Step 2) Export/write down all private keys of those addresses that have coins from step 1 Step 3) With Verge-QT closed down, rename your wallet.dat to walletold.dat Step 4) Open Verge-QT Step 5) Encrypt wallet ... verify you can lock it and unlock it... close QT out .. re-open .. try to unlock/lock Step 6) Import private key(s) from step 2 Step 7) Backup the new wallet.dat Step 8) Create/put all older wallet.dats in a folder called "Really_Old_Verge_Stuff_For_Emergency_Only"

typer0186 commented 6 years ago

Thanks. I going down on your list one at a time. will try it all

jrsikors commented 6 years ago

When you make a transaction in Verge-QT wallet, sometimes the 'change' funds get sent to a different address. You still own the new address. You just don't fully realize your funds are now split up between multiple addresses.

In reality it doesn't matter -- it's just confusing if you are using Electrum and Verge-QT and expecting them to be the same :smile:

good luck

typer0186 commented 6 years ago

So maybe I have a missing address on my Qt?

typer0186 commented 6 years ago

scanall is complete nothing different. will try the steps now

jrsikors commented 6 years ago

or a missing address on your Electrum.

I would simply say: Don't use both Verge-QT and Electrum unless you are really advanced in all of this crypto stuff and fully understand.

Even if you are advanced in all this crypto stuff, it's still an unnecessary, annoying, and confusing situation you will bring upon yourself :smile:

typer0186 commented 6 years ago

Qt: DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR", 6976.70000000,

typer0186 commented 6 years ago

But I dont see the balance reflected on the account?

typer0186 commented 6 years ago

the reason I have electrum is because Qt wouldnt import my paper wallet, Then I made a new electrum wallet just to import the paper wallet.

jrsikors commented 6 years ago

What balance amount does the Verge-QT wallet say you have on the main wallet screen?

typer0186 commented 6 years ago

When i tried to import the paper wallet to Qt at first it kept saying "error importing"..... Thats when I made a electrum wallet

typer0186 commented 6 years ago

222,189.66 QT 6976.7 Electrum

jrsikors commented 6 years ago

222,189.66 minus 6976.7 = 215,212.96

So do you have another address in the QT wallet with 215,212.96 XVG? Or other addresses that add up to that?

typer0186 commented 6 years ago

I added all the address up from listaddressgroupings: 215,204.9

typer0186 commented 6 years ago

Thats from 12 address on QT including the 6976.7

typer0186 commented 6 years ago

Wow the differences is around 7k xvg

jrsikors commented 6 years ago

super confused... Your listaddressgrouping says: Qt: DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR", 6976.70000000,

https://verge-blockchain.info/address/DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR says you have 6976.70000000

I'm not sure what you think the problem is.

typer0186 commented 6 years ago

Hidden address some where?

typer0186 commented 6 years ago

Can I send you some XVG to see what im talking about? then i can send you the screen shot of it.

typer0186 commented 6 years ago

So balance is 222,189 xvg. but listaddressgrouping shows 215,204 xvg. Difference that listadd dont see 6985 xvg

jrsikors commented 6 years ago

So yeah now that I think about it -- I think the failed private key import did something wonky.. and the DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR address is stuck between 'in' and 'not in'.

I hate to suggest this, because it can get tricky .. but do you have a copy of your wallet.dat before you tried the import?

I would revert back to that ... BUT I would make sure you make a backup of your CURRENT wallet.dat , because you want to make sure no new addresses have been created since your old copy.

typer0186 commented 6 years ago

ok i will try to do that i still have the dat file

jrsikors commented 6 years ago

step 1) Backup current wallet , call it verge2018-02-28.dat step 2) Restore older wallet from before import step 3) make sure your 215,204 all show up step 4) ... try to import the private key of DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR again ? No reason why it shouldn't work

typer0186 commented 6 years ago

I think it works!! shows 215,212 xvg. Should I import privkey? or Just send it from electrum wallet?

typer0186 commented 6 years ago

Weird that some of my old receiving address is not on here? Make is easy, i'll just make sure not to send to the missing address again.

typer0186 commented 6 years ago

@jrsikors Thank you!!

jrsikors commented 6 years ago

Easy thing to do is to send it from Electrum

What I would do -- if I was bored and had time (usually both applies for me) ... I would now try to import the private key again.

It it fails .. shut down qt and load the old wallet.dat again .. and then give up and send from electrum

typer0186 commented 6 years ago

importprivkey xxx "Error adding key to wallet" walletpassphrase xxx 600

? Still waiting for it to do something. lol

jrsikors commented 6 years ago

Did the address show up halfway again in listaddressgroupings? Or did it outright fail now and "Error adding key to wallet" is a different error than you got last time?

jrsikors commented 6 years ago

the steps to import would be:

Step 1) walletpassphrase "YOUR PASS PHRASE HERE" 600 step 2) importprivkey YOURPRIVKEY

typer0186 commented 6 years ago

Ohh i got it backward then opps

typer0186 commented 6 years ago

I did last time and this time . importprivkey first then walletpassphrase Lets see if it works now

typer0186 commented 6 years ago

The import key worked!!! The DDPVCBroBkeWaZnJyJ8fiwhsaA6gniT3vR address is not on Qt any longer. Qt always creates new receiving address out of no where. No way it can be deleted?

@jrsikors Thanks a bunch!!

jrsikors commented 6 years ago

just google "bitcoin change address" ... just keep the policy of "always backup your wallet.dat after every transaction" and you won't ever get burned.