New to Nutbox?

Are different indices of account history items normal?

16 comments

moecki
71
last yearSteemit2 min read
In the context of upgrading a certain service here on the Steem, I realised something that didn't quite make sense to me.

The service continuously stores the activities of certain accounts in an internal database. The data required for this is retrieved using account_history_api.get_account_history.
Since the reduction of the limit from 1000 to 20, the service has had difficulties retrieving the data.

I first had to find out how and which data is retrieved. And of course it should continue seamlessly after the "restart". The index of entries in the account history is crucial for this.

The indices can be specified as start parameters in the query. If the last action should be retrieved, -1 is used ({"account": "moecki", "limit": 1, "start": -1}).
If I request my last activity from the node https://api.steemit.com, I get the following result:

[90606,{"trx_id":"4bee91da4a1a304a2bb5e9f3492f1a29d07b5347",
"block":80139385,"trx_in_block":3,"op_in_trx":0,"virtual_op":0,"timestamp":"2023-11-23T18:57:21","op":{"type":"comment_operation","value":{"parent_author":"remlaps","parent_permlink":"re-moecki-20231122t92311832z","author":"moecki","permlink":"s4lbbk","title":"","body":"For your own transfers it is not quite so bad ;-)","json_metadata":"{"app":"steemit/0.2"}"}}}]

The last activity has the index 90606.
I could now retrieve this again with {"account": "moecki", "limit": 1, "start": 90606}.

However, when I do this on my API server https://api.moecki.online, I get the following response:

[90466,{"trx_id":"4bee91da4a1a304a2bb5e9f3492f1a29d07b5347",
"block":80139385,"trx_in_block":3,"op_in_trx":0,"virtual_op":0,"timestamp":"2023-11-23T18:57:21","op":{"type":"comment_operation","value":{"parent_author":"remlaps","parent_permlink":"re-moecki-20231122t92311832z","author":"moecki","permlink":"s4lbbk","title":"","body":"For your own transfers it is not quite so bad ;-)","json_metadata":"{"app":"steemit/0.2"}"}}}]

It is the same activity, but with a different index.
I have tested this on different nodes. Here is the result:

NodesIndexDiff to Steemit
https://api.steemit.com90606
0
https://api.moecki.online90466
-140
https://api.pennsif.net90586
-20
https://api.justyy.com90606
0
https://api.campingclub.me90590
-16
https://api.wherein.io90606
0
https://api.upvu.org90590
-16

The only explanation I could come up with is that some transactions were not captured when the nodes were synchronised and are therefore missing from the nodes. However, that would worry me greatly. It would mean that the node cannot provide the blockchain data in full.

Can anyone give a different explanation?

@steemchiller @ety001 @justyy @symbionts @happyberrysboy @roadofrich @rexthetech @ayogom

Steem Search on https://moecki.online/

My Full Node on https://api.moecki.online

My Python Pricefeed for Witnesses

Thanks for your Witness Vote

23.11.2023

Comments

Sort byBest