Commit 0568dd4
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
- src/data_contract
- document_type
- accessors
- v2
- class_methods/try_from_schema
- v2
- methods
- validate_update/v0
- v2
- methods/validate_update/v0
- rs-drive/src
- drive
- contract
- insert/insert_contract/v0
- update/update_contract/v0
- document
- delete/internal/add_estimation_costs_for_remove_document_to_primary_storage/v0
- estimation_costs/add_estimation_costs_for_add_document_to_primary_storage/v0
- insert/add_document_to_primary_storage/v0
- fees
- rs-platform-version/src/version
- dpp_versions/dpp_contract_versions
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
508 | 516 | | |
509 | 517 | | |
510 | 518 | | |
| |||
0 commit comments