Suggestion for "add(rpc): getblock: return transaction details with verbosity=2" #9084
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a suggestion for #9083 to fetch all of a block's transactions with a single service call instead of making one per transaction.
It needlessly reads the block header twice, but those are relatively small, should be cached, and fetching transactions by block height avoids looking up transaction ids by location and then transaction locations by id. It'll also make use of RocksDB iterators once #8895 has merged (see https://github.com/ZcashFoundation/zebra/pull/8895/files#diff-9781032518c3c6d10a656ef34d8b7a85325f9c55c5fd65856b2257786459fd50R226-R234).
We could later factor out some of the
getblockheader
method to re-use that code without reading the block header twice.