docs: improve docs#380
Conversation
WalkthroughThis update adds a comprehensive changelog and extensive new documentation files for GroveDB and its supporting crates. The documentation covers architecture, features, usage, design patterns, testing, and internal components such as Merk trees, storage, cost tracking, and proof systems. No code or API declarations were modified. Changes
Sequence Diagram(s)No sequence diagram generated as the changes are documentation-only and do not modify control flow or introduce new executable features. Possibly related PRs
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (10)
CHANGELOG.md (2)
8-23: Consider adding context links and dates per Keep a Changelog.The current “Unreleased” section is great, but when you cut a tagged release it is useful to:
• add the release date (## [1.2.0] – 2025-07-01)
• link each header to a diff ([1.2.0]: https://github.com/dashevo/grovedb/compare/v1.1.0...v1.2.0)
This makes it trivial for users to see what changed between versions.
18-23: Group breaking changes under their own heading.Keep a Changelog recommends a dedicated “### Breaking Changes” (or a “
⚠️ Breaking”) subsection so consumers can grep for it easily. Right now the marker is embedded in the Added list.
Example:### ⚠️ Breaking - `add_parent_tree_on_subquery` field added to `Query` (requires GroveVersion v2)docs/crates/auxiliary.md (1)
45-47: TheSubtreePath::fromexample won’t compile as written.
b"users"etc. are[u8; N]arrays; the API expects a slice of slices (&[&[u8]]).
A compiling snippet would be:let path = SubtreePath::from(&[b"users".as_slice(), b"alice".as_slice(), b"documents".as_slice()]);(or use
vec![...]withVec<Vec<u8>>). Adjusting avoids confusion for readers copy-pasting.README.md (1)
313-324: Clarify thatadd_parent_tree_on_subqueryrequires GroveVersion v2.You note this earlier, but reinforcing in the example (or gating it with a version check) helps users on older DBs understand why the call might panic.
docs/crates/merk.md (2)
101-106:CostResultpath may confuse readers outside GroveDB.The example uses
CostResult<TreeNode, Error>without explaining it’s a common alias ingrovedb-costs. A brief note or ause grovedb_costs::CostResult;line keeps the snippet self-contained.
154-163: Proof-size complexity statement could cite empirical numbers.Stating “O(log n)” is correct but giving typical proof sizes (e.g., ~1.3 kB for 1 M elements) makes the docs more actionable for integrators evaluating bandwidth requirements.
docs/crates/storage.md (2)
34-38: Placeholder ellipsis hides crucial type informationThe method signatures use
...for additional parameters, e.g.:fn put<K: AsRef<[u8]>, V: AsRef<[u8]>>(&self, key: K, value: V, ...) -> CostResult<(), Error>;Readers cannot infer required arguments or lifetimes. Replace the ellipsis with concrete parameters (e.g.
grove_version: &GroveVersion,flags: Option<ElementFlags>), or add a note that the full signature is shown elsewhere.
79-84: Minor typo – useprefix.len()notprefix.lenin commentThe code is correct, but the surrounding explanation repeatedly refers to
prefix.len(property) instead ofprefix.len()(method). Tiny clarity fix.docs/crates/costs.md (1)
206-216: Style nit – “Seeks to find …” is redundantLines 208 and 214 both read “Seeks to find …”. Shorten to “Seeks” or “Seek operations” to reduce redundancy.
docs/crates/grovedb.md (1)
15-27: Add language hint to fenced ASCII-diagram block
markdownlintflags this as MD040. Simply specify a language (e.g.text) after the triple back-ticks:-``` +```textThis silences the linter and renders consistently on GitHub.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
CHANGELOG.md(1 hunks)CLAUDE.md(1 hunks)README.md(1 hunks)docs/crates/auxiliary.md(1 hunks)docs/crates/costs.md(1 hunks)docs/crates/grovedb.md(1 hunks)docs/crates/merk.md(1 hunks)docs/crates/storage.md(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
CHANGELOG.md (2)
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
docs/crates/auxiliary.md (4)
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
CLAUDE.md (4)
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
README.md (1)
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
docs/crates/storage.md (2)
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
docs/crates/merk.md (2)
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
docs/crates/grovedb.md (6)
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/bidirectional_references/handling.rs:404-485
Timestamp: 2025-02-18T08:16:58.992Z
Learning: In GroveDB's bidirectional references implementation, the `delete_backward_references_recursively` function intentionally uses an all-or-nothing approach where the entire deletion fails if any backward reference in the chain does not have `cascade_on_update` set. This is a deliberate design choice to ensure strict consistency.
🪛 LanguageTool
docs/crates/costs.md
[style] ~210-~210: This phrase is redundant. Consider writing “Seeks”.
Context: ...ta - Hash operations for tree updates - Seeks to find insertion point - Root hash propagation...
(SEEK_TO_FIND)
[style] ~220-~220: This phrase is redundant. Consider writing “Seeks”.
Context: ...ation overhead #### Delete Operation - Seeks to find elements - Storage removal costs - Tree...
(SEEK_TO_FIND)
🪛 markdownlint-cli2 (0.17.2)
docs/crates/grovedb.md
16-16: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (5)
docs/crates/auxiliary.md (1)
223-278: Double-check crate names match Cargo.toml.You refer to crates as
node-grove,grovedb-version, etc. In Cargo they may use underscores (grovedb_version) or different package names. A quick grep before publishing avoids broken links in generated docs.CLAUDE.md (2)
30-33: Verify the feature flags actually exist.
cargo build --features full,estimated_costsassumes aestimated_costsfeature on the workspace root. If that flag was renamed toestimated-costs(kebab) or removed, build instructions will fail.
196-199:db.start_visualizerhelper may not exist on the current API.I couldn’t find a public method with that name in the repository. If the helper lives behind a feature flag or a separate crate, mention it; otherwise readers will hit a compilation error.
docs/crates/storage.md (1)
20-23: Clarify rollback semantics – GroveDB typically relies on batch atomicity rather than explicit rollbacksThe interface exposes an explicit
rollback_transactionmethod, but past design notes (seeutil/tx_ref.rs) state that GroveDB achieves all-or-nothing guarantees by applying ordered batches and therefore never rolls back a partially-applied transaction.
If the implementation still follows the batch-only approach, documenting a rollback API is misleading; if the API really changed, the rationale should be added here.docs/crates/grovedb.md (1)
248-254: Verify “automatic rollback” wording vs batch semanticsThe paragraph claims “Transaction rollback on any failure” but earlier documentation and implementation comments emphasise batch validation before apply, making an explicit RocksDB rollback unnecessary. Confirm the actual behaviour to keep docs authoritative.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
131-136: Updateinsertexample to the latest API signatureThe example omits the two new optional parameters (
options,transaction) required byGroveDb::insert, so it will not compile.- &["users", "alice"], - b"balance", - Element::new_item(b"100") + &["users", "alice"], + b"balance", + Element::new_item(b"100"), + None, // options + None // transaction
🧹 Nitpick comments (2)
README.md (2)
69-69: Add a language hint to the fenced blockMarkdown-lint flags this block because the language is missing; use
textto silence the warning and improve rendering in some viewers.-``` +```textAlso applies to: 70-70
7-8: Use a proper heading instead of bold textEmphasis as a heading hurts accessibility and breaks some automatic TOC generators. Replace with a level-2 heading:
-**GroveDB: Hierarchical Authenticated Data Structure Database** +## GroveDB: Hierarchical Authenticated Data Structure Database
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
README.md (2)
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
🪛 markdownlint-cli2 (0.17.2)
README.md
7-7: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
69-69: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Compilation errors
- GitHub Check: Linting
- GitHub Check: Tests
- GitHub Check: Code Coverage
🔇 Additional comments (1)
README.md (1)
160-162: Confirm crate version accuracy
grovedb = "3.0"is not published on crates.io at the time of writing. Verify the current released version and update accordingly to preventcargoresolution errors.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (7)
docs/merk-deep-dive.md (5)
50-53: Specify a language for this fenced block to satisfy MD040
markdownlintis flagging the missing language identifier.
Usingtextkeeps syntax-highlighting neutral and silences the linter.-``` +```text kv_hash = Hash(key || value) node_hash = Hash(kv_hash || left_child_hash || right_child_hash)
206-212: Add language identifier to ASCII-art blockSame MD040 warning as above.
-``` +```text root / \ alice charlie / bob
222-229: Silence linter on range-proof diagram-``` +```text KV("alice", "100") KV("bob", "200") KV("charlie", "300") Hash(left_boundary) // Proves nothing before "alice" Hash(right_boundary) // Proves nothing after "charlie"
234-240: Non-membership proof block missing language tag-``` +```text Proof contains: 1. KV("alice", "100") // Left neighbor 2. KV("charlie", "300") // Right neighbor 3. Proof that alice's right child leads to charlie 4. No "barbara" in between
245-251: Add language identifier to sum-tree example-``` +```text Proof contains: 1. KVValueHash("alice", "100", hash_of_100) 2. KVValueHash("bob", "200", hash_of_200) 3. KVValueHash("charlie", "300", hash_of_300) 4. Sum aggregation data showing 100+200+300=600README.md (1)
98-125: Label the architecture diagram code fenceThe ASCII diagram triggers MD040. Mark it as plain text.
-``` +```text ┌────────────────────────────────────────────────────────┐ │ GroveDB Core │ ... └────────────────────────────────────────────────────────┘docs/crates/grovedb.md (1)
16-28: Provide language identifier for root-structure diagram-``` +```text root ├── users (Tree) │ ├── alice (Tree) │ │ ├── balance (SumItem: 100) ... └── totals (SumTree)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
README.md(1 hunks)docs/crates/grovedb.md(1 hunks)docs/merk-deep-dive.md(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
README.md (5)
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
docs/crates/grovedb.md (6)
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/util/tx_ref.rs:35-42
Timestamp: 2025-02-18T08:18:22.104Z
Learning: GroveDB uses batches for atomic operations instead of explicit transaction rollbacks. Batches ensure that operations either all succeed or all fail, making explicit rollbacks unnecessary.
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/bidirectional_references/handling.rs:404-485
Timestamp: 2025-02-18T08:16:58.992Z
Learning: In GroveDB's bidirectional references implementation, the `delete_backward_references_recursively` function intentionally uses an all-or-nothing approach where the entire deletion fails if any backward reference in the chain does not have `cascade_on_update` set. This is a deliberate design choice to ensure strict consistency.
docs/merk-deep-dive.md (2)
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
🪛 markdownlint-cli2 (0.17.2)
README.md
16-16: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/crates/grovedb.md
16-16: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/merk-deep-dive.md
50-50: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
206-206: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
222-222: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
234-234: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
245-245: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Code Coverage
- GitHub Check: Linting
- GitHub Check: Compilation errors
- GitHub Check: Tests
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (7)
docs/merk-deep-dive.md (7)
50-53: Add a language identifier to the fenced code blockmarkdownlint (MD040) flags this block because it lacks a language tag.
Label it astext(or any suitable lexer) to silence the linter and improve highlighting.-``` +```text kv_hash = Hash(key || value) node_hash = Hash(kv_hash || left_child_hash || right_child_hash) -``` +```
197-209: Missing language tag on tree-diagram fenceSame MD040 issue. Mark the block as
textso the ASCII diagram isn’t parsed as Rust.-``` +```text root TreeFeatureType: CountedMerkNode(1) Link.aggregate_data: Count(7) / \ alice charlie ... aggregate_data: Count(1) aggregate_data: Count(1) -``` +```
217-224: Use a heading instead of bold emphasis for section titlemarkdownlint (MD036) warns about emphasis used in place of a heading.
Switch to an H3 for consistency with surrounding structure.-**Important: Aggregate Data is NOT in the State** +### Important: Aggregate Data is NOT in the State
269-275: Label fenced block in Example 1Add a
texttag to silence MD040 and keep formatting.-``` +```text root / \ alice charlie / bob -``` +```
285-292: Label fenced block in Example 2-``` +```text Proof nodes: 1. KV("alice", "100") 2. KV("bob", "200") 3. KV("charlie", "300") 4. Hash(left_boundary) // Proves nothing before "alice" 5. Hash(right_boundary) // Proves nothing after "charlie" -``` +```
297-303: Label fenced block in Example 3-``` +```text Proof contains: 1. KV("alice", "100") // Left neighbor 2. KV("charlie", "300") // Right neighbor 3. Proof that alice's right child leads to charlie 4. No "barbara" in between -``` +```
308-314: Label fenced block in Example 4-``` +```text Proof contains: 1. KVValueHash("alice", "100", hash_of_100) 2. KVValueHash("bob", "200", hash_of_200) 3. KVValueHash("charlie", "300", hash_of_300) 4. Sum aggregation data showing 100+200+300=600 -``` +```
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/merk-deep-dive.md(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: fominok
PR: dashpay/grovedb#345
File: grovedb/src/operations/delete/v1.rs:19-35
Timestamp: 2025-02-18T08:17:30.690Z
Learning: Refactoring suggestions for legacy code should be avoided as they are considered out of scope for feature PRs. This includes the function `delete_internal_on_transaction` in `grovedb/src/operations/delete/v1.rs` which is legacy code.
Learnt from: ktechmidas
PR: dashpay/grovedb#378
File: .github/workflows/release-crates.yml:34-34
Timestamp: 2025-06-06T06:13:27.562Z
Learning: The crate `grovedbg-types` is a valid crate name in the GroveDB project, not a typo of `grovedb-types`.
docs/merk-deep-dive.md (2)
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
Learnt from: pauldelucia
PR: dashpay/grovedb#366
File: grovedb/src/error.rs:7-7
Timestamp: 2025-04-18T06:12:25.554Z
Learning: The `Error::InvalidProofError` in grovedb/src/operations/proof/util.rs is from the merk error handling system, distinct from grovedb's own `Error::InvalidProof` variant. These are separate error types from different crates.
🪛 markdownlint-cli2 (0.17.2)
docs/merk-deep-dive.md
50-50: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
197-197: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
217-217: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
269-269: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
285-285: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
297-297: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
308-308: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Tests
- GitHub Check: Linting
- GitHub Check: Compilation errors
- GitHub Check: Code Coverage
|
Self reviewed: docs only |
Issue being fixed or feature implemented
The GroveDB documentation was outdated and insufficient for developers trying to understand and use the codebase effectively. The README lacked comprehensive architectural details, and there was no deep documentation for individual crates. Additionally, recent
features like
add_parent_tree_on_subquerywere undocumented.What was done?
Created comprehensive crate documentation in
docs/crates/:merk.md: Deep dive into the Merkle AVL tree implementationstorage.md: Detailed explanation of the RocksDB abstraction layergrovedb.md: In-depth coverage of core database functionalitycosts.md: Resource tracking and accounting system documentationauxiliary.md: Overview of all supporting cratesCompletely rewrote README.md with:
Enhanced CLAUDE.md with:
Documented new features from latest develop branch:
add_parent_tree_on_subqueryfeatureHow Has This Been Tested?
Breaking Changes
No breaking changes - documentation only. However, this PR documents the breaking change from #379 (
add_parent_tree_on_subqueryfeature).Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit