Repository navigation
fix(wasm-dpp): fix decoding protocol version varint error to match previous implementation - #849
Merged
Merged
Conversation
…evious implementation
qrayven
approved these changes
Mar 23, 2023
QuantumExplorer
added a commit
that referenced
this pull request
Sep 1, 2026
…, budgeted deepest-first, full-path removal granularity Replaces the recursive-delete placeholder with the primitive that landed for dashpay/grovedb#848 (grovedb PR #849): the flat-subtree drop — O(1) consensus removal of a subtree declared to hold no child subtrees, with a durable redo record staged atomically (outside the root hash) naming every orphaned storage prefix (the subtree's own plus, for indexed primaries, the three per-axis secondaries), reclaimed outside consensus via range tombstones. Pin bumped to the PR head. A time-range bucket is not flat, so drainage works DEEPEST-FIRST, one flat unit at a time: each group's [0] reference tree (where the mass lives) is flat-dropped; the emptied group value tree leaves through the flat drop — or, under a ranked property-name tree, through grovedb's dedicated indexed-tree delete, which mirrors the group out of the ranking secondary (grovedb rejects generic child removals from indexed primaries, on the immediate path too); the drained property-name tree is flat-dropped, dooming its secondary prefixes; the emptied bucket last. Every step is O(1) — the step COUNT is what scales with the window's distinct groups, and that count is the budget. The trigger broadens from bucket-creating writes to EVERY write into a TTL'd index: one bucket-creation per step could never drain a window whose group count exceeds a single budget. Each write resumes exactly where the previous budget ran out (the drain is stateless — it re-finds the oldest expired bucket and its first remaining group); when nothing is expired the check is one bounded range read. The SystemLimits cap is renamed accordingly (max_time_range_ttl_drop_operations_per_write, 8). Partial drainage forces the removal walkers from bucket granularity to FULL-PATH granularity: a delete (or key-changing update) of a document whose group trees the drain already took inside a still-standing bucket skips exactly that entry (walked existence checks from the document-type path, so a missing intermediate answers false instead of erroring), while a document whose trees still stand is removed normally — an undrained expired bucket never carries dangling references. The skip flag threads through the delete recursion and is set only on the stateful path for expired-and-standing buckets; live buckets behave byte-identically to before. Host duties land in drive-abci: flush_pending_prefix_drops after each finalized block's commit (the drops' redo records become visible there) and once at platform open, completing reclamation a crash interrupted. Both are outside consensus — failures log and retry, the root hash is never involved. New coverage: the partial-drain e2e pins the resume behavior (five groups exceed one budget; groups drain in key order; deletes from both drained and standing groups succeed mid-state; a later write finishes the bucket), alongside the adapted lifecycle e2e now running against the real primitive. Design doc updated to the shipped shape. Co-Authored-By: Claude Fable 5 <[email protected]>
QuantumExplorer
added a commit
that referenced
this pull request
Sep 1, 2026
Moves the pin from grovedb PR #849's head to the develop merge commit, so it no longer references a deletable PR branch. No code changes; the TTL drainage, ranked, and time-range batteries all pass on the merged rev. Co-Authored-By: Claude Fable 5 <[email protected]>
4 of 6 tasks
QuantumExplorer
added a commit
that referenced
this pull request
Sep 1, 2026
…, budgeted deepest-first, full-path removal granularity Replaces the recursive-delete placeholder with the primitive that landed for dashpay/grovedb#848 (grovedb PR #849): the flat-subtree drop — O(1) consensus removal of a subtree declared to hold no child subtrees, with a durable redo record staged atomically (outside the root hash) naming every orphaned storage prefix (the subtree's own plus, for indexed primaries, the three per-axis secondaries), reclaimed outside consensus via range tombstones. Pin bumped to the PR head. A time-range bucket is not flat, so drainage works DEEPEST-FIRST, one flat unit at a time: each group's [0] reference tree (where the mass lives) is flat-dropped; the emptied group value tree leaves through the flat drop — or, under a ranked property-name tree, through grovedb's dedicated indexed-tree delete, which mirrors the group out of the ranking secondary (grovedb rejects generic child removals from indexed primaries, on the immediate path too); the drained property-name tree is flat-dropped, dooming its secondary prefixes; the emptied bucket last. Every step is O(1) — the step COUNT is what scales with the window's distinct groups, and that count is the budget. The trigger broadens from bucket-creating writes to EVERY write into a TTL'd index: one bucket-creation per step could never drain a window whose group count exceeds a single budget. Each write resumes exactly where the previous budget ran out (the drain is stateless — it re-finds the oldest expired bucket and its first remaining group); when nothing is expired the check is one bounded range read. The SystemLimits cap is renamed accordingly (max_time_range_ttl_drop_operations_per_write, 8). Partial drainage forces the removal walkers from bucket granularity to FULL-PATH granularity: a delete (or key-changing update) of a document whose group trees the drain already took inside a still-standing bucket skips exactly that entry (walked existence checks from the document-type path, so a missing intermediate answers false instead of erroring), while a document whose trees still stand is removed normally — an undrained expired bucket never carries dangling references. The skip flag threads through the delete recursion and is set only on the stateful path for expired-and-standing buckets; live buckets behave byte-identically to before. Host duties land in drive-abci: flush_pending_prefix_drops after each finalized block's commit (the drops' redo records become visible there) and once at platform open, completing reclamation a crash interrupted. Both are outside consensus — failures log and retry, the root hash is never involved. New coverage: the partial-drain e2e pins the resume behavior (five groups exceed one budget; groups drain in key order; deletes from both drained and standing groups succeed mid-state; a later write finishes the bucket), alongside the adapted lifecycle e2e now running against the real primitive. Design doc updated to the shipped shape. Co-Authored-By: Claude Fable 5 <[email protected]>
QuantumExplorer
added a commit
that referenced
this pull request
Sep 1, 2026
Moves the pin from grovedb PR #849's head to the develop merge commit, so it no longer references a deletable PR branch. No code changes; the TTL drainage, ranked, and time-range batteries all pass on the merged rev. Co-Authored-By: Claude Fable 5 <[email protected]>
Merged
1 of 5 tasks
QuantumExplorer
added a commit
that referenced
this pull request
Sep 4, 2026
…a shared key, #850) Pins grovedb at dashpay/grovedb#850: `PathQuery::merge` (v1) now descends into a key another grafted branch already owns and grafts a limited branch where the two actually diverge, instead of refusing the collision at the first key past the common path; a lone body landing at a merged root keeps the caps on its own branches. Composite document queries (a page plus derived sub-queries under one merged proof) need this: a limited page on `post` merged with a by-id fetch on `post`, or a limited page and a limited lookup under one contract once a cross-contract sub-query lifts the common path to the root, all collide one level above where they diverge. Also carries #849 (flat-subtree drop) from develop. No API change on the platform side. Co-Authored-By: Claude Fable 5.1 <[email protected]>
QuantumExplorer
added a commit
that referenced
this pull request
Sep 4, 2026
…a shared key, #850) Pins grovedb at dashpay/grovedb#850: `PathQuery::merge` (v1) now descends into a key another grafted branch already owns and grafts a limited branch where the two actually diverge, instead of refusing the collision at the first key past the common path; a lone body landing at a merged root keeps the caps on its own branches. Composite document queries (a page plus derived sub-queries under one merged proof) need this: a limited page on `post` merged with a by-id fetch on `post`, or a limited page and a limited lookup under one contract once a cross-contract sub-query lifts the common path to the root, all collide one level above where they diverge. Also carries #849 (flat-subtree drop) from develop. No API change on the platform side. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
CI being broken because varint parsing error implementation changed
What was done?
Brought the old error back
How Has This Been Tested?
Run the tests
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only