runelite / runelite

Open source Old School RuneScape client
https://runelite.net
BSD 2-Clause "Simplified" License
4.67k stars 5.19k forks source link

Grand Exchange History records false transactions #11707

Open borffff opened 4 years ago

borffff commented 4 years ago

The GE history data available on the runelite website is recording "duplicate" transactions. I have two purchase transactions in the ingame GE history which total 13k, the buy limit. The data on runelite.net shows a third transaction which is slightly smaller than one of the others and 1 second apart.

I imagine that quickly clicking to cancel and offer which gets aborted server side is causing both the original attempted state, and the final real transaction to be saved to history.

GEbug

borffff commented 4 years ago

I've been balancing all of my transactions and found multiple other instances of this happening when both buying and selling. I also believe I've found at least one instance of a purchase transaction not being recorded at all. If there is any specific information I can share to help please let me know and I'll try to gather it. This has been fairly regularly happening to me at least recently, with multiple occurrences per day of flipping.

Edit: I'm certain there are entirely missing transactions. I was buying gold ore on 8 accounts, each using their own login and windows account for being run as the different user. I completed 10 transactions which should have totaled the limit on every account, and two of the transactions which were less than the limit were completely missing from the runelite data but still in the GE history. I never log into these accounts on anything except their single runelite install so it couldn't be a matter of a missing transaction from being logged on mobile or another client. The issue is very common, it's been happening to me with every item I'm flipping every day.

Maximuis94 commented 4 years ago

I've noticed the same issue and I believe the logger is only logging fully completed transactions (i.e. if the user decides to cancel the offer, it is not logged, even if the offer was partially completed). Furthermore, I've noticed the prices of some items were logged incorrectly, I have provided one example of an incorrectly logged item from my Runelite GE history that was logged incorrectly, but there are many more. So far, I was unable to find a pattern in the wrong prices that were logged, so the logged price and when this happens seems random to me. I have not encountered any quantities that were logged wrong so far, or maybe I missed those. As for the behaviour of the logger, it seems to log everything as soon as the offer is completed and not while collecting the offers (which I assumed was the case). It would seem more logical to me to log everything as soon as the offer is collected and removed from the GE, this way partially completed offers could get logged as well. Capture

Adam- commented 4 years ago

I've noticed the same issue and I believe the logger is only logging fully completed transactions (i.e. if the user decides to cancel the offer, it is not logged, even if the offer was partially completed). Furthermore, I've noticed the prices of some items were logged incorrectly, I have provided one example of an incorrectly logged item from my Runelite GE history that was logged incorrectly, but there are many more. So far, I was unable to find a pattern in the wrong prices that were logged, so the logged price and when this happens seems random to me. I have not encountered any quantities that were logged wrong so far, or maybe I missed those. As for the behaviour of the logger, it seems to log everything as soon as the offer is completed and not while collecting the offers (which I assumed was the case). It would seem more logical to me to log everything as soon as the offer is collected and removed from the GE, this way partially completed offers could get logged as well. Capture

I think this issue specifically was fixed, it was computing the prices incorrectly for <1 day. I don't know what the issue is OP is reporting though since it was reported before I had changed anything.

Maximuis94 commented 4 years ago

I've downloaded a new json file and tagged all strongly anomalous submitted prices. The issue of wrongly logged prices does not seem to occur after the 6th of June and partially completed offers also seem to have been logged for the past days/week! Thanks for fixing on such a short notice ^^

Blonks-afk commented 5 months ago

I've noticed the same issue and I believe the logger is only logging fully completed transactions (i.e. if the user decides to cancel the offer, it is not logged, even if the offer was partially completed). Furthermore, I've noticed the prices of some items were logged incorrectly, I have provided one example of an incorrectly logged item from my Runelite GE history that was logged incorrectly, but there are many more. So far, I was unable to find a pattern in the wrong prices that were logged, so the logged price and when this happens seems random to me. I have not encountered any quantities that were logged wrong so far, or maybe I missed those. As for the behaviour of the logger, it seems to log everything as soon as the offer is completed and not while collecting the offers (which I assumed was the case). It would seem more logical to me to log everything as soon as the offer is collected and removed from the GE, this way partially completed offers could get logged as well. Capture

I think this issue specifically was fixed, it was computing the prices incorrectly for <1 day. I don't know what the issue is OP is reporting though since it was reported before I had changed anything.

I have found the issue I think. Currently, the GE Plugin checks to see if the ge offer event is exactly the same when it does it's deduplication. In most cases, this works as expected. There are a couple edge cases though, when this causes issues.

I've yet to debug it in developer mode yet, but it happens when the offer is updated with another trade immediately after clicking cancel. This results in the pending cancel being recognized, an additional chunk of the offer fulfilling, and then automatically cancelling after. Presumably what is happening is that the first cancel buy update is persisting as usual (with the stats of the pre-cancel quantity), but then the second update comes through with the updated quantity that occurred after cancellation. This ends up causing it to slip by the deduplication since it's not exactly the same in a way that the deduplication logic expects.

Pics shown below: New offer

image Partial fill image Cancel clicked (quantity 4) image Another chunk fulfills resulting in a final quantity of 5 items image GE History vs Runelite Tracked history shown image

I'm not exactly sure whether the persisting would need to be delayed a tiny bit to make sure no "duplicate" updates come through before the cancellation is finalized or if it'd be preferable to replace the tracked one after the fact (or really even if that's what is happening since I haven't seen the debug logs for concrete proof). That's just what I've decided what the most reasonable explanation from just reading the code.