Description
The use case I am considering is where I am interested in the traffic through one particular contract (in this specific case aurora
, but we can imagine any contract more generally).
NEAR is sharded, so my expectation is that I should be able to track just the shard containing my contract of interest to get all the data I want.
However, chunks only give outgoing receipts, not incoming ones. This means receipts which target my contract of interest could be in chunks from any shard at all, not just the one where my contract is. Therefore, I have to look at chunks from all shards to understand what is happening in my one contract.
This is not a big deal today because the number of shards is small, but clearly this does not scale. If there were 100 shards on NEAR then it would be infeasible to collect all receipts targeting my contract in real time (or I would need some beefy infrastructure to do it).
I propose it should be possible to obtain a stream of incoming receipts to a given shard from the NEAR RPC.