Pages:
Author

Topic: History of transactions and balance don't match after switching to Electrum (Read 273 times)

legendary
Activity: 2730
Merit: 7065
Btw, there is one thing about setting up new wallets with the same private keys, which is may be a myth or prejudice. But I have heard this several times.
As an unexperienced newbie I cannot evaluate if it is true or false.
It is the following: private keys change every time when one makes a transaction or receives btc, or even just launches a wallet online.
As has been explained to you, the private keys don't change. The addresses that hold your coins change when you send Bitcoin to someone. Since an address is emptied of all its coins no matter how much you send, importing the private key of the old address will show you a zero balance. Maybe that's the confusion. If there are no coins on the address, it makes no sense importing its private key.

Let's explain it this way.

Your Gorilla22 address #1 holds 1 BTC.
You have the private key of that address. Let's call it Gorilla22 address #1 private key.   
 
You buy some gear from me for 0.3 BTC. The transaction is made from Gorilla22 address #1.
I receive 0.3 BTC, some of your sats are used for network fees, and the rest gets sent to Gorilla22 change address #1.

A year from now, you decide to use a different wallet. You remember that you had bitcoin in Gorilla22 address #1 because that's the only funded address you used in your wallet. You also find Gorilla22 address #1 private key in your personal notes. You import the private key only to see that the wallet is empty and you have no bitcoin in it. But you are forgetting that the address has to be empty because you purchased some items from me and your change went elsewhere. The private keys never changed. They still recover your old address, but it's just an address that is empty now. What you need is the correct change address and it's private key, which you found already.
jr. member
Activity: 42
Merit: 66
Thank you! This explains a lot about private keys!



hosseinimr93,

It worked with change addresses!
Balance on Electrum got updated!
0.0006 btc, just like it is on Core!

Thank you!!!!
legendary
Activity: 2380
Merit: 5213
It is the following: private keys change every time when one makes a transaction or receives btc, or even just launches a wallet online.
For each of your addresses, you have a private key and that never change.
Take note that we don't deal with a centralized party that changes your private key. Each private key is derived from a random number through mathematical calculations.
All your private keys and all associated addresses are always valid and can be used as many as times you want.

Your confusion may come from generation of a new address every time you receive bitcoin.
Due to privacy reasons, it's always recommended to use new addresses and not reuse addresses and that's why some wallets generate new addresses. That doesn't mean old addresses and their private keys become invalid. They will work forever.
jr. member
Activity: 42
Merit: 66
Many thanks for useful info and great advices!

Btw, there is one thing about setting up new wallets with the same private keys, which is may be a myth or prejudice. But I have heard this several times.
As an unexperienced newbie I cannot evaluate if it is true or false.
It is the following: private keys change every time when one makes a transaction or receives btc, or even just launches a wallet online. Therefore, only "the last" private keys are valid. So if there are for example 2 wallets with the same private keys, and you launch one of them, you authomatically make another wallet useless because its private keys became not valid anymore.
Is it a kind (at least partially) of a true thing?
I heard this several times from several different people.
legendary
Activity: 2380
Merit: 5213
Not sure if there is a command which returns only funded addresses
You can use listreceivedbyaddress command to see balance of all your receiving addresses.
You can also use listunspent command to know which addresses contain unspent outputs.

The problem is that you have to sync your wallet before using these commands.
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
Is there a way to find out which addresses from that list are worth to import? :-)
Not sure if there is a command which returns only funded addresses but based on the information you provided, it looks like only the change address from the most recent outgoing transaction still has a balance (0.0006btc).
Look up that transaction ID on any block explorer, copy the address which received 0.0006btc,dump its private key from core then import it into Electrum.
legendary
Activity: 2380
Merit: 5213
Yes I was making transactions from Core.
So, it's possible that you have bitcoin in your change address(es).
In one of your previous posts, you said that you imported private keys of your receiving addresses. That's probably why you didn't get the correct balance on electrum. You missed change addresses.


Btw, will it work if I delete this Electrum and set up a new one, importing all necessary private keys into it?
Yes, you can create as many as wallets you want. Nothing stops you from doing that.
jr. member
Activity: 42
Merit: 66
hosseinimr93,

Yes I was making transactions from Core.
Actually, I understand now it is not a good way to switch to Electrum.
But now, after I have tried this, I want to experiment further to see how it all works :-)
Btw, will it work if I delete this Electrum and set up a new one, importing all necessary private keys into it?
legendary
Activity: 2380
Merit: 5213
Is it necessary to import the whole list to Electrum?
If you don't know which of them are funded and which of them are empty, you can import all the private keys.


Or just to choose only change addresses?
You didn't answer the question I asked in my previous post.

Have you ever made any transaction with your wallet?
If no, there is no need to import private key of change addresses. All of them are empty.
If yes, you can check those transactions in a block explorer, find the change address and import their private keys into electrum.
jr. member
Activity: 42
Merit: 66
Is there a way to find out which addresses from that list are worth to import? :-)
jr. member
Activity: 42
Merit: 66
Is it necessary to import the whole list to Electrum?
Or just to choose only change addresses?
jr. member
Activity: 42
Merit: 66
Wow!
It's a huge list!
jr. member
Activity: 42
Merit: 66
This is a great idea with dumpwallet!

But what file name must be a "filename"?
Is it wallet.dat file with full path?


legendary
Activity: 2604
Merit: 2353
hosseinimr93.

I suspected that there were some private keys which I missed to export from Core.
If so, it would explain something.

I didn't see you have exported your private keys one by one by making a dumpprivkey on each address. Why haven't you made a dump of your whole wallet in one time by using dumpwallet ? It's easier, faster and you would be sure to get all the addresses of your wallet at least. I hope you have missed some addresses, it would add some extra coins to your balance even if it wouldn't explain the strange transaction from 2017 that you don't remember.

dumpwallet "filename"

Arguments:
1. filename    (string, required) The filename with path (absolute path recommended)

Result:
{                        (json object)
  "filename" : "str"     (string) The filename with full absolute path
}

Examples:
> bitcoin-cli dumpwallet "test"


https://bitcoincore.org/en/doc/22.0.0/rpc/wallet/dumpwallet/


This is a great idea with dumpwallet!

But what file name must be a "filename"?
Is it wallet.dat file with full path?
No it's just the name you want to give to your dump file and eventually its path if you want to create it in another directory.
jr. member
Activity: 42
Merit: 66

hosseinimr93.

I suspected that there were some private keys which I missed to export from Core.
If so, it would explain something.
jr. member
Activity: 42
Merit: 66
Yes I did transactions on bitcoin Core!
How can I find those change addresses in Core?
legendary
Activity: 2380
Merit: 5213
Have you ever made any transaction in bitcoin core?
If you have done so, it's possible that the missing fund is on your change address(es).

Take note that if you make a transaction in bitcoin core, the remaining balance goes to a new address called change address. If that's the case, you need to import the private key of the change address into electrum.
legendary
Activity: 2604
Merit: 2353
I checked all 3 addresses on a blockchain explorer.
Zero balance, the last transaction in 2017.
The last transaction is just like the one on Electrum.
But I remember that I didn't do that transaction......
So it seems your bitcoin core wallet is not fully synchronized as I suspected. It must be sad for you to discover that your wallet was already empty in reality and that you have done all of this for nothing at the end. But if you didn't make that transaction, someone else has done it and five years later it will be hard to find the thief unfortunately. I recommend you to closely monitor the rest of your funds now, to fully check your computer with an anti-virus software and to not let anyone use your computer when you're not next to it.  
jr. member
Activity: 42
Merit: 66
Yes addresses are the same on both Core and Electrum.



The strange thing is, that Electrum is showing the last transaction as 0.07 btc sent from my wallet, thus bringing balance to zero. There is this transaction on blockchain explorer.
While Core showing the totally different amount on last transaction, and the balance after it 0.0006 btc.
jr. member
Activity: 42
Merit: 66
I didn't experiment with Segwit then in 2017.
Pages:
Jump to: