Read-only wallet export_transfers broken after key image import
tokerato opened this issue · 9 comments
Ubuntu 20.04 / Oxen 9.2.0
1)Exporting key image from full-access wallet
2)Using a read-only / view key wallet to import latest key image file
3)Key image file loads successfully
4)export_transfers 0 <key_image_blockheight-1) exports output.csv but results of output.csv are wrong.
but results of output.csv are wrong.
Can you elaborate on what is wrong?
running balance
I observed something with multi-output transactions, which might perhaps involve transactions that the wallet itself created (as opposed to transactions it learned about from the blockchain).
Can you try loading the (full) wallet into a new copy of the wallet from seed, so that it entirely syncs from the blockchain? (Alternatively you can do a rescan_bc
, but ideally only do that on a copy because it does appear to lose some tx details such as recipients).
(That isn't a solution but might help me narrow it down).
Also: does the export from the view-only wallet (loaded with key images) show proper balances?
No, the problem I am having is that export_transfers on the view-only wallet is showing an incorrect running balance(column G) on export transfers.
Is it adding to the total incorrectly in many different places, or is there one tx in particular that causes the issue? (I'm trying to reproduce in a testnet wallet, but so far the view wallet with import key images looks to be working properly with what I've thrown at it).
I've reproduced it with a view wallet, investigating now.
I have some builds that potentially fix this issue. These will require that the view-only wallet do a rescan_bc
and then re-import the key images (the bug causing this happened when importing key images).
To check if it's the same issue I found/fixed: the running balance problem appears to go "wrong" when there are both "in" and "out" entries listed for the same transaction; in such a case there should only be an "out"; the view wallet was deleting one of the "in"s, but should have been deleting all of them.
You can grab builds with this test fix from here:
Windows: https://oxen.rocks/jagerman/loki/wallet-csv-export-fixes/oxen-win-x64-9.2.0-dev-546a9d205.zip
Linux: https://oxen.rocks/jagerman/loki/wallet-csv-export-fixes/oxen-linux-x86_64-9.2.0-dev-546a9d205.tar.xz
Mac: https://oxen.rocks/jagerman/loki/wallet-csv-export-fixes/oxen-macos-9.2.0-dev-546a9d205.tar.xz