-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent & missing data.events for different subscan server for the same block #79
Comments
another opposite example: block
|
similarly for the mainnet subscan explorer , these all show empty
If we look up using another explorer by polkascan, there should be various events under the block |
@jun0tpyrc Subscan hide events like ExtrinsicSuccess or ExtrinsicFail |
is there flag or param allow us to 'unhide' them ,
there are various endowed , deposit, new account , PreRuntime etc .. for the one we host , all now these are missing too
|
@jun0tpyrc hello, https://westend.subscan.io/block/2662841?tab=event ,there has all events |
for this example the problem is not on the public explorer, it's for the responses our private node return being incomplete, you may see in the above response , the subscan does store most data & extrinsics same as the public explorer , but events being empty |
@jun0tpyrc Could you check your chain_blocks table event field? Is there content inside? |
We found this may be due to Might be subscan would only fill the |
@jun0tpyrc subscan will fill block data include extrinsics & events & logs when substrate output new header. Please check chain_logs & chain_events table data, I will debug with you |
Thanks so much , let's focus on the problematic block Westend 2662841 above query from the mysql also seems the same , block & extrinsics table have its record, logs & events table empty for this record
fields in block table is also different from its final state |
I have more clues , this time for subscan-essentials being used with polkadot mainnet the subscan-observer container like https://github.com/itering/subscan-essentials/blob/master/docker-compose.yml#L23 , having error logs inside our docker baked from this commit bd8df32
2102017 & 2102012 are the blocks which finally end up never finalised in subscan and with empty logs and events field |
changing to ad1c7cc commit now
similarly both 2102272 , 2102279 get blocks indexed but cannot finalised and with empty events&logs in our database |
@jun0tpyrc Your Polkadot custom type JSON can use this {
"Address": "AccountId",
"BlockNumber": "U32",
"LeasePeriod": "BlockNumber",
"Weight": "u64",
"Keys": "SessionKeysPolkadot",
"DispatchInfo": {
"type": "struct",
"type_mapping": [
[
"weight",
"Weight"
],
[
"class",
"DispatchClass"
],
[
"paysFee",
"Pays"
]
]
},
"DispatchClass": {
"type": "enum",
"value_list": [
"Normal",
"Operational",
"Mandatory"
]
},
"DispatchResult": {
"type": "enum",
"type_mapping": [
[
"Ok",
"Null"
],
[
"Error",
"DispatchError"
]
]
},
"Timepoint": {
"type": "struct",
"type_mapping": [
[
"height",
"BlockNumber"
],
[
"index",
"u32"
]
]
},
"Multisig": {
"type": "struct",
"type_mapping": [
[
"when",
"Timepoint"
],
[
"deposit",
"Balance"
],
[
"depositor",
"AccountId"
],
[
"approvals",
"Vec<AccountId>"
]
]
},
"BalanceLock<Balance, BlockNumber>": {
"type": "struct",
"type_mapping": [
[
"id",
"LockIdentifier"
],
[
"amount",
"Balance"
],
[
"reasons",
"Reasons"
]
]
},
"ProxyType": {
"type": "enum",
"value_list": [
"Any",
"NonTransfer",
"Governance",
"Staking",
"SudoBalances",
"IdentityJudgement"
]
},
"ReferendumInfo": {
"type": "enum",
"type_mapping": [
[
"Ongoing",
"ReferendumStatus"
],
[
"Finished",
"ReferendumInfoFinished"
]
]
},
"CompactAssignments#23-?": "CompactAssignmentsLatest",
"RewardDestination#23-?": "RewardDestinationLatest",
"RefCount": "u32"
} |
Comparing the events that my private node can decode, they are having 0 However, I don't know how to fix this now, maybe from the polkadot node / subscan config? Do you have any idea on it? (we don't use substrate frontend etc.. just the polkadot node binary & this subscan service)
if I modify to print things out /internal/service/substrate.go just before decodeEvent , eventCount already 0 there |
there are intermediate blocks which would be skipped completely too
|
if I compare those block with events we fail to decode (while public node can) , the events are mostly with these categories
|
In this case I bet hosting own subscan by subscan-essentials might not be suitable for production workload , may I confirm there is no rate limit etc behind subscan.io, or do we need to apply separately? |
@jun0tpyrc https://github.com/itering/subscan-essentials is subscan scaffold, it includes subscan.io basic features like blocks, extrinsic, event, and other. subscan.io uses the same codec as this project. Maybe you still need to read the code yourself to fully use this in a production environment |
I am encountering similar things when using with
some events can't be decoded as above |
please check kusama type.json
you can use this |
yes, seems this one working and not seeing the same error for a few hours , after putting in subscan_configs/source/kusama.json I note for blocks there might be problem fitting them into existing table schema due to long field e.g. for kusama mainnet
|
@jun0tpyrc how did you up the log level? Doesn't seem to work for me |
data.events are showing inconsistent behaviours, some time missing on public server, some time missing on private server
curl -XPOST https://westend.subscan.io/api/scan/block -d '{"block_num": 222841}' -H "Content-Type: application/json" | jq
data.events
showing an empty array in this public testnet subscanIn the self-hosted instance , it contains some data for data.events
The text was updated successfully, but these errors were encountered: