create account

Bug in pulling account history in Beem 0.24.26 by themarkymark

View this thread on: hive.blogpeakd.comecency.com
· @themarkymark ·
$86.30
Bug in pulling account history in Beem 0.24.26
![image.png](https://files.peakd.com/file/peakd-hive/themarkymark/23uQyCAG34CJsZXy2TyuqaVpePYGpLn5KeuunPdnPXe3Q72C9tkHM54PEQkhLd32tSWzn.png)

I was building an update to my [Hive Engine Tools](https://hiveengine.usehive.com) 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](https://files.peakd.com/file/peakd-hive/themarkymark/23swdriJtdh1cidpysjkgwyqFMwXNZfRTswjnnCybN1Z5me7mUMB1eUjH1yvz1Suhehj9.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](https://files.peakd.com/file/peakd-hive/themarkymark/23tHbFNg2kMRGQZhXn7rcP2coZcqPy6gEr5HQCtk2JMdJSNXUaVeyBqr3PoAqVDSZR768.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](https://files.peakd.com/file/peakd-hive/themarkymark/23swdriJtdh6MdAGHjNaKcftuwiLWGwzCjUFbYYD8gjYuheaCF8KCb7HoLbXcfvEZGabb.png)


![image.png](https://files.peakd.com/file/peakd-hive/themarkymark/23swdriJtdh6MdAGHjNaKcftuwiLWGwzCjUFbYYD8gjYuheaCF8KCb7HoLbXcfvEZGabb.png)

I created an issue on [Github](https://github.com/holgern/beem/issues/334) with similar details to recreate it.




👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 375 others
👎  , , , , , ,
properties (23)
authorthemarkymark
permlinkbug-in-pulling-account-history-in-beem-02426
categorydev
json_metadata{"app":"peakd/2021.09.1","format":"markdown","tags":["dev","beem","proofofbrain","archon","palnet","neoxian","ash","cent","technology"],"users":["utopis","themarkymark"],"image":["https://files.peakd.com/file/peakd-hive/themarkymark/23uQyCAG34CJsZXy2TyuqaVpePYGpLn5KeuunPdnPXe3Q72C9tkHM54PEQkhLd32tSWzn.png","https://files.peakd.com/file/peakd-hive/themarkymark/23swdriJtdh1cidpysjkgwyqFMwXNZfRTswjnnCybN1Z5me7mUMB1eUjH1yvz1Suhehj9.png","https://files.peakd.com/file/peakd-hive/themarkymark/23tHbFNg2kMRGQZhXn7rcP2coZcqPy6gEr5HQCtk2JMdJSNXUaVeyBqr3PoAqVDSZR768.png","https://files.peakd.com/file/peakd-hive/themarkymark/23swdriJtdh6MdAGHjNaKcftuwiLWGwzCjUFbYYD8gjYuheaCF8KCb7HoLbXcfvEZGabb.png"]}
created2021-10-01 03:41:39
last_update2021-10-01 03:41:39
depth0
children7
last_payout2021-10-08 03:41:39
cashout_time1969-12-31 23:59:59
total_payout_value43.246 HBD
curator_payout_value43.051 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,958
author_reputation1,669,674,090,413,573
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,689,650
net_rshares67,502,641,775,993
author_curate_reward""
vote details (446)
@aiovo ·
$0.04
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
https://images.ecency.com/DQmWM88qKRTS1WShzbSSZVkBzULGCAthXVhHH15e1aMjoV2/err.png
👍  ,
properties (23)
authoraiovo
permlinkr0argb
categorydev
json_metadata{"tags":["stem"],"users":["themarkymark"],"image":["https://images.ecency.com/DQmWM88qKRTS1WShzbSSZVkBzULGCAthXVhHH15e1aMjoV2/err.png"],"app":"stemgeeks/0.1","canonical_url":"https://stemgeeks.net/@aiovo/r0argb"}
created2021-10-01 11:48:18
last_update2021-10-01 11:48:18
depth1
children0
last_payout2021-10-08 11:48:18
cashout_time1969-12-31 23:59:59
total_payout_value0.020 HBD
curator_payout_value0.019 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length368
author_reputation15,891,884,044,421
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,696,316
net_rshares31,813,249,604
author_curate_reward""
vote details (2)
@hivebuzz ·
Congratulations @themarkymark! You received a personal badge!

<table><tr><td>https://images.hive.blog/70x70/http://hivebuzz.me/badges/pud.png?202110011957</td><td>You powered-up at least 10 HIVE on Hive Power Up Day!<br>Wait until the end of Power Up Day to find out the size of your Power-Bee.<br>May the Hive Power be with you!
</td></tr></table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@themarkymark) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>


**Check out the last post from @hivebuzz:**
<table><tr><td><a href="/hivebuzz/@hivebuzz/pum-202109-final"><img src="https://images.hive.blog/64x128/https://i.imgur.com/lpF7k06.png"></a></td><td><a href="/hivebuzz/@hivebuzz/pum-202109-final">Hive Power Up Month Challenge - Winners List</a></td></tr><tr><td><a href="/hivebuzz/@hivebuzz/pum-202109-29"><img src="https://images.hive.blog/64x128/https://i.imgur.com/rv2OQ5F.png"></a></td><td><a href="/hivebuzz/@hivebuzz/pum-202109-29">Hive Power Up Month - Feedback from Day 29</a></td></tr><tr><td><a href="/hivebuzz/@hivebuzz/pud-202110"><img src="https://images.hive.blog/64x128/https://i.imgur.com/805FIIt.jpg"></a></td><td><a href="/hivebuzz/@hivebuzz/pud-202110">Hive Power Up Day - October 1st 2021 - Hive Power Delegation</a></td></tr></table>
properties (22)
authorhivebuzz
permlinkhivebuzz-notify-themarkymark-20211001t202106
categorydev
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2021-10-01 20:21:06
last_update2021-10-01 20:21:06
depth1
children0
last_payout2021-10-08 20:21:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,319
author_reputation367,877,428,593,454
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,707,135
net_rshares0
@miniature-tiger ·
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.
👍  ,
properties (23)
authorminiature-tiger
permlinkr0anqx
categorydev
json_metadata{"app":"hiveblog/0.1"}
created2021-10-01 10:28:09
last_update2021-10-01 10:28:09
depth1
children0
last_payout2021-10-08 10:28:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length468
author_reputation110,039,466,555,434
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,695,089
net_rshares1,555,440,969
author_curate_reward""
vote details (2)
@shebe ·
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 ;-).
properties (22)
authorshebe
permlinkre-themarkymark-r0ib7n
categorydev
json_metadata{"tags":["dev"],"app":"peakd/2021.09.1"}
created2021-10-05 13:38:12
last_update2021-10-05 13:38:12
depth1
children3
last_payout2021-10-12 13:38:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length156
author_reputation16,178,576,687,315
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,799,404
net_rshares0
@themarkymark ·
No, I took it down as the Hive Engine api has too many issues and not worth maintaining. 
👎  
properties (23)
authorthemarkymark
permlinkre-shebe-r0idt9
categorydev
json_metadata{"tags":["dev"],"app":"peakd/2021.09.1"}
created2021-10-05 14:34:21
last_update2021-10-05 14:34:21
depth2
children2
last_payout2021-10-12 14:34:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length89
author_reputation1,669,674,090,413,573
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,800,521
net_rshares0
author_curate_reward""
vote details (1)
@shebe · (edited)
So this perfect tool won't be working anytime soon @themarkymark?
properties (22)
authorshebe
permlinkre-themarkymark-r0ji6c
categorydev
json_metadata{"tags":["dev"],"app":"peakd/2021.09.1"}
created2021-10-06 05:06:15
last_update2021-10-07 07:36:42
depth3
children1
last_payout2021-10-13 05:06:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length65
author_reputation16,178,576,687,315
root_title"Bug in pulling account history in Beem 0.24.26"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id106,817,249
net_rshares0