- Jul 29, 2024
-
-
Przemek Rzad authored
An attempt to improve [the docs](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html) by applying various corrections: - grammar/stylistics, - formatting, - broken links, - broken markdown table, - outdated vscode setting name, - typos, - consistency, - etc. Part of https://github.com/paritytech/eng-automation/issues/10
-
- Jul 22, 2024
-
-
Afanti authored
The word is duplicated in the document and use this commit to remove them.
-
- Jul 17, 2024
-
-
Alin Dima authored
Resolves https://github.com/paritytech/polkadot-sdk/issues/4468 Gives instructions on how to enable elastic scaling MVP to parachain teams. Still a draft because it depends on further changes we make to the slot-based collator: https://github.com/paritytech/polkadot-sdk/pull/4097 Parachains cannot use this yet because the collator was not released and no relay chain network has been configured for elastic scaling yet
-
- Jul 15, 2024
-
-
Jun Jiang authored
This should remove nearly all usage of `sp-std` except: - bridge and bridge-hubs - a few of frames re-export `sp-std`, keep them for now - there is a usage of `sp_std::Writer`, I don't have an idea how to move it Please review proc-macro carefully. I'm not sure I'm doing it the right way. Note: need `/bot fmt` --------- Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <>
-
- Jul 10, 2024
-
-
Kian Paimani authored
Explains one of the annoying parts of FRAME storage that we have seen multiple times in PBA everyone gets stuck on. I have not updated the other two templates for now, and only reflected it in the parachain template. That can happen in a follow-up. - [x] Update possible answers in SE about the same topic. --------- Co-authored-by:
Serban Iorga <serban@parity.io> Co-authored-by: command-bot <>
-
- Jul 03, 2024
-
-
Kian Paimani authored
Co-authored-by:
Bastian Köcher <git@kchr.de>
-
- Jun 28, 2024
-
-
Radha authored
Update the instructions to work with the latest parachain template on Polkadot SDK --------- Co-authored-by:
kianenigma <kian@parity.io> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com>
-
- Jun 27, 2024
-
-
Bastian Köcher authored
Co-authored-by:
gupnik <mail.guptanikhil@gmail.com>
-
- Jun 24, 2024
-
-
Oliver Tale-Yazdi authored
After preparing in https://github.com/paritytech/polkadot-sdk/pull/4633, we can lift also all internal dependencies up to the workspace. This does not actually change anything, but uses `workspace = true` for all dependencies. You can check it with: ```bash git checkout -q $(git merge-base oty-lift-all-deps origin/master) cargo tree -e features > master.out git checkout -q oty-lift-all-deps cargo tree -e features > new.out diff master.out new.out ``` It did not yet lift 100% of dependencies, some inside of `target.*` or some that had conflicting aliases introduced recently. But i will do these together in a follow-up with CI checks. Can be reproduced with [zepter](https://github.com/ggwpez/zepter/): `zepter transpose d lift-to-workspace "regex:.*" --version-resolver highest --skip-package "polkadot-sdk" --ignore-errors --fix`. --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
- Jun 17, 2024
-
-
hattizai authored
remove unnecessary words in comments.
-
Kian Paimani authored
-
- Jun 13, 2024
-
-
Kian Paimani authored
After using this tutorial in PBA, there was a few areas to improve it. Moreover, I have: - Improve `your_first_pallet`, link it in README, improve the parent `guide` section. - Updated the templates page, in light of recent efforts related to in https://github.com/paritytech/polkadot-sdk/issues/3155 - Added small ref docs about metadata, completed the one about native runtime, added one about host functions. - Remove a lot of unfinished stuff from sdk-docs - update diagram for `Hooks`
-
- Jun 07, 2024
-
-
Kian Paimani authored
Thanks for @xlc for the original seed info, I've just fixed it up a bit and added example links. I've moved the comparison between eth-rpc-api and frontier outside, as it is opinionation. I think the content there was good but should live in the README of the corresponding repos. No strong opinion, happy either way. --------- Co-authored-by:
Bryan Chen <xlchen1291@gmail.com> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Gonçalo Pestana <g6pestana@gmail.com> Co-authored-by: command-bot <>
-
- Jun 05, 2024
-
-
Oliver Tale-Yazdi authored
Inherited workspace dependencies cannot be renamed by the crate using them (see [1](https://github.com/rust-lang/cargo/issues/12546), [2](https://stackoverflow.com/questions/76792343/can-inherited-dependencies-in-rust-be-aliased-in-the-cargo-toml-file)). Since we want to use inherited workspace dependencies everywhere, we first need to unify all aliases that we use for a dependency throughout the workspace. The umbrella crate is currently excluded from this procedure, since it should be able to export the crates by their original name without much hassle. For example: one crate may alias `parity-scale-codec` to `codec`, while another crate does not alias it at all. After this change, all crates have to use `codec` as name. The problematic combinations were: - conflicting aliases: most crates aliases as `A` but some use `B`. - missing alias: most of the crates alias a dep but some dont. - superfluous alias: most crates dont alias a dep but some do. The script that i used first determines whether most crates opted to alias a dependency or not. From that info it decides whether to use an alias or not. If it decided to use an alias, the most common one is used everywhere. To reproduce, i used [this](https://github.com/ggwpez/substrate-scripts/blob/master/uniform-crate-alias.py) python script in combination with [this](https://github.com/ggwpez/zepter/blob/38ad10585fe98a5a86c1d2369738bc763a77057b/renames.json) error output from Zepter. --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Bastian Köcher <git@kchr.de>
-
Michal Kucharczyk authored
some minor text fixes.
-
- Jun 04, 2024
-
-
Michal Kucharczyk authored
Added reference doc about: - the pallet genesis config and genesis build, - runtime `genesis-builder` API, - presets, - interacting with the `chain-spec-builder` tool I've added [minimal runtime](https://github.com/paritytech/polkadot-sdk/tree/mku-chain-spec-guide/docs/sdk/src/reference_docs/chain_spec_runtime) to demonstrate above topics. I also sneaked in some little improvement to `chain-spec-builder` which allows to parse output of the `list-presets` command. --------- Co-authored-by:
Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com>
-
- May 31, 2024
-
-
Kian Paimani authored
Co-authored-by:
Bastian Köcher <git@kchr.de>
-
- May 27, 2024
-
-
omahs authored
chore: fix typos
-
- May 24, 2024
-
-
Oliver Tale-Yazdi authored
# Umbrella Crate The Polkadot-SDK "umbrella" is a crate that re-exports all other published crates. This makes it possible to have a very small `Cargo.toml` file that only has one dependency, the umbrella crate. This helps with selecting the right combination of crate versions, since otherwise 3rd party tools are needed to select a compatible set of versions. ## Features The umbrella crate supports no-std builds and can therefore be used in the runtime and node. There are two main features: `runtime` and `node`. The `runtime` feature enables all `no-std` crates, while the `node` feature enables all `std` crates. It should be used like any other crate in the repo, with `default-features = false`. For more fine-grained control, additionally, each crate can be enabled selectively. The umbrella exposes one feature per dependency. For example, if you only want to use the `frame-support` crate, you can enable the `frame-support` feature. The umbrella exposes a few more general features: - `tuples-96`: Needs to be enabled for runtimes that have more than 64 pallets. - `serde`: Specifically enable `serde` en/decoding support. - `experimental`: Experimental enable experimental features - should not yet used in production. - `with-tracing`: Enable tracing support. - `try-runtime`, `runtime-benchmarks` and `std`: These follow the standard conventions. - `runtime`: As described above, enable all `no-std` crates. - `node`: As described above, enable all `std` crates. - There does *not* exist a dedicated docs feature. To generate docs, enable the `runtime` and `node` feature. For docs.rs the manifest contains specific configuration to make it show up all re-exports. There is a specific `zepter` check in place to ensure that the features of the umbrella are correctly configured. This check is run in CI and locally when running `zepter`. ## Generation The umbrella crate needs to be updated every time when a new crate is added or removed from the workspace. It is checked in CI by calling its generation script. The generation script is located in `./scripts/generate-umbrella.py` and needs dependency `cargo_workspace`. Example: `python3 scripts/generate-umbrella.py --sdk . --version 1.9.0` ## Usage > Note: You can see a live example in the `staging-node-cli` and `kitchensink-runtime` crates. The umbrella crate can be added to your runtime crate like this: `polkadot-sdk = { path = "../../../../umbrella", features = ["runtime"], default-features = false}` or for a node: `polkadot-sdk = { path = "../../../../umbrella", features = ["node"], default-features = false }` In the code, it is then possible to bring all dependencies into scope via: `use polkadot_sdk::*;` ### Known Issues The only known issue so far is the fact that the `use` statement brings the dependencies only into the outer module scope - not the global crate scope. For example, the following code would need to be adjusted: ```rust use polkadot_sdk::*; mod foo { // This does sadly not compile: frame_support::parameter_types! { } // Instead, we need to do this (or add an equivalent `use` statement): polkadot_sdk::frame_support::parameter_types! { } } ``` Apart from this, no issues are known. There could be some bugs with how macros locate their own re-exports. Please compile issues that arise from using this crate. ## Dependencies The umbrella crate re-exports all published crates, with a few exceptions: - Runtime crates like `rococo-runtime` etc are not exported. This otherwise leads to very weird compile errors and should not be needed anyway. - Example and fuzzing crates are not exported. This is currently detected by checking the name of the crate for these magic words. In the future, it will utilize custom metadata, as it is done in the `rococo-runtime` crate. - The umbrella crate itself. Should be obvious :) ## Follow Ups - [ ] Re-writing the generator in Rust - the python script is at its limit. - [ ] Using custom metadata to exclude some crates instead of filtering by names. - [ ] Finding a way to setting the version properly. Currently its locked in the CI script. --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
- May 23, 2024
-
-
Francisco Aguirre authored
The XCM docs were pretty much moved to the new rust docs format in https://github.com/paritytech/polkadot-sdk/pull/2633, with the addition of the XCM cookbook, which I plan to add more examples to shortly. These docs were not mentioned in the polkadot-sdk rust docs, this PR just mentions them there, so people can actually find them.
-
- May 22, 2024
-
-
Kian Paimani authored
..and other high level docs. # Polling Please vote in the reactions of this PR -
I agree to replace the website of this repo to https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html - Keep it as polkadot.network - Different opinion --------- Co-authored-by:Bastian Köcher <git@kchr.de>
-
Bastian Köcher authored
This implements the `CheckMetadataHash` extension as described in [RFC78](https://polkadot-fellows.github.io/RFCs/approved/0078-merkleized-metadata.html). Besides the signed extension, the `substrate-wasm-builder` is extended to support generating the metadata-hash. Closes: https://github.com/paritytech/polkadot-sdk/issues/291 --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by:
Liam Aharon <liam.aharon@hotmail.com> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com>
-
s0me0ne-unkn0wn authored
Closes #4366
-
- May 15, 2024
-
-
Alexandru Gheorghe authored
This bump of versions: https://github.com/paritytech/polkadot-sdk/pull/4409/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87eR11936 reintroduced a dependency to proc-macro-crate 2.0.0 which is suffering from: https://github.com/bkchr/proc-macro-crate/pull/42 this, so bump parity-scale-codec to a newer version to eliminate the bad proc-macro-crate 2.0.0 dependency. --------- Signed-off-by:
Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: command-bot <>
-
- May 02, 2024
-
-
Sebastian Kunert authored
This adds a small guide on how to prepare your parachain for pov-reclaim usage.
-
- Apr 18, 2024
-
-
Alexander Samusev authored
cc https://github.com/paritytech/ci_cd/issues/974 --------- Co-authored-by: command-bot <> Co-authored-by:
Bastian Köcher <info@kchr.de>
-
- Apr 16, 2024
-
-
Oliver Tale-Yazdi authored
Updating the prdoc doc file to be a bit more useful for new contributors and adding a SemVer section. --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
- Apr 08, 2024
-
-
HongKuang authored
Signed-off-by:
hongkuang <liurenhong@outlook.com>
-
- Apr 05, 2024
-
-
Oliver Tale-Yazdi authored
Closes https://github.com/paritytech/polkadot-sdk/issues/3986 --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
- Apr 04, 2024
-
-
Liam Aharon authored
Closes https://github.com/paritytech/polkadot-sdk/issues/2977 The issue appears to stem from the `aquamarine` crate failing to render diagrams in re-exported crates. e.g. as raised [here](https://github.com/paritytech/polkadot-sdk/issues/2977), diagrams would render at `frame_support::traits::Hooks` but not the re-exported doc `frame::traits::Hooks`, even if I added `aquamarine` as a `frame` crate dependency. To resolve this, I followed advice in https://github.com/mersinvald/aquamarine/issues/20 to instead render mermaid diagrams directly using JS by adding an `after-content.js`. --- Also fixes compile warnings, enables `--all-features` and disallows future warnings in CI. --------- Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by:
Bastian Köcher <git@kchr.de>
-
gupnik authored
Step in https://github.com/paritytech/polkadot-sdk/issues/3155 Needed for https://github.com/paritytech/eng-automation/issues/6 This PR renames `frame` crate to `polkadot-sdk-frame` as `frame` is not available on crates.io --------- Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com>
-
- Apr 02, 2024
-
-
Sam Johnson authored
derive-syn-parse v0.2.0 came out recently which (finally) adds support for syn 2x. Upgrading to this will remove many of the places where syn 1x was still compiling alongside syn 2x in the polkadot-sdk workspace. This also upgrades `docify` to 0.2.8 which is the version that upgrades derive-syn-pasre to 0.2.0. Additionally, this consolidates the `docify` versions in the repo to all use the latest, and in one case upgrades to the 0.2x syntax where 0.1.x was still being used. --------- Co-authored-by:
Liam Aharon <liam.aharon@hotmail.com>
-
- Apr 01, 2024
-
-
Serban Iorga authored
Fix links Related CI failure: https://github.com/paritytech/polkadot-sdk/actions/runs/8455425042/job/23162858534?pr=3859
-
- Mar 31, 2024
-
-
Liam Aharon authored
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/70 WIP PR for an overview of how to develop tokens in FRAME. - [x] Tokens in Substrate Ref Doc - High-level overview of the token-related logic in FRAME - Improve docs with better explanation of how holds, freezes, ed, free balance, etc, all work - [x] Update `pallet_balances` docs - Clearly mark what is deprecated (currency) - [x] Write fungible trait docs - [x] Evaluate and if required update `pallet_assets`, `pallet_uniques`, `pallet_nfts` docs - [x] Absorb https://github.com/paritytech/polkadot-sdk/pull/2683/ - [x] Audit individual trait method docs, and improve if possible Feel free to suggest additional TODOs for this PR in the comments --------- Co-authored-by:
Bill Laboon <laboon@users.noreply.github.com> Co-authored-by:
Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com>
-
- Mar 26, 2024
-
-
Dcompoze authored
**Update:** Pushed additional changes based on the review comments. **This pull request fixes various spelling mistakes in this repository.** Most of the changes are contained in the first **3** commits: - `Fix spelling mistakes in comments and docs` - `Fix spelling mistakes in test names` - `Fix spelling mistakes in error messages, panic messages, logs and tracing` Other source code spelling mistakes are separated into individual commits for easier reviewing: - `Fix the spelling of 'authority'` - `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'` - `Fix the spelling of 'prev_enqueud_messages'` - `Fix the spelling of 'endpoint'` - `Fix the spelling of 'children'` - `Fix the spelling of 'PenpalSiblingSovereignAccount'` - `Fix the spelling of 'PenpalSudoAccount'` - `Fix the spelling of 'insufficient'` - `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'` - `Fix the spelling of 'subtracted'` - `Fix the spelling of 'CandidatePendingAvailability'` - `Fix the spelling of 'exclusive'` - `Fix the spelling of 'until'` - `Fix the spelling of 'discriminator'` - `Fix the spelling of 'nonexistent'` - `Fix the spelling of 'subsystem'` - `Fix the spelling of 'indices'` - `Fix the spelling of 'committed'` - `Fix the spelling of 'topology'` - `Fix the spelling of 'response'` - `Fix the spelling of 'beneficiary'` - `Fix the spelling of 'formatted'` - `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'` - `Fix the spelling of 'succeeded'` - `Fix the spelling of 'reopened'` - `Fix the spelling of 'proposer'` - `Fix the spelling of 'InstantiationNonce'` - `Fix the spelling of 'depositor'` - `Fix the spelling of 'expiration'` - `Fix the spelling of 'phantom'` - `Fix the spelling of 'AggregatedKeyValue'` - `Fix the spelling of 'randomness'` - `Fix the spelling of 'defendant'` - `Fix the spelling of 'AquaticMammal'` - `Fix the spelling of 'transactions'` - `Fix the spelling of 'PassingTracingSubscriber'` - `Fix the spelling of 'TxSignaturePayload'` - `Fix the spelling of 'versioning'` - `Fix the spelling of 'descendant'` - `Fix the spelling of 'overridden'` - `Fix the spelling of 'network'` Let me know if this structure is adequate. **Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`, `Merkelization`, `Merkleization`, is somewhat inconsistent but I left it as it is. ~~**Note:** In some places the term `Receival` is used to refer to message reception, IMO `Reception` is the correct word here, but I left it as it is.~~ ~~**Note:** In some places the term `Overlayed` is used instead of the more acceptable version `Overlaid` but I also left it as it is.~~ ~~**Note:** In some places the term `Applyable` is used instead of the correct version `Applicable` but I also left it as it is.~~ **Note:** Some usage of British vs American english e.g. `judgement` vs `judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc. are both present in different places, but I suppose that's understandable given the number of contributors. ~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it triggers errors in CI when I make changes to it, so I left it as it is.~~
-
- Mar 25, 2024
-
-
Alexander Samusev authored
cc https://github.com/paritytech/ci_cd/issues/943
-
- Mar 20, 2024
-
-
bader y authored
_This PR is being continued from https://github.com/paritytech/polkadot-sdk/pull/2206, which was closed when the developer_hub was merged._ closes https://github.com/paritytech/polkadot-sdk-docs/issues/44 --- # Description This PR adds a reference document to the `developer-hub` crate (see https://github.com/paritytech/polkadot-sdk/pull/2102). This specific reference document covers defensive programming practices common within the context of developing a runtime with Substrate. In particular, this covers the following areas: - Default behavior of how Rust deals with numbers in general - How to deal with floating point numbers in runtime / fixed point arithmetic - How to deal with Integer overflows - General "safe math" / defensive programming practices for common pallet development scenarios - Defensive traits that exist within Substrate, i.e., `defensive_saturating_add `, `defensive_unwrap_or` - More general defensive programming examples (keep it concise) - Link to relevant examples where these practices are actually in production / being used - Unwrapping (or rather lack thereof) 101 todo -- - [x] Apply feedback from previous PR - [x] This may warrant a PR to append some of these docs to `sp_arithmetic` --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Gonçalo Pestana <g6pestana@gmail.com> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by:
Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by:
Radha <86818441+DrW3RK@users.noreply.github.com>
-
- Mar 17, 2024
-
-
s0me0ne-unkn0wn authored
Totally removes the `experimental` feature. Closes #3648. --------- Co-authored-by:
Bastian Köcher <git@kchr.de>
-
- Mar 15, 2024
-
-
gupnik authored
Step in https://github.com/paritytech/polkadot-sdk/issues/171 This PR removes `as [disambiguation_path]` syntax from `derive_impl` usage across the polkadot-sdk as introduced in https://github.com/paritytech/polkadot-sdk/pull/3505
-
- Mar 13, 2024
-
-
georgepisaltu authored
Revert "FRAME: Create `TransactionExtension` as a replacement for `SignedExtension` (#2280)" (#3665) This PR reverts #2280 which introduced `TransactionExtension` to replace `SignedExtension`. As a result of the discussion [here](https://github.com/paritytech/polkadot-sdk/pull/3623#issuecomment-1986789700), the changes will be reverted for now with plans to reintroduce the concept in the future. --------- Signed-off-by:
georgepisaltu <george.pisaltu@parity.io>
-