Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20039,6 +20039,7 @@ $root.org = (function() {
* @property {number} BETWEEN_EXCLUDE_RIGHT=8 BETWEEN_EXCLUDE_RIGHT value
* @property {number} IN=9 IN value
* @property {number} STARTS_WITH=10 STARTS_WITH value
* @property {number} IN_TIME_RANGE=11 IN_TIME_RANGE value
*/
GetDocumentsRequest.WhereOperator = (function() {
var valuesById = {}, values = Object.create(valuesById);
Expand All @@ -20053,6 +20054,7 @@ $root.org = (function() {
values[valuesById[8] = "BETWEEN_EXCLUDE_RIGHT"] = 8;
values[valuesById[9] = "IN"] = 9;
values[valuesById[10] = "STARTS_WITH"] = 10;
values[valuesById[11] = "IN_TIME_RANGE"] = 11;
return values;
})();

Expand Down Expand Up @@ -20870,6 +20872,7 @@ $root.org = (function() {
case 8:
case 9:
case 10:
case 11:
break;
}
if (message.value != null && message.hasOwnProperty("value")) {
Expand Down Expand Up @@ -20939,6 +20942,10 @@ $root.org = (function() {
case 10:
message.operator = 10;
break;
case "IN_TIME_RANGE":
case 11:
message.operator = 11;
break;
}
if (object.value != null) {
if (typeof object.value !== "object")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19531,6 +19531,7 @@ $root.org = (function() {
* @property {number} BETWEEN_EXCLUDE_RIGHT=8 BETWEEN_EXCLUDE_RIGHT value
* @property {number} IN=9 IN value
* @property {number} STARTS_WITH=10 STARTS_WITH value
* @property {number} IN_TIME_RANGE=11 IN_TIME_RANGE value
*/
GetDocumentsRequest.WhereOperator = (function() {
var valuesById = {}, values = Object.create(valuesById);
Expand All @@ -19545,6 +19546,7 @@ $root.org = (function() {
values[valuesById[8] = "BETWEEN_EXCLUDE_RIGHT"] = 8;
values[valuesById[9] = "IN"] = 9;
values[valuesById[10] = "STARTS_WITH"] = 10;
values[valuesById[11] = "IN_TIME_RANGE"] = 11;
return values;
})();

Expand Down Expand Up @@ -20362,6 +20364,7 @@ $root.org = (function() {
case 8:
case 9:
case 10:
case 11:
break;
}
if (message.value != null && message.hasOwnProperty("value")) {
Expand Down Expand Up @@ -20431,6 +20434,10 @@ $root.org = (function() {
case 10:
message.operator = 10;
break;
case "IN_TIME_RANGE":
case 11:
message.operator = 11;
break;
}
if (object.value != null) {
if (typeof object.value !== "object")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24389,7 +24389,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator = {
BETWEEN_EXCLUDE_LEFT: 7,
BETWEEN_EXCLUDE_RIGHT: 8,
IN: 9,
STARTS_WITH: 10
STARTS_WITH: 10,
IN_TIME_RANGE: 11
};


Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,291 changes: 648 additions & 643 deletions packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2739,6 +2739,7 @@ export namespace GetDocumentsRequest {
BETWEEN_EXCLUDE_RIGHT: 8;
IN: 9;
STARTS_WITH: 10;
IN_TIME_RANGE: 11;
}

export const WhereOperator: WhereOperatorMap;
Expand Down
3 changes: 2 additions & 1 deletion packages/dapi-grpc/clients/platform/v0/web/platform_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -24389,7 +24389,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator = {
BETWEEN_EXCLUDE_LEFT: 7,
BETWEEN_EXCLUDE_RIGHT: 8,
IN: 9,
STARTS_WITH: 10
STARTS_WITH: 10,
IN_TIME_RANGE: 11
};


Expand Down
10 changes: 10 additions & 0 deletions packages/dapi-grpc/protos/platform/v0/platform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,16 @@ message GetDocumentsRequest {
BETWEEN_EXCLUDE_RIGHT = 8;
IN = 9;
STARTS_WITH = 10;
// Time-range bucket selection (v1 / `GetDocumentsRequestV1` only — the
// v0 CBOR where surface is unaffected). The clause's `field` names a
// timestamp property covered by a `timeRange` index; the operand
// (`DocumentFieldValue.text`) is the selector `"newest"` or `"oldest"`.
// The server resolves it to a concrete equality on the bucket start
// using the current block time, and the verifier re-derives the same
// bucket from the quorum-signed response metadata time — so the proof
// is an ordinary index/count proof. See `timeRange` in the document
// meta-schema and `drive::query::resolve_time_range_bucket_clause`.
IN_TIME_RANGE = 11;
}

// Tagged scalar (or list) operand for a `WhereClause`. The
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v1/document-meta.json",
"$comment": "EDITABLE UNTIL THE RELEASE CARRYING PROTOCOL V14 SHIPS — FROZEN AFTER. This v3 document meta-schema activates with protocol v14 (CONTRACT_VERSIONS_V6). It is v2 plus the ranked index keywords (rankedCountable, rankedSummable, rankedAverageable) and the refersTo reference keyword on identifier properties, and admits every v14+ contract written to disk. v2 stays in place for protocol v13, where those keys still fail an index entry's `additionalProperties: false`. Once the release carrying protocol v14 ships, mutating it would change historical validation results and break consensus replay. After release, any new top-level property or rule MUST go in a newer meta-schema version (v4+). The $id above deliberately still names the v1 path: v1, v2 and v3 all share that identity, and it is the exact string `enrich_with_base_schema` injects as every PV12+ document schema's `$schema`, so bumping it here would be a wire-visible change rather than a documentation fix.",
"$comment": "EDITABLE UNTIL THE RELEASE CARRYING PROTOCOL V14 SHIPS — FROZEN AFTER. This v3 document meta-schema activates with protocol v14 (CONTRACT_VERSIONS_V6). It is v2 plus the ranked index keywords (rankedCountable, rankedSummable, rankedAverageable), the refersTo reference keyword on identifier properties, and the timeRange index transform, and admits every v14+ contract written to disk. v2 stays in place for protocol v13, where those keys still fail an index entry's `additionalProperties: false`. Once the release carrying protocol v14 ships, mutating it would change historical validation results and break consensus replay. After release, any new top-level property or rule MUST go in a newer meta-schema version (v4+). The $id above deliberately still names the v1 path: v1, v2 and v3 all share that identity, and it is the exact string `enrich_with_base_schema` injects as every PV12+ document schema's `$schema`, so bumping it here would be a wire-visible change rather than a documentation fix.",
"type": "object",
"$defs": {
"documentProperties": {
Expand Down Expand Up @@ -588,6 +588,35 @@
"rankedAverageable": {
"type": "boolean",
"description": "When true, the index's terminal property-name tree also carries an ordered secondary tree keyed by each group's average (count + sum pair) of the `averageable` property, so \"top / bottom K groups by average\" queries are O(log n + k) with proofs. Requires `rangeAverageable: true` (which itself implies `rangeCountable` + `rangeSummable`). Adds the Avg ranking axis only — it does NOT imply `rankedCountable` or `rankedSummable`; each ranking axis costs its own secondary tree and is opted into separately."
},
"timeRange": {
"type": "object",
"properties": {
"on": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "Name of the timestamp index property to bucket. Must be this index's first property and name one of the system timestamps ($createdAt, $updatedAt or $transferredAt). A timeRange index may be unique only when range equals step (non-overlapping windows) and `on` is $createdAt."
},
"range": {
"type": "integer",
"minimum": 1,
"description": "Length of each time range window, in seconds. Must be an exact multiple of `step`."
},
"step": {
"type": "integer",
"minimum": 1,
"description": "Interval between successive range starts, in seconds. When `range` > `step` the ranges overlap and a document is indexed under `range / step` bucket-start values, bounded by a protocol-versioned cap (24 at protocol version 14)."
},
"origin": {
"type": "integer",
"minimum": 0,
"description": "Reference origin for range alignment, in seconds. Range starts are `origin + k * step`. Defaults to 0."
}
},
"required": ["on", "range", "step"],
"additionalProperties": false,
"description": "Buckets the first index property's timestamp into fixed-length, regularly-spaced (possibly overlapping) time ranges. The window parameters (`range`, `step`, `origin`) are declared in seconds, since a bucket is selected from block time and the target block interval is five seconds; the stored key is the range start as a u64 millisecond timestamp, so it stays directly comparable to the source timestamp it buckets. Enables trending/leaderboard queries within the newest/oldest active range. A system-timestamp source must be listed in the document type's required fields, and documents whose timestamp predates `origin` belong to no range (they are absent from this index). Available from protocol version 14."
}
},
"required": [
Expand Down
Loading
Loading