Skip to content

docs(explanations): apply v3.1 audit findings across explanation pages#145

Merged
thephez merged 3 commits intodashpay:3.1.0from
thephez:chore/v3.1-expl-updates-2
Apr 22, 2026
Merged

docs(explanations): apply v3.1 audit findings across explanation pages#145
thephez merged 3 commits intodashpay:3.1.0from
thephez:chore/v3.1-expl-updates-2

Conversation

@thephez
Copy link
Copy Markdown
Collaborator

@thephez thephez commented Apr 22, 2026

Apply audit findings against the explanation docs and align with the v3.1-dev platform source: refresh identity creation, data contract/document/batch coverage, add data-trigger context for non- DPNS system contracts, correct consensus and drive details, and expand token/NFT/query/DAPI/fees content.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Preview build: https://dash-docs-platform--145.org.readthedocs.build/en/145/

Summary by CodeRabbit

  • Documentation
    • Expanded DAPI streaming to include masternode-list updates
    • Clarified platform chain: ~5s target block spacing and same-block execution with AppHash-based state verification
    • Introduced GroveDB as authenticated storage and updated Drive data update flow
    • Reworked identity creation to asset-lock funding and clarified credits
    • Added tokens/groups/keywords to data contracts, batch state-transition types, and token distribution/marketplace rules
    • Clarified fees and query engine system fields

Apply 31 audit findings against the explanation docs and align with
the v3.1-dev platform source: refresh identity creation, data
contract/document/batch coverage, add data-trigger context for non-
DPNS system contracts, correct consensus and drive details, and
expand token/NFT/query/DAPI/fees content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@thephez has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 8 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 52 minutes and 8 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c9f91052-41d1-46f5-a490-28b5b7c83c5f

📥 Commits

Reviewing files that changed from the base of the PR and between 19266b7 and ad957e5.

📒 Files selected for processing (1)
  • docs/explanations/tokens.md
📝 Walkthrough

Walkthrough

Documentation updates across 15 explanation files describing GroveDB-backed platform state with same-block execution (AppHash), expanded DAPI gRPC streaming, batch state transitions including token/document operations, asset-lock-based identity creation, and added data-contract features (tokens, groups, keywords).

Changes

Cohort / File(s) Summary
DAPI & Consensus
docs/explanations/dapi.md, docs/explanations/platform-consensus.md
gRPC streaming now includes masternode-list updates; consensus text updated to reflect Tenderdash same-block execution, use of Ed25519, and revised validator rotation rules.
Platform State & Drive
docs/explanations/drive-platform-state.md, docs/explanations/drive-platform-chain.md, docs/explanations/drive.md
Documented GroveDB as hierarchical authenticated storage; AppHash commits post-execution state in committed headers; updated block spacing target to ~5s and adjusted DAPI broadcast flow to Tenderdash for inclusion.
Data Contract & Tokens
docs/explanations/platform-protocol-data-contract.md, docs/explanations/platform-protocol.md, docs/explanations/tokens.md, docs/explanations/platform-protocol-data-trigger.md
Added optional contract-level fields: tokens, groups, keywords; expanded token lifecycle (base supply minting, distribution rules, claim semantics); listed additional system data triggers.
Document & State Transitions
docs/explanations/platform-protocol-document.md, docs/explanations/platform-protocol-state-transition.md
Switched document submission to Batch (type 1) state transitions; added document actions transfer, purchase, updatePrice; batch elements may include token transitions; versioning via serialized enum.
Query & Identity
docs/explanations/query.md, docs/explanations/identity.md
Declared implicit system query fields ($id, $ownerId, $createdAt, $updatedAt, $transferredAt); identity creation flow changed to Core-chain asset lock proof-based funding (asset lock → identity create ST).
Minor Clarifications
docs/explanations/fees.md, docs/explanations/nft.md
Clarified fee calculation as sum of per-operation costs; minor wording/format edits in NFT doc (terminology and punctuation).

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant DAPI
  participant Tenderdash
  participant GroveDB
  participant PlatformChain

  Client->>DAPI: Submit Batch state transition (including token/doc ops) or request proof
  DAPI->>Tenderdash: Broadcast state transition for inclusion
  Tenderdash->>Tenderdash: Propose/agree block (same-block execution)
  Tenderdash->>GroveDB: Execute transitions -> apply GroveDB mutations
  GroveDB-->>Tenderdash: Return post-execution root hash
  Tenderdash-->>PlatformChain: Commit block with AppHash (post-exec root)
  PlatformChain-->>DAPI: Signed header with AppHash
  DAPI-->>Client: Deliver proof (GroveDB proof + signed AppHash) or stream events (blocks/txs/masternode-list)
  Client->>Client: Verify proof against signed AppHash (light-client verification)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through docs with a joyful twitch,
GroveDB roots and AppHash stitched rich,
Asset locks clink, identities sing,
Batch transitions dance — tokens take wing,
A spring of changes, light-footed and quick!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: applying v3.1 audit findings across explanation documentation pages, which is clearly reflected in all the file updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/explanations/identity.md`:
- Line 67: Replace the ambiguous phrase "identity create or topup transaction"
with the Platform-specific term "state transition" to match the rest of the doc;
specifically, update the text so it reads something like "Once a user locks Dash
on the core blockchain and proves ownership of the locked value in an Identity
Create or Topup state transition, their credit balance..." and ensure any other
occurrences of "transaction" in this context are changed to "state transition"
for consistency.

In `@docs/explanations/platform-protocol-state-transition.md`:
- Line 47: Update the "Masternode Vote" table row to include the payload type
code `8`, matching the format of surrounding entries (e.g., change "Masternode
Vote" to "Masternode Vote (`8`)") so it aligns with the protocol spec
(state-transition type 8) and other rows; ensure the row reads: Masternode Vote
(`8`) | Contested resource vote details ...

In `@docs/explanations/tokens.md`:
- Around line 273-274: Update the documented field names to use the protocol's
camelCase casing: replace base_supply with baseSupply,
new_tokens_destination_identity with newTokensDestinationIdentity, and
marketplace_rules with marketplaceRules in the tokens.md text (including the
occurrences around the described lines and the 293-298 section); ensure every
mention, examples, and cross-references in that file use these exact identifiers
so the docs match the protocol property names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c606a60b-99e1-4950-981d-5503f12f6462

📥 Commits

Reviewing files that changed from the base of the PR and between a284662 and 3c44298.

📒 Files selected for processing (15)
  • docs/explanations/dapi.md
  • docs/explanations/drive-platform-chain.md
  • docs/explanations/drive-platform-state.md
  • docs/explanations/drive.md
  • docs/explanations/fees.md
  • docs/explanations/identity.md
  • docs/explanations/nft.md
  • docs/explanations/platform-consensus.md
  • docs/explanations/platform-protocol-data-contract.md
  • docs/explanations/platform-protocol-data-trigger.md
  • docs/explanations/platform-protocol-document.md
  • docs/explanations/platform-protocol-state-transition.md
  • docs/explanations/platform-protocol.md
  • docs/explanations/query.md
  • docs/explanations/tokens.md

Comment thread docs/explanations/identity.md Outdated
Comment thread docs/explanations/platform-protocol-state-transition.md Outdated
Comment thread docs/explanations/tokens.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
docs/explanations/tokens.md (1)

293-294: ⚠️ Potential issue | 🟡 Minor

Use exact protocol field naming here (tradeMode) and fix spacing typo.

Please switch “trade mode” to tradeMode (to match schema terminology) and remove the double space in “a trade mode.”

Suggested wording
-Token contracts already expose marketplace rules in their configuration, which declares a  trade mode that governs how tokens may be traded on Platform. The currently supported trade modes are:
+Token contracts already expose marketplace rules in their configuration, which declares a `tradeMode` that governs how tokens may be traded on Platform. The currently supported trade modes are:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/explanations/tokens.md` around lines 293 - 294, Update the documentation
text to use the exact protocol field name `tradeMode` instead of the phrase
“trade mode” and remove the double space in “a  trade mode” so the sentence
reads using `tradeMode` with correct spacing; locate and edit the sentence that
currently says "Token contracts already expose marketplace rules in their
configuration, which declares a  trade mode..." and replace the phrase
accordingly (use `tradeMode` inline where schema terminology is referenced).
docs/explanations/identity.md (1)

67-67: ⚠️ Potential issue | 🟡 Minor

Capitalize “Core blockchain” for consistency.

Line 67 uses “core blockchain” while the rest of the page generally uses “Core” as a proper noun. Please standardize casing here for consistency.

Suggested tweak
-Credits provide the mechanism for paying fees that cover the cost of platform usage. Once a user locks Dash on the core blockchain and proves ownership of the locked value in an identity create or topup state transition, their credit balance increases by that amount. As they perform platform actions, these credits are deducted to pay the associated fees.
+Credits provide the mechanism for paying fees that cover the cost of platform usage. Once a user locks Dash on the Core blockchain and proves ownership of the locked value in an identity create or topup state transition, their credit balance increases by that amount. As they perform platform actions, these credits are deducted to pay the associated fees.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/explanations/identity.md` at line 67, Replace the lowercase phrase "core
blockchain" in the sentence "Once a user locks Dash on the core blockchain and
proves ownership…" with the capitalized form "Core blockchain" to match the rest
of the document's use of "Core" as a proper noun; update that instance in
docs/explanations/identity.md (search for the exact phrase "locks Dash on the
core blockchain") so the sentence reads "locks Dash on the Core blockchain".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/explanations/identity.md`:
- Line 67: Replace the lowercase phrase "core blockchain" in the sentence "Once
a user locks Dash on the core blockchain and proves ownership…" with the
capitalized form "Core blockchain" to match the rest of the document's use of
"Core" as a proper noun; update that instance in docs/explanations/identity.md
(search for the exact phrase "locks Dash on the core blockchain") so the
sentence reads "locks Dash on the Core blockchain".

In `@docs/explanations/tokens.md`:
- Around line 293-294: Update the documentation text to use the exact protocol
field name `tradeMode` instead of the phrase “trade mode” and remove the double
space in “a  trade mode” so the sentence reads using `tradeMode` with correct
spacing; locate and edit the sentence that currently says "Token contracts
already expose marketplace rules in their configuration, which declares a  trade
mode..." and replace the phrase accordingly (use `tradeMode` inline where schema
terminology is referenced).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fbd75614-8145-4756-860c-71c17a260c24

📥 Commits

Reviewing files that changed from the base of the PR and between 3c44298 and 19266b7.

📒 Files selected for processing (3)
  • docs/explanations/identity.md
  • docs/explanations/platform-protocol-state-transition.md
  • docs/explanations/tokens.md
✅ Files skipped from review due to trivial changes (1)
  • docs/explanations/platform-protocol-state-transition.md

@thephez thephez merged commit 4f886b1 into dashpay:3.1.0 Apr 22, 2026
1 check passed
@thephez thephez deleted the chore/v3.1-expl-updates-2 branch April 22, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant