SIGN IN SIGN UP

store, chain/ethereum: Add header-only ChainStore query methods

Add `ancestor_block_ptr` and `block_parent_ptr` to the `ChainStore`
trait. These methods read only header columns (hash, number,
parent_hash) and skip fetching/deserializing the `data` JSONB column,
which is significant for callers that never use the block body.

`ancestor_block_ptr` reuses the existing recursive CTE but omits the
second SQL query that fetches `data`. `block_parent_ptr` queries only
the parent_hash and number columns for a given block hash.

Update the two callers that were discarding block data anyway:
- graphman `chain info` now uses `ancestor_block_ptr`
- Ethereum `parent_ptr` (Firehose path) now uses `block_parent_ptr`

This is preparatory work for the block cache revamp where the data
column becomes nullable for old blocks.
D
David Lutterkort committed
ac28b4d40444f2711efc931378a91546fe525ec7
Parent: 7fa2717