You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Status PublicProofsOfIndexing returns "Null value resolved for non-null field proofOfIndexing" if block not in cache #4730
While looking at the PublicProofsOfIndexing endpoint for substreams-based subgraph, we found that the endpoint will return the following error "Null value resolved for non-null field proofOfIndexing" if the block is not in the cache.
How to reproduce:
Deploy a substreams-based subgraph on a new graph-node instance+DB
Query your status-endpoint for an "old" block that has been indexed
only query POIs for block_number very close to head (the subgraph must have reached this block...)
insert manually the block number, hash and timestamp in the database for the blocks that you want to query, like this: insert into chain1.blocks (number,hash,parent_hash,data) values (12369753, decode('892ecc03181a92b32897a55b9d551f0682793b8bc124e616b99c650774242dc5', 'hex'),decode('81c1334a1471b8a461a95dbdf153d956614d7f95f099e9b5fcb8680480e3ca36', 'hex'),'{"block": {"data": null, "timestamp": "1620161788"}}')
Proposed solution
Lazy loading the missing block from RPC or firehose during the POI query if it is found to be null.
Activity