Skip to content

docs(explanations): audit updatesfor v3.1#143

Merged
thephez merged 6 commits intodashpay:3.1.0from
thephez:chore/v3.1-expl-updates
Apr 16, 2026
Merged

docs(explanations): audit updatesfor v3.1#143
thephez merged 6 commits intodashpay:3.1.0from
thephez:chore/v3.1-expl-updates

Conversation

@thephez
Copy link
Copy Markdown
Collaborator

@thephez thephez commented Apr 15, 2026

Summary

Audit and correct the docs/explanations/ section against the platform v3.1-dev source code.

Changes by file

  • fees.md - Corrected fee cost table values (storage, processing, hashing); renamed "User Tip" to "User Fee Increase" with multiplier formula; removed stale Query row
  • identity.md - Removed outdated note claiming credit withdrawals are a future feature
  • platform-protocol-document.md - Fixed $dataContract -> $dataContractId; added 7 missing base fields; updated DPNS fields (records.identity, saltedDomainHash type)
  • platform-protocol-state-transition.md - Added 6 address-based state transition types (9-14)
  • platform-protocol-data-trigger.md - Fixed documents_batch -> batch in all links; corrected document column; added TRANSFER/PURCHASE/UPDATE_PRICE trigger rows
  • platform-protocol.md - Updated state transition overview to reflect header/payload/signature structure
  • tokens.md - Updated source links to v3.1-dev; added Description/Marketplace rules rows; corrected group power max (65535); clarified Keep history default
  • nft.md - Renamed "System Only" to "No Creation Allowed"
  • dashpay.md - Fixed schema link path (added v1/); fixed data triggers link path
  • dpns.md - Added 3-character minimum constraint; fixed closing backtick; fixed data triggers link path
  • platform-consensus.md - No changes (existing link confirmed working)
  • CLAUDE.md - Added editing guidelines for preserving source links

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

Summary by CodeRabbit

  • Documentation
    • Added editing guidelines for updating documentation source links
    • Corrected example/reference links for data triggers and contracts
    • Enhanced DPNS rules: apply only to valid names and minimum length 3
    • Revised fee schedule values and processing-fee computation
    • Clarified identity credit withdrawal is supported with daily limits
    • Replaced “System Only” with “No Creation Allowed” for NFT/creation restriction
    • Added new state transition payload types for address operations
    • Updated base document fields and added timestamp/block-height fields
    • Updated token parameter descriptions and group member limits

thephez and others added 5 commits April 15, 2026 12:26
- fees: update cost table to current source constants (storage, processing,
  hashing); remove stale Query row
- identity: replace outdated "future feature" note with accurate statement
  that credit withdrawals are live
- platform-protocol-document: fix $dataContractId field name, add 7 missing
  base fields (transfer timestamps and block heights), update DPNS records
  field from dashUniqueIdentityId/dashAliasIdentityId to identity
- platform-protocol-state-transition: add address-based state transition
  types 9-14 with links to protocol-ref/address-system.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- fees: rename User Tip to User Fee Increase; update formula to use feeMultiplier
- nft: rename System Only restriction to No Creation Allowed
- data-trigger: fix document column (All Document Types -> domain); update links from documents_batch to batch
- tokens: correct group member max power parenthetical (65536 -> 65535)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- dashpay: fix schema link path (add v1/ subdirectory) and data triggers link (documents_batch -> batch)
- dpns: add 3-character minimum length constraint; fix closing backtick on pattern; fix data triggers link path
- data-trigger: add TRANSFER, PURCHASE, UPDATE_PRICE reject trigger rows for DPNS domain
- tokens: update source links from v2.0.1 to v3.1-dev with correct paths and line anchors; add Description and Marketplace rules rows; clarify Keep history default

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oad types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d795206f-3301-426b-8845-edb9424eb418

📥 Commits

Reviewing files that changed from the base of the PR and between 6d00eef and 977f64f.

📒 Files selected for processing (4)
  • docs/explanations/fees.md
  • docs/explanations/platform-protocol-data-trigger.md
  • docs/protocol-ref/data-contract-document.md
  • docs/reference/data-contracts.md
✅ Files skipped from review due to trivial changes (2)
  • docs/reference/data-contracts.md
  • docs/protocol-ref/data-contract-document.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/explanations/platform-protocol-data-trigger.md

📝 Walkthrough

Walkthrough

Documentation-only PR updating multiple Dash Platform spec files: link/path corrections, fee formula and values, schema field renames/additions, new state transition payload type entries, and several constraint/terminology adjustments.

Changes

Cohort / File(s) Summary
Documentation Guidelines
CLAUDE.md
Added "Editing Guidelines" specifying rules for preserving markdown link markup, updating URLs when file paths change, and verifying #L line anchors.
Link & Trigger Path Corrections
docs/explanations/dashpay.md, docs/explanations/platform-protocol-data-trigger.md, docs/explanations/dpns.md
Adjusted example links/paths to new repository locations (e.g., schema/v1/..., state_transitions/batch/data_triggers/...) and refined referenced trigger paths.
Platform Protocol Schema & Documents
docs/explanations/platform-protocol-document.md, docs/explanations/platform-protocol.md, docs/explanations/platform-protocol-state-transition.md, docs/explanations/platform-protocol-data-trigger.md
Replaced $dataContract with $dataContractId (32 bytes); added transfer timestamp and multiple created/updated/transferred block-height fields (including core block-height variants); expanded document payload type table with payload IDs 9–14; clarified state transition structure (header, payload, signature).
DPNS & Domain Constraints
docs/explanations/dpns.md, docs/explanations/platform-protocol-document.md
Restricted voting/conflict-resolution applicability to valid names, added minimum DPNS name length = 3, changed preorder saltedDomainHash type to array (32 bytes), and adjusted domain.records identity field structure.
Fees & Cost Model
docs/explanations/fees.md
Lowered several documented fee values (permanent storage, base processing, storage write/load, Blake3 hashing); changed Blake3 formula to 100 base + 300 / 64-byte block; removed "Query" line; replaced + userTip with a percentage-based processing fee uplift term.
Identity & Credit Withdrawals
docs/explanations/identity.md
Replaced statement prohibiting credit-to-Dash conversion with guidance that credits can be withdrawn to Dash via identity credit withdrawal, subject to a daily network-wide limit.
NFT & Token Configurations
docs/explanations/nft.md, docs/reference/data-contracts.md, docs/protocol-ref/data-contract-document.md, docs/explanations/tokens.md
Renamed creationRestrictionMode value 2 description from "No creation (System Only)" to "No Creation Allowed"; updated NFT restriction wording; added token config fields "Description" and "Marketplace rules", adjusted defaults and a group-member power value.
Minor / Miscellaneous Docs
docs/explanations/dashpay.md, docs/explanations/...
Various minor text/format fixes and small wording adjustments across explanation pages (link targets, notes, examples).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🐰 I nibbled through links with care,
Fields and fees found fresh spring air,
Payloads numbered, anchors tuned,
Docs now hop in tidy tune,
A tiny rabbit's celebratory share.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(explanations): audit updatesfor v3.1' refers to auditing documentation updates for v3.1, which matches the PR's objective of auditing and correcting docs/explanations against platform v3.1-dev source.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

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

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/explanations/fees.md (1)

41-49: ⚠️ Potential issue | 🟠 Major

Clarify Fee Multiplier scope in description versus formula.

Line 43 states "All fees are multiplied by the Fee Multiplier," but the formula on line 70 applies feeMultiplier only to processingFee:

fee = storageFee + processingFee * feeMultiplier - storageRefund

Update line 43 to clarify scope. If the multiplier applies only to processing fees, change "All fees" to "Processing fees." If it applies to all fees, update the formula to:

fee = (storageFee + processingFee - storageRefund) * feeMultiplier
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/explanations/fees.md` around lines 41 - 49, The description currently
says "All fees are multiplied by the Fee Multiplier" but the implemented formula
uses feeMultiplier only on processingFee (symbols: feeMultiplier, processingFee,
storageFee, storageRefund); update the docs to be consistent: either change the
prose to "Processing fees are multiplied by the Fee Multiplier" if the
multiplier only applies to processingFee, or change the displayed formula to
apply feeMultiplier to the entire sum (fee = (storageFee + processingFee -
storageRefund) * feeMultiplier) if the multiplier should apply to all
components; make the change near the "Fee Multiplier" section so prose and the
formula match.
🧹 Nitpick comments (2)
docs/explanations/platform-protocol-document.md (1)

80-82: Consider making $dataContractId example format explicit.

The table defines $dataContractId as a 32-byte identifier, but the example shows an object placeholder. A string/byte-encoded sample (or a short note explaining the placeholder) would avoid ambiguity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/explanations/platform-protocol-document.md` around lines 80 - 82, The
example for "$dataContractId" is ambiguous; replace the object placeholder with
an explicit 32-byte identifier sample (e.g., hex/base64 string) or add a short
clarifying note that the placeholder represents a 32-byte encoded ID. Update the
example in the $dataContractId entry so it shows a concrete string value (or
indicates the encoding used) and mention the encoding/format (hex, base64, or
raw bytes) to remove ambiguity for consumers of the spec.
docs/explanations/fees.md (1)

67-67: Optional: Hyphenate compound adjective.

Consider hyphenating "high level" to "high-level" when it modifies "formula":

-The high level formula for a state transition's fee is:
+The high-level formula for a state transition's fee is:

This follows standard English grammar for compound adjectives that precede nouns.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/explanations/fees.md` at line 67, Update the sentence "The high level
formula for a state transition's fee is:" to hyphenate the compound adjective so
it reads "The high-level formula for a state transition's fee is:"; locate and
replace the exact phrase shown in the diff to ensure the compound adjective
preceding "formula" is correctly hyphenated.
🤖 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/fees.md`:
- Around line 59-70: The formula omits the per-transaction userFeeIncrease
field; update the formula that defines fee (currently showing storageFee,
processingFee and feeMultiplier) to include userFeeIncrease as an additive
prioritization fee: make it explicit that fee = storageFee + (processingFee *
feeMultiplier) + userFeeIncrease - storageRefund and add a short note next to
the symbols (storageFee, processingFee, feeMultiplier, userFeeIncrease,
storageRefund) stating that userFeeIncrease is an extra per-transaction fee used
when the mempool is full.

In `@docs/explanations/nft.md`:
- Line 43: Update the enum label for creationRestrictionMode value 2 so the
protocol reference uses the same wording as the explanation docs: change the
label currently "No creation (System Only)" to "No Creation Allowed" for
creationRestrictionMode=2 (the enum entry for value 2) so both docs use
identical terminology.

In `@docs/explanations/platform-protocol-data-trigger.md`:
- Line 21: Update the intro sentence and related trigger descriptions so they
consistently scope actions to the DPNS `domain` document rather than "All DPNS
document types": replace the sentence starting with "All DPNS document types
have constraints..." with wording that explicitly limits replacing, deleting,
transferring, purchasing, and price updates to the `domain` document, and revise
each trigger description referencing DPNS triggers to mention `domain`-scoped
constraints only (ensure DPNS and `domain` wording is consistent across the
intro and the trigger description block).

---

Outside diff comments:
In `@docs/explanations/fees.md`:
- Around line 41-49: The description currently says "All fees are multiplied by
the Fee Multiplier" but the implemented formula uses feeMultiplier only on
processingFee (symbols: feeMultiplier, processingFee, storageFee,
storageRefund); update the docs to be consistent: either change the prose to
"Processing fees are multiplied by the Fee Multiplier" if the multiplier only
applies to processingFee, or change the displayed formula to apply feeMultiplier
to the entire sum (fee = (storageFee + processingFee - storageRefund) *
feeMultiplier) if the multiplier should apply to all components; make the change
near the "Fee Multiplier" section so prose and the formula match.

---

Nitpick comments:
In `@docs/explanations/fees.md`:
- Line 67: Update the sentence "The high level formula for a state transition's
fee is:" to hyphenate the compound adjective so it reads "The high-level formula
for a state transition's fee is:"; locate and replace the exact phrase shown in
the diff to ensure the compound adjective preceding "formula" is correctly
hyphenated.

In `@docs/explanations/platform-protocol-document.md`:
- Around line 80-82: The example for "$dataContractId" is ambiguous; replace the
object placeholder with an explicit 32-byte identifier sample (e.g., hex/base64
string) or add a short clarifying note that the placeholder represents a 32-byte
encoded ID. Update the example in the $dataContractId entry so it shows a
concrete string value (or indicates the encoding used) and mention the
encoding/format (hex, base64, or raw bytes) to remove ambiguity for consumers of
the spec.
🪄 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: c1137270-0383-4cd9-87f9-a1f47c14f79d

📥 Commits

Reviewing files that changed from the base of the PR and between 58a1bd2 and 6d00eef.

📒 Files selected for processing (11)
  • CLAUDE.md
  • docs/explanations/dashpay.md
  • docs/explanations/dpns.md
  • docs/explanations/fees.md
  • docs/explanations/identity.md
  • docs/explanations/nft.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/tokens.md

Comment thread docs/explanations/fees.md Outdated
Comment thread docs/explanations/nft.md
Comment thread docs/explanations/platform-protocol-data-trigger.md Outdated
@thephez thephez merged commit a284662 into dashpay:3.1.0 Apr 16, 2026
1 check passed
@thephez thephez deleted the chore/v3.1-expl-updates branch April 16, 2026 19:19
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