diff --git a/CLAUDE.md b/CLAUDE.md index ad80b25a9..01c6b2abe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -65,6 +65,15 @@ The site uses a hierarchical structure with: - Google Analytics tracking configured - Uses pydata-sphinx-theme with custom CSS overrides +## Editing Guidelines + +When updating documentation values that include GitHub source links: + +- Preserve the existing link markup — do not replace `[value](url#Lnn)` with plain text +- Update the URL if the file path has changed (e.g. directory renames) +- Update the line anchor (`#L`) to match the correct line **in the branch the link points to** +- When available, use the local platform repository checkout to verify line numbers against the correct branch + ## File Patterns - Documentation files: `docs/**/*.md` diff --git a/docs/explanations/dashpay.md b/docs/explanations/dashpay.md index f09a29542..3a37d86d8 100644 --- a/docs/explanations/dashpay.md +++ b/docs/explanations/dashpay.md @@ -75,9 +75,9 @@ used to store private information about other Dash identities. ### Implementation DashPay has many constraints as defined in the [DashPay data -contract](https://github.com/dashpay/platform/blob/master/packages/dashpay-contract/schema/dashpay.schema.json). +contract](https://github.com/dashpay/platform/blob/master/packages/dashpay-contract/schema/v1/dashpay.schema.json). Additionally, the DashPay data triggers defined in -[rs-drive-abci](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay) +[rs-drive-abci](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay) enforce additional validation rules related to the `contactRequest` document. :::{tip} diff --git a/docs/explanations/dpns.md b/docs/explanations/dpns.md index 0e19f74e2..f64bbc886 100644 --- a/docs/explanations/dpns.md +++ b/docs/explanations/dpns.md @@ -40,7 +40,7 @@ In the registration phase, the domain name (e.g. `alice.dash`) is once again sub Since some names may be popular, the registration process includes a voting mechanism to resolve conflicts when multiple identities request the same name. Identities requesting premium names must pay a fee (0.2 DASH) to cover the masternode voting costs. :::{note} -This process only applies to names that meet the following conditions: +This process only applies to valid names that meet the following conditions: * Less than 20 characters long (i.e. "alice", "quantumexplorer") AND * Contain no numbers or only contain the number(s) 0 and/or 1 (i.e. "bob", "carol01") @@ -74,13 +74,14 @@ Locked names cannot currently be re-requested or awarded. This policy may be rev DPNS names have several constraints as defined in the [DPNS data contract](https://github.com/dashpay/platform/blob/master/packages/dpns-contract/schema/v1/dpns-contract-documents.json). The constraints provide compatibility with DNS and protection from homograph attacks: +1. Minimum length - 3 characters 1. Maximum length - 63 characters 1. Usable characters - `0-9`, `-` (hyphen), `a-z`, and `A-Z` (case sensitive) - * Note: Use of `-` as a prefix/suffix to a name is _not_ allowed (e.g. `-name` or `name-`). This constraint is defined by this JSON-Schema [pattern](https://github.com/dashpay/platform/blob/master/packages/dpns-contract/schema/v1/dpns-contract-documents.json#L44) in the DPNS data contract: `"^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$` + * Note: Use of `-` as a prefix/suffix to a name is _not_ allowed (e.g. `-name` or `name-`). This constraint is defined by this JSON-Schema [pattern](https://github.com/dashpay/platform/blob/master/packages/dpns-contract/schema/v1/dpns-contract-documents.json#L44) in the DPNS data contract: `"^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$"` 1. Domain labels are converted to lowercase for case-insensitive uniqueness validation. 1. To mitigate [homograph attacks](https://en.wikipedia.org/wiki/IDN_homograph_attack), `o` is replaced with `0` and `i`/`l` are replaced with `1`. For example, "Alice" is normalized to "a11ce". -Additional validation rules related to the `domain` document are enforced by the DPNS [data triggers](../explanations/platform-protocol-data-trigger.md) defined in [rs-drive-abci](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers). +Additional validation rules related to the `domain` document are enforced by the DPNS [data triggers](../explanations/platform-protocol-data-trigger.md) defined in [rs-drive-abci](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dpns). ```{eval-rst} .. diff --git a/docs/explanations/fees.md b/docs/explanations/fees.md index 1c351c365..6f7e70c9e 100644 --- a/docs/explanations/fees.md +++ b/docs/explanations/fees.md @@ -26,14 +26,13 @@ The current cost schedule is outlined in the table below: | Operation | Cost (credits) | | - | - | -| Permanent storage | 40000 / byte | -| Base processing fee | 100000 | -| Write to storage | 750 / byte | -| Load from storage | 3500 / byte | +| Permanent storage | 27000 / byte | +| Base processing fee | 10000 | +| Write to storage | 400 / byte | +| Load from storage | 20 / byte | | Seek storage | 2000 | -| Query | 75 / byte | -| Load from memory | 20 / byte | -| Blake3 hash function | 400 + 64 / 64-byte block | +| Load from memory | 10 / byte | +| Blake3 hash function | 100 base + 300 / 64-byte block | :::{note} Refer to the [Identity explanation](../explanations/identity.md) section for information regarding how credits are created. @@ -57,17 +56,18 @@ An in-depth look at the Fee Multiplier can be found at **link** In an attempt to minimize Dash Platform's storage requirements, users are incentivized to remove data that they no longer want to be stored in the Dash Platform state for a refund. Data storage fees are distributed to masternodes over the data's lifetime which is 50 years for permanent storage. Therefore, at any time before the data's fees are entirely distributed, there will be fees remaining which can be refunded to the user if they decide to delete the data. -## User Tip +## User Fee Increase -Platform supports a user tip component that can be used to incentivize inclusion of a state -transition in the next block, especially during periods of high traffic. +Platform supports a user fee increase that can be used to incentivize inclusion of a state +transition in the next block, especially during periods of high traffic. This is expressed as an +integer percentage increase applied to the processing fee. ## Formula The high level formula for a state transition's fee is: ```text - fee = storageFee + processingFee - storageRefund + userTip + fee = storageFee + processingFee + (processingFee * userFeeIncrease / 100) - storageRefund ```