feat(v1beta): make FetchBlock, ReadUtxos and ReadData single-item operations - #208
Open
carbolymer wants to merge 1 commit into
Open
feat(v1beta): make FetchBlock, ReadUtxos and ReadData single-item operations#208carbolymer wants to merge 1 commit into
carbolymer wants to merge 1 commit into
Conversation
carbolymer
force-pushed
the
sync-fetchblock-single-block
branch
from
July 20, 2026 15:39
c236c61 to
16d52e3
Compare
carbolymer
force-pushed
the
sync-fetchblock-single-block
branch
from
July 20, 2026 15:40
16d52e3 to
e3a8517
Compare
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
repeatedfromFetchBlockRequest.refandFetchBlockResponse.block, making FetchBlock a single-block operation.repeatedfromReadUtxosRequest.keysandReadUtxosResponse.items(nowkeyanditem), making ReadUtxos a single-UTxO operation.repeatedfromReadDataRequest.keysandReadDataResponse.values(nowkeyandvalue), making ReadData a single-datum operation.Motivation
Batching at the protobuf message level adds complexity without clear benefit - callers needing multiple items can issue concurrent requests, which maps naturally to gRPC streaming for bulk use cases.
These RPCs are per-item lookups, but the batched responses had no per-item error channel.
When one item could not be resolved, a server could only fail the whole call or silently omit the item, and the client could not tell omission from an error.
With single-item requests, the gRPC status code applies unambiguously to the one requested item.
This follows the same approach as #163, which made
SubmitTxandEvalTxsingular.Breaking change
This is a wire format breaking change to the v1beta proto definition.
A client sending multiple entries in a single request will have message-typed fields silently merged (
FetchBlock,ReadUtxos) or resolved as last-value-wins for thebyteskey (ReadData), producing incorrect results.The renamed fields (
keys->key,items->item,values->value) also change the JSON mapping.