mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 22:45:40 +00:00
PRDoc new schema (#1946)
## Overview This PR brings in the new version of prdoc v0.0.6 and allows: - local schema - local config - local template It also fixes the existing prdoc files to match the new schema. ## todo - [x] add a brief doc/tldr to help contributors get started - [x] test CI - [x] finalize schema - [x] publish the next `prdoc` cli version (v0.0.7 or above) --------- Co-authored-by: Egor_P <egor@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
|
||||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
|
||||
|
||||
title: ...
|
||||
|
||||
doc:
|
||||
- audience: Node Dev
|
||||
description: |
|
||||
...
|
||||
|
||||
crates: [ ]
|
||||
+5
-10
@@ -1,17 +1,12 @@
|
||||
title: Removed deprecated `Balances::transfer` and `Balances::set_balance_deprecated` functions.
|
||||
|
||||
doc:
|
||||
- audience: Builder
|
||||
description: The Balances pallet's dispatchables `set_balance_deprecated` and `transfer` were deprecated in [paritytech/substrate#12951](https://github.com/paritytech/substrate/pull/12951) and have now been removed.
|
||||
notes:
|
||||
- audience: Runtime User
|
||||
description: |
|
||||
The Balances pallet's dispatchables `set_balance_deprecated` and `transfer` were deprecated in [paritytech/substrate#12951](https://github.com/paritytech/substrate/pull/12951) and have now been removed.
|
||||
|
||||
notes:
|
||||
- Use `set_balance_deprecated` instead `force_set_balance` and `transfer_allow_death` instead of `transfer`.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime: []
|
||||
|
||||
crates:
|
||||
- name: pallet-balances
|
||||
|
||||
host_functions: []
|
||||
|
||||
+2
-9
@@ -4,17 +4,10 @@
|
||||
title: Introduce XcmFeesToAccount fee manager
|
||||
|
||||
doc:
|
||||
- audience: Builder
|
||||
- audience: Runtime User
|
||||
description: |
|
||||
Now all XCM sending, unless done by the system for the system, will be charged delivery fees.
|
||||
All runtimes are now configured to send these delivery fees to a treasury account.
|
||||
The fee formula is `delivery_fee_factor * (base_fee + encoded_msg_len * per_byte_fee)`.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime: []
|
||||
|
||||
crates: []
|
||||
|
||||
host_functions: []
|
||||
crates: [ ]
|
||||
|
||||
+7
-8
@@ -4,19 +4,18 @@
|
||||
title: Fix for Reward Deficit in the pool
|
||||
|
||||
doc:
|
||||
- audience: Core Dev
|
||||
description: Instead of fragile calculation of current balance by looking at free balance - ED, Nomination Pool now freezes ED in the pool reward account to restrict an account from going below minimum balance. This also has a nice side effect that if ED changes, we know how much is the imbalance in ED frozen in the pool and the current required ED. A pool operator can diligently top up the pool with the deficit in ED or vice versa, withdraw the excess they transferred to the pool.
|
||||
notes:
|
||||
- audience: Runtime Dev
|
||||
description: |
|
||||
Instead of fragile calculation of current balance by looking at free balance - ED, Nomination Pool now freezes ED in the pool reward account to restrict an account from going below minimum balance. This also has a nice side effect that if ED changes, we know how much is the imbalance in ED frozen in the pool and the current required ED. A pool operator can diligently top up the pool with the deficit in ED or vice versa, withdraw the excess they transferred to the pool.
|
||||
|
||||
notes:
|
||||
- Introduces new call `adjust_pool_deposit` that allows to top up the deficit or withdraw the excess deposit for the pool.
|
||||
- Switch to using Fungible trait from Currency trait.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime:
|
||||
- { pallet: "pallet-nomination-pools", description: "One time migration of freezing ED from each of the existing pools."}
|
||||
- reference: pallet-nomination-pools
|
||||
description: One time migration of freezing ED from each of the existing pools.
|
||||
|
||||
crates:
|
||||
- name: pallet-nomination-pools
|
||||
|
||||
host_functions: []
|
||||
@@ -2,18 +2,11 @@
|
||||
title: PRdoc check
|
||||
|
||||
doc:
|
||||
- audience: Core Dev
|
||||
- audience: Node Dev
|
||||
description: |
|
||||
This PRdoc is an **example**.
|
||||
|
||||
This PR brings support and automated checks for documentation in the form of a
|
||||
[`prdoc`](https://github.com/paritytech/prdoc/) file.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime: []
|
||||
|
||||
crates: []
|
||||
|
||||
host_functions: []
|
||||
crates: [ ]
|
||||
|
||||
+2
-9
@@ -1,16 +1,9 @@
|
||||
title: FRAME pallets warning for unchecked weight witness
|
||||
|
||||
doc:
|
||||
- audience: Core Dev
|
||||
- audience: Runtime Dev
|
||||
description: |
|
||||
FRAME pallets now emit a warning when a call uses a function argument that starts with an underscore in its weight declaration.
|
||||
|
||||
migrations:
|
||||
db: [ ]
|
||||
runtime: [ ]
|
||||
|
||||
host_functions: []
|
||||
|
||||
crates:
|
||||
- name: "frame-support-procedural"
|
||||
semver: minor
|
||||
- name: frame-support-procedural
|
||||
|
||||
+3
-9
@@ -1,15 +1,9 @@
|
||||
title: Message Queue use proper overweight limit
|
||||
|
||||
doc:
|
||||
- audience: Core Dev
|
||||
- audience: Node Dev
|
||||
description: |
|
||||
Changed the overweight cutoff limit from the full `Config::ServiceWeight` to a lower value that is calculated based on the weight of the functions being called.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime: []
|
||||
|
||||
crates: ["pallet-message-queue", patch]
|
||||
|
||||
host_functions: []
|
||||
crates:
|
||||
- name: pallet-message-queue
|
||||
|
||||
@@ -7,13 +7,6 @@ doc:
|
||||
If experiencing stability issues caused by BEEFY, it can be disabled using `--no-beefy` flag.
|
||||
BEEFY doesn't (yet) support warp sync. So, attempting to Warp sync as a validator will throw an error.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime: []
|
||||
|
||||
crates:
|
||||
- name: polkadot-cli
|
||||
- name: polkadot-service
|
||||
|
||||
host_functions: []
|
||||
|
||||
+3
-8
@@ -1,19 +1,14 @@
|
||||
title: Fix para-scheduler migration
|
||||
|
||||
doc:
|
||||
- audience: Core Dev
|
||||
- audience: Runtime Dev
|
||||
description: |
|
||||
Changing the `MigrateToV1` migration in the `ParachainScheduler` pallet to be truly idempotent. It is achieved by wrapping it in a `VersionedMigration`.
|
||||
|
||||
migrations:
|
||||
db: []
|
||||
|
||||
runtime:
|
||||
- pallet: "ParachainScheduler"
|
||||
- reference: ParachainScheduler
|
||||
description: Non-critical fixup for `MigrateToV1`.
|
||||
|
||||
crates:
|
||||
- name: "polkadot-runtime-parachains"
|
||||
semver: patch
|
||||
|
||||
host_functions: []
|
||||
- name: polkadot-runtime-parachains
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
|
||||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
|
||||
|
||||
title: New PRDoc Schema
|
||||
|
||||
doc:
|
||||
- audience: Node Dev
|
||||
description: &desc |
|
||||
The new version of prdoc and the new schema is activated in this PR.
|
||||
|
||||
- audience: Runtime Dev
|
||||
description: *desc
|
||||
|
||||
crates: []
|
||||
@@ -0,0 +1,212 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/paritytech/prdoc/master/prdoc_schema_user.json",
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 0,
|
||||
"patch": 0,
|
||||
"timestamp": 20230817152351
|
||||
},
|
||||
"title": "Polkadot SDK PRDoc Schema",
|
||||
"description": "JSON Schema definition for the Polkadot SDK PR documentation",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"title": {
|
||||
"title": "Title of the change",
|
||||
"type": "string",
|
||||
"description": "Title for the PR. This is what will show up in the release notes.\nif needed, you may provide a different title override for each audience in the `doc` property."
|
||||
},
|
||||
|
||||
"doc": {
|
||||
"type": "array",
|
||||
"title": "Documentation adapted to the audience(s)",
|
||||
"description": "Description of the PR. Provide a description for each relevant audience.\nSee the `audience` property for more documentation about audiences",
|
||||
"items": {
|
||||
"$ref": "#/$defs/doc"
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
|
||||
"crates": {
|
||||
"title": "Crates",
|
||||
"description": "You have the option to provide a hint about the crates that have noticeable changes.\n This is used during the crate publishing to crates.io and to help users understand the impact of the changes introduced in your PR.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/crate"
|
||||
}
|
||||
},
|
||||
|
||||
"migrations": {
|
||||
"title": "Migrations (DB & Runtime)",
|
||||
"description": "It is important for users to be aware of migrations.\nMake sure to mention any migrations in the appropriate sub-properties:\n- db\n- runtime",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"db": {
|
||||
"type": "array",
|
||||
"nullable": false,
|
||||
"title": "Database Migration",
|
||||
"description": "List of the Database Migrations or empty array: []",
|
||||
"items": {
|
||||
"$ref": "#/$defs/migration_db"
|
||||
},
|
||||
"minItems": 0,
|
||||
"required": [
|
||||
"name",
|
||||
"description"
|
||||
]
|
||||
},
|
||||
"runtime": {
|
||||
"type": "array",
|
||||
"title": "Runtime Migration",
|
||||
"nullable": false,
|
||||
"description": "List of the Runtime Migrations or empty array: []",
|
||||
"minItems": 0,
|
||||
"items": {
|
||||
"$ref": "#/$defs/migration_runtime"
|
||||
},
|
||||
"required": [
|
||||
"db",
|
||||
"runtime"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"host_functions": {
|
||||
"title": "Host Functions",
|
||||
"description": "List of the host functions involved in this PR.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/host_function"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"doc",
|
||||
"crates"
|
||||
],
|
||||
"$defs": {
|
||||
"audience": {
|
||||
"description": "You may pick one or more audiences and address those users with appropriate documentation, information and warning related to the PR.",
|
||||
"oneOf": [
|
||||
{"const": "Node Dev",
|
||||
"title": "Node Dev",
|
||||
"description": "Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself."},
|
||||
|
||||
{"const": "Runtime Dev",
|
||||
"title": "Runtime Dev",
|
||||
"description": "All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM), not the meta-protocol (client)."},
|
||||
|
||||
{"const": "Node Operator",
|
||||
"title": "Node Operator",
|
||||
"description": "Those who don't write any code and only run code."},
|
||||
|
||||
{"const": "Runtime User",
|
||||
"title": "Runtime User",
|
||||
"description": "Anyone using the runtime. This can be a token holder or a dev writing a front end for a chain."}
|
||||
]
|
||||
},
|
||||
"crate": {
|
||||
"type": "object",
|
||||
"description": "You have the option here to provide a hint about a crate that has changed to help with the publishing of crates.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"migration_db": {
|
||||
"type": "object",
|
||||
"description": "This property allows the documentation of database migrations.",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"description"
|
||||
]
|
||||
},
|
||||
"migration_runtime": {
|
||||
"type": "object",
|
||||
"description": "This property allows the documentation of runtime migrations.",
|
||||
"properties": {
|
||||
"reference": {
|
||||
"title": "Migration reference",
|
||||
"description": "Reference to the runtime migration",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"description"
|
||||
]
|
||||
},
|
||||
"doc": {
|
||||
"type": "object",
|
||||
"description": "You have the the option to provide different description of your PR for different audiences.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"audience": {
|
||||
"description": "The selected audience",
|
||||
"$ref": "#/$defs/audience"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "Title for the audience",
|
||||
"description": "Optional title override for the PR and for the current audience"
|
||||
},
|
||||
"description": {
|
||||
"title": "Description for the audience",
|
||||
"description": "Description of the change",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"array_of_strings": {
|
||||
"description": "An array of strings that can be empty",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"host_function": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"title": "Host Functions",
|
||||
"description": "List of host functions and their descriptions",
|
||||
"properties": {
|
||||
"name": {
|
||||
"title": "Host function name",
|
||||
"description": "Name or identifier to find the host function in the codebase",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"title": "Host function description",
|
||||
"description": "Short description of the host function",
|
||||
"type": "string"
|
||||
},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"description"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user