Remove SubstrateEventEntity.extrinsicArgs#510
Conversation
…abase redundancy issue by remov affects: @joystream/hydra-indexer-gateway, @joystream/hydra-indexer
|
Should this be in scope for |
|
I think that's a good idea, it will be a significant optimalization, fixing many issues with long query node indexing / processing times. |
zeeshanakram3
left a comment
There was a problem hiding this comment.
From the mappings, when you get the event context, it returns all the info related to the event/extrinsic, since now extrinsics args info is not being stored indexer DB, shouldn't the extrinsics args property also be removed from EventContext since the args are no longer available.
When events are queried from indexer by the processor, this query is used: substrateEventsAfter(where: { ${eventsFilter}${extrinsicsFilter} blockNumber_gt: ${block_gt}, blockNumber_lte: ${block_lte} }, ${idFilter} limit: ${limit}) {
id
name
method
params {
name
type
value
}
indexInBlock
blockNumber
blockTimestamp
extrinsic {
method
section
versionInfo
signer
args
signature
hash
tip
}
}So instead of coming from |
Ah ok then, LGTM |
Removes unused
SubstrateEventEntity.extrinsicArgsfield, which had terrible impact on performance.Example:
If I currently use
utility.batchto create 1000 members, each of the thousands of event entities that result from this extrinsic will include a serialized version of a hugeutility.batchcall args. This is extermely bad case of redundancy, not only does it take enormous amount of storage, but it also takes ~10 minutes for the indexer to process such transaction.