Repository navigation
Description
Implement the full native capability and collection adapters
Parent: #4626 · Complete tracking register
Proposed target: 5.0-dev. This is a workstream tracking issue, not a claim that the release branch exists or the implementation is done. Owner: QuantumExplorer. Dates and effort remain unset.
Scope
Expose native schema/index, aggregate/ranked/composite query, relation, typed collection, credit/token and identity/group boundaries; preserve native atomic propagation and lifecycle across the complete catalogue.
Specification
DVM-04 · DVM-05 · DVM-06 · DVM-09
The current parent acceptance and module/capability appendices remain authoritative; these DIP drafts add proposed engineering detail without silently approving open allocations.
Completion criteria
Complete every listed task acceptance item, its applicable capability matrix, and the linked specification vectors. Record actual PR/test evidence; drafting is not production completion.
Task acceptance
CAP-03
- Complete native schema and index host adapters
Reuse existing DPP/Drive validation, not duplicated validators; exercise all compatible and rejected flag/layout combinations. Q09 (confirmed): Contracts may parameterize contested indexes only through supported native declarations. Native rules select and award the winner; guest code and custom guards cannot veto, delay, redirect or retry the award. No blocked-award or guest retry workflow. Make rule scopes explicit; enforce native validation, internal award authority, atomicity and lifecycle rules. Q18 (confirmed): Reuse existing versioned DPP/Drive index-update rules exactly. Do not introduce a new index-backfill/migration subsystem. The inspected v1 validator rejects adding, removing or changing indexes on existing document types; new types may declare indexes through normal validation. Q36 (confirmed): Use simple persistence/index/rule attributes plus typed builders for advanced native features, producing one canonical manifest. Reject unsupported/conflicting declarations; native validation remains the authority. No unrestricted database paths. Native award acceptance: supported parameter validation; no guest/custom-guard execution on winner award; ordinary action guards remain enforced; internal native authority cannot be forged; native lifecycle/atomicity and existing index-update rules remain enforced. Engineering architecture: Extract shared stateful native checks from ABCI to Drive and route ordinary and contract operations through the same versioned validators/index operations. Native contested awards retain native scope and cannot call a guest veto.
Prerequisites: CAP-01, CAP-02, R12-01, R08-04.
Dependents: CAP-04, CAP-10, CAP-11, SDK-03.
Modules: DPP, GUARDS, NATIVE_VALIDATE, DOCUMENTS. Original task context. Capabilities: D01, D02, D03, D04, D05, D06, D07, D08, D09, D10, D11, I01, I02, I03, I04, I05, I06, I07, I08, I09, I10, I11, I12, E01, E02. Refinements (not extra dependency edges): FIX-02, FIX-10, SDK-01, SDK-02.
CAP-04
- Expose all aggregate and ranked query families
Whole/range/group/HAVING/rank/count/sum/average parity, nested indexes, signed values, ties and emptiness.
Prerequisites: CAP-03, R12-01.
Dependents: CAP-12.
Modules: QUERIES, COLLECTIONS, PROOFS. Original task context. Capabilities: T04, T05, T06, T07, T08, T09, T10, T11, T12, Q07, Q08, Q09, Q10, Q11, Q12, Q13.
CAP-05
- Expose bounded ordinary and composite query families
Canonical query/consumer compatibility, reference/branch fan-out, parent rows, offsets, limits and visibility. Q08 (confirmed): Read current execution state at the transition position in agreed block order, including accepted earlier transitions and own writes. Never expose later or abandoned speculative writes. Parallel execution must match sequential roots, results, fees and receipts; internal retries are not charged.
Prerequisites: CAP-01, CAP-02, R12-01, R09-01.
Dependents: CAP-12.
Modules: QUERIES, NATIVE, QUERY_TYPES. Original task context. Capabilities: Q01, Q02, Q03, Q04, Q05, Q06, Q14, Q15, Q16, Q17. Refinements (not extra dependency edges): FIX-01.
CAP-06
- Integrate ordinary and bidirectional relations
Consent, consistently enabled bookkeeping, cascade bounds, compatible parents/proofs/batches and wipe/migration rules.
Prerequisites: CAP-01, CAP-02, R12-01.
Dependents: CAP-10, CAP-11, CAP-12.
Modules: RELATIONS, NATIVE. Original task context. Capabilities: R01, R02, R03, R04, R05.
CAP-07
- Integrate typed base and specialized collections
Explicit configurations, append/mutation semantics, capacity, typed results and supported current-root proof adapters. Q38 (confirmed): Private Rust fields and ACL checks are not encryption. Keep the private capability in the catalogue while encryption, key control, query visibility and proof behavior are separately specified before enabling its interface.
Prerequisites: CAP-01, CAP-02, R12-01.
Dependents: CAP-10, CAP-11, CAP-12.
Modules: COLLECTIONS, NATIVE. Original task context. Capabilities: T01, T02, T03, T13, T14, T15, T16, T17.
CAP-08
- Complete contract credit and token bucket adapters
Native rules, receiving permission, supply/conservation, group-authorized actions and all token-history settings. Q22 (confirmed): A network freeze blocks execution, spending and controlled writes; queries, current-state proofs and native bookkeeping continue. Frozen recipients may receive funds under Q30 and existing receiving rules. Q25 (confirmed): Foreign tokens remain in the deleted-contract identity vestige until a separate network vote approves specific token IDs, amounts and a recipient. Require strictly more than two-thirds of all active eligible evonodes, one vote each, with a one-week window and early approval after eligibility recheck. Enforce native transfer validation and conservation; no unrestricted permanent recovery authority. Q27 (confirmed): Wipe applies immediate logical destruction with validated aggregate accounting, followed by bounded physical cleanup. Destroyed issuer tokens are unusable on every path. Foreign tokens survive in the vestige; canonical code is permanent. Q30 (confirmed direction): Pause execution of jobs whose contract is frozen. Frozen identities/contracts may receive native funds without running frozen guest code; existing asset-specific and receiving permissions still apply. Proposed queue policy resumes future runs without a catch-up burst and cancels permanently missing methods.
Prerequisites: CAP-01, CAP-02, R12-01, R04-01.
Dependents: CAP-10, CAP-11, CAP-12.
Modules: ASSETS, NATIVE, FEES. Original task context. Capabilities: N02, N03, N04, N08, N09, N10, N11, N12, N13, N14, N15. Refinements (not extra dependency edges): FIX-07.
CAP-09
- Cover identity, group and system boundaries
Every native root/action mapped to an allowed adapter or a precise rejection; no forged system or identity authority. Q09 (confirmed): Contracts may parameterize contested indexes only through supported native declarations. Native rules select and award the winner; guest code and custom guards cannot veto, delay, redirect or retry the award. No blocked-award or guest retry workflow. Make rule scopes explicit; enforce native validation, internal award authority, atomicity and lifecycle rules. Native award acceptance: supported parameter validation; no guest/custom-guard execution on winner award; ordinary action guards remain enforced; internal native authority cannot be forged; native lifecycle/atomicity and existing index-update rules remain enforced. Prefunded reuse: Generalize the existing prefunded-balance native integration for validated scheduled-job-removal use. Retain legacy 40/128 paths, native vote authorization and historical semantics; update relevant totals/query labels, proof/estimation paths and consumers to handle mixed purposes without trusting a caller-supplied arbitrary balance ID. Engineering architecture: Extract shared stateful native checks from ABCI to Drive and route ordinary and contract operations through the same versioned validators/index operations. Native contested awards retain native scope and cannot call a guest veto.
Prerequisites: CAP-02.
Dependents: None recorded.
Modules: NATIVE_SYSTEM, NATIVE, AUTH. Original task context. Capabilities: N01, N05, N06, N07, N16, N17, N18, N19, N20, N21, N22, N23. Refinements (not extra dependency edges): FIX-10, STUB-ACL, EXT-ACL, INT-ACL.
CAP-10
- Verify atomic operation and propagation matrix
All 20 GroveOp variants accounted for; internal variants blocked, derived effects validated, rollback coherent across host and native work. Q08 (confirmed): Read current execution state at the transition position in agreed block order, including accepted earlier transitions and own writes. Never expose later or abandoned speculative writes. Parallel execution must match sequential roots, results, fees and receipts; internal retries are not charged. Engineering architecture: Respect GroveDB single-writer semantics. Implement and validate proposed accepted-prefix execution branches using upstream Merk/storage algorithms before stateful speculation. Track native point/range/absence, cache and cost dependencies; replay accepted native operations in order, never merge physical Merk deltas.
Prerequisites: CAP-03, CAP-06, CAP-07, CAP-08.
Modules: VIEW, BATCH, DRIVE_TESTS. Original task context. Capabilities: A01, A02, A03, A04, A05, A06, A07, A08, A09. Refinements (not extra dependency edges): FIX-01, FIX-12.
CAP-14
- Integrate every capability with calls and lifecycle
Ordered current-state and same-transition visibility, nested errors, receipts, freeze/wipe, permanent code, scheduled payment failure and unsupported versions. Q08 (confirmed): Read current execution state at the transition position in agreed block order, including accepted earlier transitions and own writes. Never expose later or abandoned speculative writes. Parallel execution must match sequential roots, results, fees and receipts; internal retries are not charged. Q09 (confirmed): Contracts may parameterize contested indexes only through supported native declarations. Native rules select and award the winner; guest code and custom guards cannot veto, delay, redirect or retry the award. No blocked-award or guest retry workflow. Make rule scopes explicit; enforce native validation, internal award authority, atomicity and lifecycle rules. Q19 (confirmed): Only active eligible evonodes vote in network freeze/wipe governance, with one vote each. This is separate from compilation readiness and from existing contested-index polls. Q20 (confirmed): Freeze, wipe, unfreeze and foreign-token vestige recovery require strictly more than two-thirds of all active eligible evonodes, one vote each. Votes have a one-week window and approve early after rechecking eligibility against agreed current membership. Require N > 0 and 3yes > 2N, equivalently floor(2N/3)+1 yes votes. Exactly two-thirds fails. Compilation readiness remains at least 80% with its existing adaptive wait and no automatic expiry. Q22 (confirmed): A network freeze blocks execution, spending and controlled writes; queries, current-state proofs and native bookkeeping continue. Frozen recipients may receive funds under Q30 and existing receiving rules. Q23 (confirmed): A network-voted freeze needs a network vote to lift it: strictly more than two-thirds of all active eligible evonodes, one vote each, a one-week window and early approval after eligibility recheck. Authorized contract updates stay frozen. Contract-defined freezes retain their declared rules; a wipe remains permanent. Q25 (confirmed): Foreign tokens remain in the deleted-contract identity vestige until a separate network vote approves specific token IDs, amounts and a recipient. Require strictly more than two-thirds of all active eligible evonodes, one vote each, with a one-week window and early approval after eligibility recheck. Enforce native transfer validation and conservation; no unrestricted permanent recovery authority. Q27 (confirmed): Wipe applies immediate logical destruction with validated aggregate accounting, followed by bounded physical cleanup. Destroyed issuer tokens are unusable on every path. Foreign tokens survive in the vestige; canonical code is permanent. Q30 (confirmed direction): Pause execution of jobs whose contract is frozen. Frozen identities/contracts may receive native funds without running frozen guest code; existing asset-specific and receiving permissions still apply. Proposed queue policy resumes future runs without a catch-up burst and cancels permanently missing methods. Native award acceptance: supported parameter validation; no guest/custom-guard execution on winner award; ordinary action guards remain enforced; internal native authority cannot be forged; native lifecycle/atomicity and existing index-update rules remain enforced. Governance boundary cases: exactly two-thirds fails; floor(2N/3)+1 passes; N=0 fails; 400 nodes require 267 yes, 1000 require 667. Recheck membership and deduplicate votes before early approval; one-week expiry; once-only execution. Readiness remains 80%.
Prerequisites: CAP-10, CAP-11, R10-10.
Dependents: CAP-16.
Modules: HOST, CALLS, JOBS, LIFECYCLE. Original task context. Capabilities: O06, O07, D09, R05, N03, N04. Refinements (not extra dependency edges): FIX-07, FIX-12.
CAP-17
- Maintain source-to-capability coverage as dependencies change
Regenerate finite enum/field inventories; new variants require a mapping, native compatibility evidence, SDK/proof and test disposition.
Prerequisites: CAP-01.
Dependents: None recorded.
Modules: DELIVERY, BATCH, COLLECTIONS, RELATIONS. Original task context. Capabilities: E01, E02, A08.
R04-01
- Specify contract credit/token bucket identifiers and separate sum-tree storage, authorization, query/proof paths, and conservation integration; coordinate the 4.3 ACL work without changing ordinary identities.
Engineering recommendation: Use the revised ordinary-SumTree engineering proposal for the contract-credit root and per-contract bucket trees; define individual-bucket and whole-total proofs through authenticated parent elements, including live/wiped exclusion semantics. Range-sum proof capabilities remain separate specialized collections.
Prerequisites: None recorded.
Dependents: CAP-08.
Modules: ASSETS, DPP, AUTH, PROOFS. Original task context. Refinements (not extra dependency edges): FIX-08, STUB-ACL, EXT-ACL, INT-ACL.
R04-02
- Implement holdings and transfers for credits, documents, and tokens under contract rules: receiving-side deposit checks, identity/group authorization, multi-recipient payouts, and mutual permission for contract transfers; enforce no direct contract-to-Core unlock.
Q07 (confirmed): Delegate only explicitly granted rights; retain original signer and immediate caller separately. Never automatically pass all signer rights to a callee. Q22 (confirmed): A network freeze blocks execution, spending and controlled writes; queries, current-state proofs and native bookkeeping continue. Frozen recipients may receive funds under Q30 and existing receiving rules. Q30 (confirmed direction): Pause execution of jobs whose contract is frozen. Frozen identities/contracts may receive native funds without running frozen guest code; existing asset-specific and receiving permissions still apply. Proposed queue policy resumes future runs without a catch-up burst and cancels permanently missing methods.
Prerequisites: None recorded.
Dependents: None recorded.
Modules: NATIVE, RULES, NATIVE_VALIDATE, ASSETS. Original task context.
R04-03
- Integrate contract-only document create/replace/delete authorization with existing document validation, using contracts rather than keyless identities.
Prerequisites: None recorded.
Dependents: None recorded.
Modules: NATIVE_VALIDATE, DOCUMENTS, AUTH. Original task context. Refinements (not extra dependency edges): INT-ACL.
Coordination and dependencies
Task-level prerequisites above govern order. Workstreams contain multiple stages, so a cross-link is not a claim that the entire other issue must close first. These are Markdown relationships, not native GitHub blocked-by edges. The parent dependency register preserves all 234 links, reasons and explicit/inferred labels.
- CAP-01 → CAP-03 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-02 → CAP-03 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-01 → CAP-05 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-02 → CAP-05 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-01 → CAP-06 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-02 → CAP-06 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-01 → CAP-07 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-02 → CAP-07 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-01 → CAP-08 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-02 → CAP-08 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-02 → CAP-09 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-03 → CAP-11 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-06 → CAP-11 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-07 → CAP-11 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-08 → CAP-11 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-04 → CAP-12 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-05 → CAP-12 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-06 → CAP-12 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-07 → CAP-12 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-08 → CAP-12 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-11 → CAP-14 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-10 → CAP-15 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-14 → CAP-16 (inferred): Implementation dependency between the specified adapters and their integration checks.
- CAP-01 → CAP-17 (inferred): Implementation dependency between the specified adapters and their integration checks.
- R12-01 → CAP-03 (explicit): The owner selected fee-registry/refund corrections before infrastructure merges.
- R12-01 → CAP-04 (explicit): The owner selected fee-registry/refund corrections before infrastructure merges.
- R12-01 → CAP-05 (explicit): The owner selected fee-registry/refund corrections before infrastructure merges.
- R12-01 → CAP-06 (explicit): The owner selected fee-registry/refund corrections before infrastructure merges.
- R12-01 → CAP-07 (explicit): The owner selected fee-registry/refund corrections before infrastructure merges.
- R12-01 → CAP-08 (explicit): The owner selected fee-registry/refund corrections before infrastructure merges.
- R08-04 → CAP-03 (inferred): Schema/document adapters implement the versioned guest ABI.
- R09-01 → CAP-05 (inferred): Canonical read declarations define typed query requests.
- R10-10 → CAP-14 (inferred): Nested-call semantics define rollback and shared-resource acceptance.
- CAP-03 → SDK-03 (inferred): Worked native indexes use the real schema/index host adapter.
PR and evidence tracking
Create focused PRs against the chosen development branch. Link this issue with Refs #<issue-number> for partial work. Do not use Fixes for the whole workstream until every listed full task and acceptance criterion is complete.
For a PR that completes an entire task, add a standalone line in its actual PR body: Dash-Tasks: <completed task IDs>. Replace the placeholder with only fully completed IDs. Preparation PRs use ordinary references and omit the completion marker for their broader parent tasks. The site reads this marker on PRs in dashpay/platform and dashpay/grovedb: draft = red, ready for review = yellow, merged with no linked open PR = green. Closed-unmerged is not completion. This does not automatically close issue checkboxes and does not prove acceptance tests passed; reviewers must record the evidence.
| Evidence | Link / result |
|---|---|
| Implementation PRs | Pending |
| Canonical vectors and targeted tests | Pending |
| Upgrade/replay/conservation evidence, where applicable | Pending |
| Remaining full-task acceptance | All unchecked above |
Activity