Author

Topic: Another deletion question (wallet temp files) (Read 154 times)

legendary
Activity: 3472
Merit: 10611
January 11, 2018, 11:53:12 PM
#8
somebody familiar with Python needs to review how the storage.py works!

i'll say it has something to do with the way the "atomic write" works at the bottom (L190,192,193) possibly throwing some permission errors which are not handled here.

https://github.com/spesmilo/electrum/blob/857eb4ac1d8e1ee24b48245ecaf59edcf096cbfa/lib/storage.py#L168-L196
jr. member
Activity: 51
Merit: 14
Quote
Quote
On the other hand, the very last file, from two days ago, is pure "garbage" from the beginning to the end — maybe something that came with the latest updates of Electrum? I also noticed that in the course of time all these files had gradually passed from ≈ 500kb in size to ≈ 1Mb, but that this last one is down to a half Mb.
"garbage" may be because your wallet was encrypted for this one. if you encrypt your whole wallet file you will see "garbage" but if only your seed, private keys are encrypted then you see what you posted above (a clean JSON) with only seed,... encrypted.
You're absolutely right: of course... I started encrypting the wallet just a few days ago.
jr. member
Activity: 51
Merit: 14
An issue like this has been seen before on windows: https://github.com/spesmilo/electrum/issues/3452
Thanks a lot, I'll take a look at it as soon as I can.

I've taken a look at the thread on GitHub. As said, my understanding of the workings Linux is minimal; my understanding of Windows = less than 0.

- at least I don't have such bad problems: my wallet file is fully functional and gets refreshed under its correct name everytime I launch and quit Electrum; the tmp files are an "extra".

- judging from the date stamp of the first tmp files, this has been going on since at least whichever Linux version of Electrum was current just over two years ago.

- I wouldn't know if DropBox exists under Linux, but it's nothing I've ever used, or ever would.

- it seems that these tmp files get created only when there's been a transaction. I haven't had any transactions since 3.0.3, so I can't tell if 3.0.5 has fixed anything in this regard (doubtful).


[PS - a bit puzzled that I have to go through a captcha rigmarole because the login session ran out]
legendary
Activity: 3472
Merit: 10611
In both cases, between these start and end strings (and I assume in all files from between those dates), there are long lists from the transaction history (histories?) and what appears to be transaction IDs and Bitcoin addresses.
these are contents of your wallet. if you open your defaulet_wallet you will see the exact same fields with same contents. which includes transaction history, private keys, public keys, seed, wallet type,... and even additional settings such as wallet window size (last field).

Quote
On the other hand, the very last file, from two days ago, is pure "garbage" from the beginning to the end — maybe something that came with the latest updates of Electrum? I also noticed that in the course of time all these files had gradually passed from ≈ 500kb in size to ≈ 1Mb, but that this last one is down to a half Mb.
"garbage" may be because your wallet was encrypted for this one. if you encrypt your whole wallet file you will see "garbage" but if only your seed, private keys are encrypted then you see what you posted above (a clean JSON) with only seed,... encrypted.

Quote
Maybe the programmers could shed a light on all this?
from the link @Abdussamad posted my guess is Electrum is facing a problem while saving/updating your wallet file and instead it saves a temp file.
legendary
Activity: 3682
Merit: 1580
An issue like this has been seen before on windows: https://github.com/spesmilo/electrum/issues/3452
jr. member
Activity: 51
Merit: 14

Expecting to find only "garbage" I hadn't looked. But this is what I have found now.

The first of these files, from over two years ago, begins with

{
    "accounts": {
        "0": {
            "change": [


and ends with

    },
    "wallet_type": "old",
    "winpos-qt": [
        289,
        76,
        761,
        865
    ]
}



The next to last file, from two weeks ago, begins with

{
    "accounts_expanded": {},
    "addr_history": {


and ends up with


},
    "wallet_nonce": 29,
    "wallet_type": "standard",
    "winpos-qt": [
        196,
        155,
        915,
        835
    ]
}


In both cases, between these start and end strings (and I assume in all files from between those dates), there are long lists from the transaction history (histories?) and what appears to be transaction IDs and Bitcoin addresses.

On the other hand, the very last file, from two days ago, is pure "garbage" from the beginning to the end — maybe something that came with the latest updates of Electrum? I also noticed that in the course of time all these files had gradually passed from ≈ 500kb in size to ≈ 1Mb, but that this last one is down to a half Mb.

Maybe the programmers could shed a light on all this?

In the meanwhile, I've trashed them all and re-launched Electrum without problem, but I haven't done any transaction (no need for any right now). I'd still like to know how to avoid such files being created, or, if they have to be created, how to make sure they get automatically erased when no longer in use.
legendary
Activity: 3472
Merit: 10611
i am not sure why you are seeing these files and what they are, but what i can tell you is that all you need is your seed words. write them down on a piece of paper and even if you delete something that you shouldn't have deleted like your wallet file then you can always recover it from seed.

have you tried opening these files to see their contents?
jr. member
Activity: 51
Merit: 14
Three Electrum installations: 2 Macs, 1 Ubuntu.

In Ubuntu, I found in the wallets directory — besides the real wallet file — a slew of Mb of files all named "[wallet name].tmp.1234", where 1234 is a sequence of four different digits. Those files go years back, and a new one gets apparently created every time I launch Electrum. In the Macs' wallets directory, there's no such files, only the wallet.

So the question is: is it OK to erase all those tmp files, and how can I prevent them from being created? Btw., the Mac GUI is my normal abode, and I am by no means a Linux expert.

Thanks,

Robert-the-Clutterfree
Jump to: