Commit Graph

17 Commits

Author SHA1 Message Date
Liam Aharon 12ce4f7d04 Runtime Upgrade ref docs and Single Block Migration example pallet (#1554)
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/55

- Changes 'current storage version' terminology to less ambiguous
'in-code storage version' (suggestion by @ggwpez)
- Adds a new example pallet `pallet-example-single-block-migrations`
- Adds a new reference doc to replace
https://docs.substrate.io/maintain/runtime-upgrades/ (temporarily living
in the pallet while we wait for developer hub PR to merge)
- Adds documentation for the `storage_alias` macro
- Improves `trait Hooks` docs 
- Improves `trait GetStorageVersion` docs
- Update the suggested patterns for using `VersionedMigration`, so that
version unchecked migrations are never exported
- Prevents accidental usage of version unchecked migrations in runtimes

https://github.com/paritytech/substrate/pull/14421#discussion_r1255467895
- Unversioned migration code is kept inside `mod version_unchecked`,
versioned code is kept in `pub mod versioned`
- It is necessary to use modules to limit visibility because the inner
migration must be `pub`. See
https://github.com/rust-lang/rust/issues/30905 and

https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504/40
for more.

### todo

- [x] move to reference docs to proper place within sdk-docs (now that
https://github.com/paritytech/polkadot-sdk/pull/2102 is merged)
- [x] prdoc

---------

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Juan <juangirini@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com>
2024-02-28 07:32:02 +00:00
Kian Paimani 29369a4e7c Add documentation around FRAME Origin (#3362)
Does the following: 

- Add a reference doc page named `frame_runtime_types`, which explains
what types like `RuntimeOrigin`, `RuntimeCall` etc are.
- On top of it, it adds a reference doc page called `frame_origin` which
explains a few important patterns that we use around origins
- And finally brushes up `#[frame::origin]` docs. 
- Updates the theme, sidebar and favicon to look like: 

<img width="1728" alt="Screenshot 2024-02-20 at 12 16 00"
src="https://github.com/paritytech/polkadot-sdk/assets/5588131/6d60a16b-2081-411b-8869-43b91920cca9">


All of this was inspired by
https://substrate.stackexchange.com/questions/10992/how-do-you-find-the-public-key-for-the-medium-spender-track-origin/10993

closes https://github.com/paritytech/polkadot-sdk-docs/issues/45
closes https://github.com/paritytech/polkadot-sdk-docs/issues/43
contributes / overlaps with
https://github.com/paritytech/polkadot-sdk/pull/2638 cc @liamaharon
deprecation companion:
https://github.com/substrate-developer-hub/substrate-docs/pull/2131
pba-content companion:
https://github.com/Polkadot-Blockchain-Academy/pba-content/pull/977

---------

Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
2024-02-27 14:50:21 +00:00
Francisco Aguirre 5a50b8b8a3 Add XCM documentation to the sdk docs (#2628)
I added a small documentation for XCM in the context of the polkadot SDK

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: command-bot <>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2024-02-14 14:05:25 +00:00
Alexander Samusev 5b7f24fca1 [ci] Update rust in ci image (1.75 and 2024-01-22) (#3016)
cc https://github.com/paritytech/ci_cd/issues/926

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: Dónal Murray <donal.murray@parity.io>
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>
2024-01-30 23:17:44 +00:00
Niklas Adolfsson e16ef0861f rpc: backpressured RPC server (bump jsonrpsee 0.20) (#1313)
This is a rather big change in jsonrpsee, the major things in this bump
are:
- Server backpressure (the subscription impls are modified to deal with
that)
- Allow custom error types / return types (remove jsonrpsee::core::Error
and jsonrpee::core::CallError)
- Bug fixes (graceful shutdown in particular not used by substrate
anyway)
   - Less dependencies for the clients in particular
   - Return type requires Clone in method call responses
   - Moved to tokio channels
   - Async subscription API (not used in this PR)

Major changes in this PR:
- The subscriptions are now bounded and if subscription can't keep up
with the server it is dropped
- CLI: add parameter to configure the jsonrpc server bounded message
buffer (default is 64)
- Add our own subscription helper to deal with the unbounded streams in
substrate

The most important things in this PR to review is the added helpers
functions in `substrate/client/rpc/src/utils.rs` and the rest is pretty
much chore.

Regarding the "bounded buffer limit" it may cause the server to handle
the JSON-RPC calls
slower than before.

The message size limit is bounded by "--rpc-response-size" thus "by
default 10MB * 64 = 640MB"
but the subscription message size is not covered by this limit and could
be capped as well.

Hopefully the last release prior to 1.0, sorry in advance for a big PR

Previous attempt: https://github.com/paritytech/substrate/pull/13992

Resolves https://github.com/paritytech/polkadot-sdk/issues/748, resolves
https://github.com/paritytech/polkadot-sdk/issues/627
2024-01-23 08:55:13 +00:00
joe petrowski 757ae372f7 Switch All construct_runtimes to New Syntax (#2979)
Clean up all the old syntax.

---------

Co-authored-by: command-bot <>
Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com>
Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com>
Co-authored-by: Maksym H <1177472+mordamax@users.noreply.github.com>
2024-01-22 07:15:53 +00:00
cristiantroy 9a8ef495be Fix typos (#2983) 2024-01-18 13:30:29 +01:00
Nuke 01ea45c3a1 Fix deps for local docs build for Rust 1.75.0 (#2896)
- Fix docs deps build issue
(https://github.com/servo/rust-smallvec/issues/327) (Please forgive me
and LMK if there are processes I need to follow for the bump a dep here
I am not aware of).
- Fix links for `meta_contributing` docs, internal and external.
- `cargo +nightly fmt` for `/docs/...` files
2024-01-10 02:18:59 +01:00
dependabot[bot] ce4e5496de Bump lycheeverse/lychee-action (#2875)
Bumps
[lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action)
from 2ac9f030ccdea0033e2510a23a67da2a2da98492 to
fdea7032675810093199f485fe075f057cc37b3e.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/fdea7032675810093199f485fe075f057cc37b3e"><code>fdea703</code></a>
Update secure git hash for 1.9.0</li>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/22134d37a1fff6c2974df9c92a7c7e1e86a08f9c"><code>22134d3</code></a>
Bump version to 1.9.0</li>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/ebd95ebde89b46eaf3567432efb0b52bad2187d7"><code>ebd95eb</code></a>
Update to latest lychee 0.14.0</li>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/37d79d3b6eda9990480a57eed21c847792dec37a"><code>37d79d3</code></a>
Add integration tests for absolute output path and <code>--dump</code>
(<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/218">#218</a>)</li>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/57219e4f1d23b32484889db3dbd73f6b814c9bfa"><code>57219e4</code></a>
Add integration test for custom output paths (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/1309">#1309</a>)
(<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/217">#217</a>)</li>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/a4282891d5805c0d9df0c0d524e2e95a3b0d1ac5"><code>a428289</code></a>
fix: cleanup if statement (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/215">#215</a>)</li>
<li><a
href="https://github.com/lycheeverse/lychee-action/commit/ef8c8f32c278e9eed290c6e6c96748f16b6cd335"><code>ef8c8f3</code></a>
Add documentation on using the <code>--base</code> param when testing
local files (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/211">#211</a>)</li>
<li>See full diff in <a
href="https://github.com/lycheeverse/lychee-action/compare/2ac9f030ccdea0033e2510a23a67da2a2da98492...fdea7032675810093199f485fe075f057cc37b3e">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: PG Herveou <pgherveou@gmail.com>
2024-01-10 00:12:35 +00:00
Niklas Adolfsson a97a6f2095 rpc: add rpc v2 chainSpec to polkadot (#2859)
The [chainSpec RPC API from the v2
spec](https://paritytech.github.io/json-rpc-interface-spec/api/chainSpec.html)
was only added to substrate-node and should be added to polkadot as well

/cc @lexnv
2024-01-08 13:35:12 +01:00
Juan Girini cad947951d Finish up polkadot doc (#2798)
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/66
2024-01-02 16:39:51 -03:00
Liam Aharon 45f4d9a2b9 Development Environment Advice Reference Doc (#2759)
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/63

---------

Co-authored-by: Dónal Murray <donal.murray@parity.io>
Co-authored-by: PG Herveou <pgherveou@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
2023-12-29 13:24:26 +01:00
Juan Girini b4c816665b Remove rustdocs allowances (#2797)
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/65
2023-12-24 09:03:37 +01:00
Juan Girini 7c79741e40 SDK docs ref cli (#2741)
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/53
2023-12-19 16:42:23 +02:00
Juan Girini d1924013b6 Ref docs: runtime vs contracts (#2609)
closes https://github.com/paritytech/polkadot-sdk-docs/issues/41
2023-12-19 16:28:39 +02:00
Juan Girini 4df313fbc7 Improve polkadot sdk docs (#2631)
Closes https://github.com/paritytech/polkadot-sdk-docs/issues/69
2023-12-06 20:26:06 +01:00
Juan Girini a310df263d Move developer-hub to polkadot-sdk-docs (#2598)
This PR is a continuation of
https://github.com/paritytech/polkadot-sdk/pull/2102 and part of an
initiative started here https://hackmd.io/@romanp/rJ318ZCEp
What has been done:
- The content under `docs/*` (with the exception of `docs/mermaid`) has
been moved to `docs/contributor/`
- Developer Hub has been renamed to Polkadot SDK Docs, and the crate has
been renamed from `developer-hub` to `polkadot-sdk-docs`
- The content under `developer-hub/*` has been moved to `docs/sdk`

---
Original PR https://github.com/paritytech/polkadot-sdk/pull/2565, it has
been close due to too many rebase conflicts

---------

Co-authored-by: Serban Iorga <serban@parity.io>
Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
Co-authored-by: Egor_P <egor@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
2023-12-05 10:23:24 +01:00