Bug in pulling account history in Beem 0.24.26

avatar

image.png

I was building an update to my Hive Engine Tools to pull up details from the @utopis project and I noticed some inconsistencies that I couldn't explain.

When I listed out transactions going from @utopis to @themarkymark I noticed there was a gap of transactions.

image.png

Here you can see some of the transactions for @utopis to @themarkymark, specifically look from top to bottom starting with 20.424 where the next transaction is 84.385. I repeated this code over and over and I keep getting the same result.

I used HiveSQL and I notice there are many transaction during this gap. Quite a few in fact, and these are over a significant portion of time (weeks) not in a short period of time that would be the result of a short gap.

image.png

I did some tests querying (multiple) nodes directly using curl and looked through the results and noticed all transactions were reported properly. I also looked at HiveJS and noticed they were all reported properly. This appears limited to Beem only.

Here is the simpliest version of the code I am using to query for the account history.

hive = Hive(node=['https://api.deathwing.me'], appbase = True)
utopis_account = Account('utopis')

divs = []

hive_history = utopis_account.history(start=-1, only_ops=['transfer'])
for transaction in hive_history:
    if transaction['to'] == user:
        divs.append([transaction['timestamp'], transaction['to'], 'HIVE', 
            Amount(transaction['amount']).amount])

history = get_history()

I have tried multiple nodes and same results, there is no variance in what is returned.

Temporary Solution - If I remove only_ops=['transfer'] and manually filter the ops on my end, I am able to see all operations.

hive = Hive(node=['https://api.deathwing.me'])
utopis = Account('utopis')

divs = []

hive_history = utopis.history(start=-1)
for transaction in hive_history:
    if transaction['type'] == 'transfer' and transaction['to'] == user:
        divs.append([transaction['timestamp'], transaction['to'], 'HIVE',                
            Amount(transaction['amount']).amount])
history = get_history()

image.png

image.png

I created an issue on Github with similar details to recreate it.



0
0
0.000
7 comments
avatar

The gap occurs somewhere between utopis account history transaction 971 (the 20.424 transfer on 29/03) and utopis account history transaction 2015 (the 84.385 transfer on 10/05). So it's a gap of roughly 1000 transactions.

The account history API allows up to 1000 transactions to be pulled at a time. So getting a full account history requires a loop of batches of 1000 transactions. I'm guessing there's a problem either pulling or processing one particular batch.

0
0
0.000
avatar

hope you find its solution soon I'm also facing a lot of error its started today these are the interface not working peakd ,ctp, leodex, hive-engine and I'm seeing this error on peakd can you help me fix it it's working just fine on mobile but I'm facing errors on pc help @themarkymark

0
0
0.000
avatar

Congratulations @themarkymark! You received a personal badge!

You powered-up at least 10 HIVE on Hive Power Up Day!
Wait until the end of Power Up Day to find out the size of your Power-Bee.
May the Hive Power be with you!

You can view your badges on your board and compare yourself to others in the Ranking

Check out the last post from @hivebuzz:

Hive Power Up Month Challenge - Winners List
Hive Power Up Month - Feedback from Day 29
Hive Power Up Day - October 1st 2021 - Hive Power Delegation
0
0
0.000
avatar

Does this have anything to do with hiveengine.usehive not working @themarkymark? I'd really need to get it up and running as soon as possible, you know ;-).

0
0
0.000