-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Breaking balance bug #497
Comments
This most likely is an issue with either the daemon or the explorer missing a block. Will do a re sync and check to see if that is the case, which I assume it is., |
The first example should leadt to the bug. The second example should demonstrate that its a recurring bug (its reproduceable) not a missing block. But if a resinc helps all good, which I assume that it wont help. In the first example, I send 1000 to the the block producer, that potentially also approved the transaction. In the second example I send the funds to an axchange addres, that might also be involved in block creation but on that second example I cant confirm. But the funds i send to the exchange addres seem to be decuted double.. Ill have to look those transactions up and veryfy if the balance gets a double deduction, which i dont really mind doing since I posted the problem here think I have done enough to lead you guys in the right direction to solve the issue, and I wont be able to fix the code or do a pull request. |
Ok I found something, I dont know how to explain, but I think that here the transaction was reorganized in a way that the funds seem to partially come from another address. So only the portion that was directly deducted from my addres are considered for the explorer Balance (-542 instead of -2000 in this example). Hope the Images give better insight what I mean. Btw I took the screenshot early but awaited block maturity before posting this.
I hope this helps. |
You could be right with the deamon, could it be some kind of missing communication / compability issue between the explorer and the daemon? |
So I'm trying to follow along: You're seeing that you have less balance on the explorer than you do in the wallet itself. The output and input transactions are handled here in code respectively: Lines 493 to 540 in 064134c
Lines 580 to 607 in 064134c
So if the explorer balance is less than the wallet, we're most likely not detecting the KWQ address correctly in a tx where that address is the vout (receiving end). Looking at the tx you mentioned (d9d3355)
Testing that out with the following led to the same vin in your screenshot:
So i don't see any issue with that transaction. Can you pull a transaction list from your daemon/wallet and compare the transaction amounts to what your explorer has. Maybe find the transaction that may be missing or incorrectly parsed so that we can look at it. As of right now, it's just going to be a needle in a haystack for anyone else to try to help. |
As for "-542 instead of -2000 in this example" this is because your account didn't provide 2000 dollars in this transaction, you provided 542 and address k9z7 provided the rest. So doublecheck, do you have 2 wallet addresses in your wallet? If so, there's your problem. You're mistaking an aggregated wallet of multiple pubkeys with a single pubkey. https://explorer.kawkawcoin.org/address/K9z7FsLwZcPF3KzQFYjjqamUg1LySogLE9 |
oooh ok now I got it, I used 2 different receiving addresses and completely forgot that, because of that, I need to check both to get the balance for that private key. If you accept tips in KAW let me know your address. On the other hand, I still cant figure out the double deduction in explorer for the snark address https://snark.mining4people.com/address/SUPREMEFx4nsVWFrAFBGLFkbDvJAQ4qjk6 shown in the the very first picture. Ill try to pull a transaction list for that wallet and come back. Thank you very much so far for the wonderfull lesson! |
Unfortunately I do not have an answer for the snark issue. To me, it looks like something got doubled, but there's nothing in the official unmodified code for 1.7.4 that would cause the duplication AFAIK. The amount that's different is exactly 2x the amount shown for the vout/vins. The same thing happened on the flip side for STd SYTR from that transaction. They both received double what they should have, but all other transactions appear to be fine. I think the only way to really figure out whats going on is a resync of those blocks with some debugging messages in place to capture what is going on with the operations at that time. Looking at that 1 block (https://snark.mining4people.com/block/000000000003837eb594ba3a175bc04cc63ef9bdfa37fb7e73295f5fe1d45528) is proving to be problematic for the balances. Unfortunately, I'm just not seeing the root for that issue at this time. It feels like something got doubled, which I can only wonder would happen if the code was either A) modified, or somehow the sync happened 2x on that 1 block (perhaps at the end of 1 batch for a cron and the start of another batch from a cron?). Thinking over that: Lines 125 to 129 in 064134c
The sync shouldn't allow for any other cron to start due to the above locks, however, we rely on "stats.last" for the last height we worked on during the last run as seen here: Lines 188 to 194 in 064134c
So i'm wondering if its possible that at the time that it ran, since we set the stats.last to the previous height we worked on (not the current we're on Line 735 in 064134c
I don't see this actually being the issue though, as that should be a widespread problem vs a single block on a single coin, but that's just my working theory. If you're the snark admin, then I'd look at the above and throw some stops in place. If you can make a test environment with your current data. It may be beneficial to remove everything about that block's txes (there's 4 of them) and manually set the stats.last to a block or two before that block, and run update again. |
To get more specific to the transaction, It was a tip to the mining4people pool, and the pool found the block too. Maybe an edge case? Had a hard time extracting this but here is what the wallet lists for the transaction in question: Now I know how so I could list all the transactions all since the beginning of that address, but there nothing I could really do myself on that chunk of data. Alternatively I could transfer 92% to another private key, leave the rest as bounty and send you that private key for debugging and keeping whats left on the wallet? |
No need for that, this issue is solely between the nodejs parsing mechanism
and the rpc communication with the daemon, not anything specific with the
wallets pub/private key.
The issue is centered around the parsing and understanding of that block as
a whole and how mining4peoples explorer parsed it. All of the addresses
affected by that block are affected in that explorer.
…On Sun, Sep 4, 2022, 12:41 PM Leozolt ***@***.***> wrote:
To get more specific to the transaction, It was a tip to the mining4people
pool, and the pool found the block too. Maybe an edge case?
https://snark.mining4people.com/block/000000000003837eb594ba3a175bc04cc63ef9bdfa37fb7e73295f5fe1d45528
Had a hard time extracting this but here is what the wallet lists for the
transaction in question:
{
"address": "STdmAgShfT9C4BtHTyDk2uy2NUaBdRDnWA",
"category": "send",
"amount": -1000.00000000,
"label": "explorer",
"vout": 1,
"fee": -0.00000978,
"confirmations": 1246,
"instantlock": false,
"instantlock_internal": false,
"chainlock": false,
"blockhash":
"000000000003837eb594ba3a175bc04cc63ef9bdfa37fb7e73295f5fe1d45528",
"blockindex": 3,
"blocktime": 1661865121,
"txid": "7d5f01e5423d57814bd77dd49bb6b6a4fedd1eddf536fc1098f8384a82d25d36",
"walletconflicts": [
],
"time": 1661864355,
"timereceived": 1661864355,
"abandoned": false
}
Now I know how so I could list all the transactions all since the
beginning of that address, but there nothing I could really do myself on
that chunk of data.
Alternatively I could transfer the biggest part to another private key,
leave some as bounty and send you that private key for debugging and
keeping whats left on the wallet?
—
Reply to this email directly, view it on GitHub
<#497 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG2F5AANMCEVUBKDSRSH2LV4TGJ7ANCNFSM6AAAAAAQDS62CY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Certainly, just got this guy created: Appreciate it! |
@uaktags Just a quick notification that i tipped you. Not that you forget about it and maybe abandon the funds. Btw, I tried your websites on your profile and they both have an issue. |
Recently discovered that a transaction got deducted double on explorer balance.
See how the balance goes from 16k to 14k?
Now there is another coin where i didnt check all the transactions but there surely is a bug somewhere...
Hope you find the bug.
The text was updated successfully, but these errors were encountered: