Pass through raw meterBundleResponse in block API#160
Merged
Conversation
Store the raw meter_bundle_response from S3 on each BlockTransaction
instead of extracting individual fields (executionTimeUs,
stateRootTimeUs, gasUsed). The API serializes it as
metering: { transaction, bundle } where transaction is results[0]
and bundle is everything else.
This means new fields added to MeterBundleResponse or
TransactionResult in the base node (e.g. stateRootAccountNodeCount,
stateRootStorageNodeCount from v0.7) flow through to API consumers
automatically without TIPS code changes.
wlawt
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
meter_bundle_responsefrom S3 on eachBlockTransactioninstead of extracting individual fields (executionTimeUs,stateRootTimeUs,gasUsed)/api/block/[hash]API serializes it asmetering: { transaction, bundle }wheretransactionisresults[0]andbundleis everything else from the meter bundle responseMeterBundleResponseorTransactionResultin the base node (e.g.stateRootAccountNodeCount,stateRootStorageNodeCountfrom v0.7) flow through to API consumers automatically without TIPS code changesBreaking change
The per-transaction shape in the block API response changes from flat fields:
{ "hash": "0x...", "gasUsed": "4804266", "executionTimeUs": 62988, "stateRootTimeUs": 926848, "bundleId": "..." }To nested metering:
{ "hash": "0x...", "bundleId": "...", "metering": { "transaction": { "executionTimeUs": 62988, "gasUsed": 4804266, "txHash": "0x...", "fromAddress": "0x...", "toAddress": "0x..." }, "bundle": { "stateRootTimeUs": 926848, "stateRootAccountNodeCount": 42, "stateRootStorageNodeCount": 100, "totalGasUsed": 4804266, "totalExecutionTimeUs": 62988, "bundleHash": "0x...", "stateBlockNumber": 44446624 } } }The block page UI is updated to read from the new shape. The
/bundles/[uuid]page is unaffected (it reads directly from S3).