graph-node
graph-node copied to clipboard
Add timestamp to meta block
Fixes: https://github.com/graphprotocol/graph-node/issues/3060
This change should add a timestamp for EVM chains, should work well for both RPC and firehose ingestors. The fact the query depends heavily on the format of the block means it will not work for any block format that doesn't add the expected timestamp field inside a top level block field.
To solve this further we could ensure that all block formats have the necessary timestamp or alternative we could extract/duplicate that field outside the block and run some migrations. The downside of the migration approach is that it needs to be communicated more widely. This migration would also be potentially long due to the size of the block cache tables.
Has this been tested on a firehose block stream?
@leoyvens on a firehose stream is the thing I was testing locally but the blocks look the same on the database. The firehose ingestor I didn't test because as far as I can tell it is not wired (for eth) but the types are the same so should be fine as well