-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beacon advertisement drains balance #2321
Comments
Update: I opened my wallet on Ubuntu and after syncing it appears the balance draining transaction wasn't there. I will try to resync on Windows now to see if that gets rid of it there too. If so, I will close and hope it never happens again. |
If you haven't resynced, could you show the transaction details for both of the transactions? |
Ok so resyncing (from zero) did not fix it on Windows. The bogus transaction just shows up again. I have pasted the transaction details below (they are exactly the same, but this is actually what I got out of both transactions in the client: Transactions>right click>Show transaction details): For the expected transaction (-0.5 GRC): https://pastebin.com/AbeYLMM7 Would a complete reinstall of Gridcoin be able to fix more than the resync I already did? I'm a little more at ease now than I was a few hours ago since I saw the balance was still there on Ubuntu, but I would like to get it fixed on Windows too as I will be spending a considerable amount of time there as well. |
For comparison, these are the transaction details when I get them from the Ubuntu client (which I believe to be the correct ones): https://pastebin.com/NA2yBGQP |
Do you run two instances of the wallet at the same time? |
Hmm... Very interesting. My guess is that @sibebleuze has been running two wallets with the same keys at the same time, and of course they both tried to advertise a new beacon at the same time. Has a repairwallet been attempted on the Windows node? |
... And... @sibebleuze you are not supposed to be running two wallets at the same time with the same keys... |
@div72 the dumpprivkey RzaJyJLZ7gqSC6sfqr6ybJWiu4T1mkZdHc is not known on Windows, whereas it is on Ubuntu. |
An automatic readvertisement uses the same key. |
@sibebleuze As long as they both have the same BDB version and they're not running at the same time, it shouldn't be a problem. Please also check if they have the same addresses as the keypool might have been re-filled. @jamescowens They are talking about the change address, I suppose they either exhausted their keypool or IsMine does not check the addresses in the keypool(most likely). |
@sibebleuze The PPA for Ubuntu uses BDB version 5.3 whereas the Windows executable uses BDB 4.8. You will not be able to cross utilize the same wallet.dat file for both. (Unless you convince me to make you a special build of the Windows with BDB 5.3 compiled in instead... ) :) |
@div72... that makes sense. The change return UTXO on the beacon transaction on the node that did not initiate the transaction will not be seen as IsMine(). On the node that initiaited the transaction, the keypool was utilized for the change address of the return, and so shows as IsMine() and is credited to the wallet's balance. We should think about checking the addresses in the keypool for the IsMine filter. I wonder if there are any downsides to that? This whole thing is an artifact of running two wallets with (initially) the same set of keys at the same time... |
Ah... a better idea would be to modify the beacon advertisement transaction to use the originating address as the change address... |
We should go look at that. |
I've had a look at the whole thread again and got some ideas. I decided to first try 'repairwallet', which was suggested somewhere along the way, but didn't do anything. |
@jamescowens May I persuade you to go BDB 5.3 in normal builds? I will eventually(before the next century at least) get around porting sqlite wallets but I'd prefer if we could get everyone to 5.3 for now.
I thought about the same thing but I am a bit worried about the possible performance impact. Be reminded that this issue would also affect people using a backup before a beacon advertisement.
Agreed. It might have a little privacy impact as it'll prevent people from crafting beacon advertisement transaction to send coins but that does sound a bit too far-fetched and using Monero at that stage would be a better idea. |
Closing this in favour of #2326. @sibebleuze Please note that while that solution did work for now, using two copies is messy and you will have to manually sync the files. |
Bug Report
Current behavior
My Gridcoin wallet did an automatic beacon advertisement last night, with the expected withdrawal of 0.5 GRC. I didn't notice at first, but at the same time, my whole wallet was drained and now has a balance of 0 GRC. The weird thing is that if I look it up on a block explorer, the address it was sent to belongs to my CPID, same as the the address it was sent from. However, my wallet says 0 GRC, as can be seen on the screenshot below.
Expected behavior
Beacon advertisement uses a small amount of GRC, for example 0.5 GRC, and leaves the rest of the wallet untouched.
Steps to reproduce:
Wait for automatic beacon renewal I think. The last thing I did myself was consolidate my whole balance to 1 address. This was approximately 18 hours before the beacon was renewed.
Screenshots
Pay attention to the last two transactions and the current balance. These are the ones involved in this issue.
Gridcoin version
Gridcoin v5.3.2.0-gfe6ab878a
Machine specs
Extra information
contents of debug.log file: https://pastebin.com/nmVXK88F
the beacon renewal transaction which drained my wallet: https://www.gridcoinstats.eu/tx/96c4ac8bfdfb1e5b81d32d9a32cbf3f956c9610595e10c40f13994c94b7410ab
summary on the address it was sent from (note my CPID): https://www.gridcoinstats.eu/address/SF3UktSxkFm1CZXvNRBkEra2gHjbbF1Qit
summary on the address it was sent to (note the exact same CPID): https://www.gridcoinstats.eu/address/RzaJyJLZ7gqSC6sfqr6ybJWiu4T1mkZdHc
I really would like to have my balance restored to its former state, so if anyone knows what happened here or how I can fix it, please let me know.
The text was updated successfully, but these errors were encountered: