Document offset inclusivity and exclusivity in Protobuf (#8145)

* Document offset inclusivity and exclusivity in Protobuf

As brought up in https://discuss.daml.com/t/using-offsets/1731, the
inclusivity and exclusivity of start and end offsets as exposed by
the Ledger API is not well documented.

This commit clearly states which offset is inclusive and which is
exclusive on all relevant endpoints (command completion and
transaction services).

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/8145#pullrequestreview-543758867
This commit is contained in:
Stefano Baghino 2020-12-03 16:00:50 +01:00 committed by GitHub
parent 92e4c1f6d4
commit d3899368ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,7 @@ message CompletionStreamRequest {
repeated string parties = 3;
// This field indicates the minimum offset for completions. This can be used to resume an earlier completion stream.
// This offset is exclusive: the response will only contain commands whose offset is strictly greater than this.
// Optional, if not set the ledger uses the current ledger end offset instead.
LedgerOffset offset = 4;
}

View File

@ -88,10 +88,12 @@ message GetTransactionsRequest {
string ledger_id = 1;
// Beginning of the requested ledger section.
// This offset is exclusive: the response will only contain transactions whose offset is strictly greater than this.
// Required
LedgerOffset begin = 2;
// End of the requested ledger section.
// This offset is inclusive: the response will only contain transactions whose offset is less than or equal to this.
// Optional, if not set, the stream will not terminate.
LedgerOffset end = 3;