In Explorer, we need to display blocks basic data, without its transactions. We display transactions separately, with pagination, lazily.
Problem
FindBlockHeaders returns data without block hashes
FindBlocks returns all blocks data, including all transactions. The amount of transactions could be vast, and it creates extra overhead for explorer to load them all eagerly.
Desired solution
Implement FindBlockHeaders in a similar way to how FindTransactions works: it does not return a list of plain CommittedTransaction, but a list of TransactionQueryOutput - a wrap around CommittedTransaction with additional block_hash field.
Use case
In Explorer, we need to display blocks basic data, without its transactions. We display transactions separately, with pagination, lazily.
Problem
FindBlockHeaders
returns data without block hashesFindBlocks
returns all blocks data, including all transactions. The amount of transactions could be vast, and it creates extra overhead for explorer to load them all eagerly.Desired solution
Implement
FindBlockHeaders
in a similar way to howFindTransactions
works: it does not return a list of plainCommittedTransaction
, but a list ofTransactionQueryOutput
- a wrap aroundCommittedTransaction
with additionalblock_hash
field.