Open roadscape opened 5 years ago
sneak nostromo-2 ~ http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=account_history_api.get_ops_in_block params:='{"block_num": 2889020, "only_virtual": false}'
HTTP/1.1 200 OK
Access-Control-Allow-Headers: DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 491
Content-Security-Policy: upgrade-insecure-requests
Content-Type: application/json
Date: Mon, 05 Nov 2018 17:05:48 GMT
Server: nginx
Strict-Transport-Security: max-age=31557600; includeSubDomains; preload
x-amzn-trace-id: Root=1-5be0786c-ee82ac2acbc2507bbce65e26
x-jussi-request-id: 000286667438859137
{
"error": {
"code": -32002,
"data": {
"code": 10,
"message": "Assert Exception",
"name": "assert_exception",
"stack": [
{
"context": {
"file": "json_rpc_plugin.cpp",
"hostname": "",
"level": "error",
"line": 206,
"method": "find_api_method",
"timestamp": "2018-11-05T17:05:48"
},
"data": {
"api": "account_history_api"
},
"format": "api_itr != _registered_apis.end(): Could not find API ${api}"
}
]
},
"message": "Assert Exception:api_itr != _registered_apis.end(): Could not find API account_history_api"
},
"id": "1",
"jsonrpc": "2.0"
}
sneak nostromo-2 ~
Is account_history_api.get_ops_in_block
supposed to be available on api.steemit.com
?
Jussi is not routing account_history_api
properly. This is a known bug. steemit/jussi#212
An exchange also reported an account history op_in_trx
inconsistency.
condenser_api.get_account_history
returned an operation with "op_in_trx": 0
, while get_transaction
reveals op_in_trx
should be 90
.
condenser_api.get_account_history
response:
"jsonrpc": "2.0",
"result": [
[
2228,
{
"trx_id": "551c1bc0e04671ceaf6740f13e623663e417533d",
"block": 22967441,
"trx_in_block": 8,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-06-02T10:40:30",
"op": [
"transfer",
{
"from": "id1",
"to": "huobi-withdrawal",
"amount": "0.001 SBD",
"memo": "☆ Hi! We are creating one of the first Multichain tokens ever working on ETH, EOS and NEO: 3 in 1. Please check out our project 🔥Ducatur.net🔥 •MVP is ready •3 Hackathons won •Softcap Reached 📬 Any questions please feel free to contact me steemit@ducatur.net ☆"
}
]
}
]
],
"id": 1
}
get_transaction
response:
https://steemd.com/tx/551c1bc0e04671ceaf6740f13e623663e417533d
Are they the running normal account_history or the rocksdb backed account history?
All previous bug reports I thought we from the rocksdb backed account history which indicates there is probably an inconsistency in how that implementation tracks this data vs how is used to be tracked. Because we are actively working on a rocksdb adapter for all indices that will replace the rocksdb backed account history altogether, I am inclined not to investigate this further.
Ok it sounds like they are using the non-rocksdb account history.
The op_in_trx
inconsistency still occurs sometimes. I got the same value of 0
for two operations within one transaction, which makes it hard to uniquely identify each of them:
I tested it with different nodes (also api.steemit.com) a few days ago and the result was always the same.
To reliably index account history (and re/create other functionality) outside of steemd, clients need assurance that their copy of events are complete and accurate. Here I outline discrepancies and general concerns.
Ideally:
(block, trx_in_block, op_in_trx, virtual_op)
Data inconsistency
virtual_op
can be non-unique inget_ops_in_block n, True
(Appendix A)op_in_trx
can be non-unique inget_ops_in_block n, False
(Appendix B)virtual_op
is occasionally non-sequential (Appendix C)trx_in_block
of4294967295
(Appendix C)-1
, or does it signify these are processed after all others?General concerns
get_ops_in_block
is occasionally buggy (e.g. #2413, #2936), difficult to detect issuesget_block
, some issues are undetectabletotal_vop_count @ block_height
for verification?blocks >= 864000
must have at least 1 vopget_ops_in_block
once per block revealed 1000's of duplicate entriesget_ops_in_block
only available at irreversible blockAppendix A: non-unique
(block,trx_in_block,op_in_trx,virtual_op)
The last 2 items (virtual_op=3) in this snippet have an identical 'location'.
Appendix B: ops are non-unique on (
block,trx_in_block,op_in_trx
)The last 2 items of the following snippet both specify
"block": 4273531, "trx_in_block": 1, "op_in_trx": 0, "virtual_op": 0
Appendix C:
virtual_op
can be non-sequentialBlock 2998688 contains only virtual ops, and there are 2 unexpected gaps in
virtual_op
: