Skip to content

Commit 0568dd4

Browse files
feat(dpp): add documents_countable and blast_syncable to DocumentTypeV2
Adds two new fields to DocumentTypeV2: - `documents_countable: bool` — primary key tree uses CountTree for O(1) total document count queries - `blast_syncable: bool` — primary key tree uses ProvableCountTree for BLAST sync support. Implies documents_countable = true. Changes: - DocumentTypeV2 struct with both fields - V2 variant added to DocumentType/DocumentTypeRef/DocumentTypeMutRef - DocumentTypeV2Getters/Setters traits - Schema parsing v2 with protocol version 12+ gating - Drive: CountTree for countable, ProvableCountTree for blast_syncable - Meta-schema: documentsCountable and blastSyncable properties - Fix duplicate V2 match arms (clippy unreachable-patterns) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 46e037e commit 0568dd4

21 files changed

Lines changed: 1126 additions & 28 deletions

File tree

packages/rs-dpp/schema/meta_schemas/document/v0/document-meta.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,14 @@
505505
],
506506
"description": "Key requirements. 0 - Unique Non Replaceable, 1 - Multiple, 2 - Multiple with reference to latest key."
507507
},
508+
"documentsCountable": {
509+
"type": "boolean",
510+
"description": "When true, the primary key tree uses a CountTree enabling O(1) total document count queries"
511+
},
512+
"blastSyncable": {
513+
"type": "boolean",
514+
"description": "When true, the primary key tree uses a ProvableCountTree enabling BLAST sync. Implies documentsCountable."
515+
},
508516
"tokenCost": {
509517
"type": "object",
510518
"properties": {

0 commit comments

Comments
 (0)