Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Polkadot-Sdk developer_hub #2102

Merged
merged 80 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a451f7e
add developer-hub and all things related
kianenigma Oct 31, 2023
68a053b
fix some things
kianenigma Oct 31, 2023
f7460d8
small fixes
kianenigma Oct 31, 2023
b785e5c
Create docs.yml
kianenigma Oct 31, 2023
00a0fec
Update docs.yml
kianenigma Oct 31, 2023
50c78b4
fix some warnings
kianenigma Oct 31, 2023
89e00e9
Merge branch 'kiz-developer-hub' of github.com:kianenigma/polkadot-sd…
kianenigma Oct 31, 2023
c91250b
fix some warnings
kianenigma Oct 31, 2023
6d57d2e
fix warns
kianenigma Oct 31, 2023
76f2277
update
kianenigma Nov 1, 2023
08802f8
fix
kianenigma Nov 2, 2023
2ec4541
publish note
kianenigma Nov 2, 2023
a826834
fix
kianenigma Nov 2, 2023
8e2f6b8
Master.into()
kianenigma Nov 2, 2023
df2d645
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
liamaharon Nov 3, 2023
58d60cb
fix build
liamaharon Nov 3, 2023
c8f7f1e
default page developer hub
liamaharon Nov 3, 2023
198a3e6
Master.into()
kianenigma Nov 4, 2023
bcdc9d5
add lot of ref docs
kianenigma Nov 4, 2023
4664874
Merge branch 'kiz-developer-hub' of github.com:paritytech/polkadot-sd…
kianenigma Nov 4, 2023
d542ff1
Update substrate/frame/support/procedural/src/pallet/parse/call.rs
kianenigma Nov 4, 2023
2f76ba1
Update developer-hub/src/lib.rs
kianenigma Nov 4, 2023
00ec677
Update developer-hub/src/lib.rs
kianenigma Nov 4, 2023
9b1db8c
Update docs/mermaid/polkadot_sdk.mmd
kianenigma Nov 4, 2023
7dba4f8
Update developer-hub/src/polkadot_sdk/mod.rs
kianenigma Nov 4, 2023
3519a03
Update developer-hub/src/reference_docs/wasm_meta_protocol.rs
kianenigma Nov 4, 2023
0d72dd7
Apply suggestions from code review
kianenigma Nov 4, 2023
9942120
Apply suggestions from code review
kianenigma Nov 4, 2023
60a37a1
Upstream.into()
kianenigma Nov 4, 2023
1896ac7
reword templates page.
kianenigma Nov 4, 2023
30d6ac2
repot homepage
kianenigma Nov 4, 2023
a56d3b1
rework substrate dev section
kianenigma Nov 4, 2023
641ff3a
fix cumulus links
kianenigma Nov 4, 2023
3baa30c
Apply extrinsic-encoding ref doc suggestions
jsdw Nov 7, 2023
9c2b3ea
Apply singed-extensions ref doc suggestion
jsdw Nov 7, 2023
62b69fc
add about build
kianenigma Nov 9, 2023
4c8939b
most of the stuff done in polkadot_sdk mod
kianenigma Nov 9, 2023
7b225e1
Apply suggestions from code review
kianenigma Nov 9, 2023
0f55b9a
Update developer-hub/src/polkadot_sdk/cumulus.rs
kianenigma Nov 9, 2023
d08ab24
Update developer-hub/src/polkadot_sdk/cumulus.rs
kianenigma Nov 9, 2023
b9ee9c1
ready to merge
kianenigma Nov 9, 2023
a873808
merge about half a million comments and conflicts
kianenigma Nov 9, 2023
2d5814b
Master.into()
kianenigma Nov 9, 2023
94eeed6
deprecate tutorial
kianenigma Nov 9, 2023
745c7fd
refactor tutorial to guides
juangirini Nov 14, 2023
d305146
fix fmt
juangirini Nov 14, 2023
1d1e4a0
Merge branch 'master' into kiz-developer-hub
juangirini Nov 14, 2023
74eb750
resolve import conflict
juangirini Nov 14, 2023
36baa71
fix ci
juangirini Nov 14, 2023
8defde9
fix ui tests
juangirini Nov 14, 2023
7c839fe
fix ui test
juangirini Nov 14, 2023
196d1d7
remove unused imports
juangirini Nov 15, 2023
f3b1b5b
Merge branch 'master' into kiz-developer-hub
juangirini Nov 15, 2023
832c8e0
fix experimental aura
juangirini Nov 16, 2023
679d60b
remove experimental from zepter
juangirini Nov 16, 2023
8788c27
Merge branch 'master' into kiz-developer-hub
juangirini Nov 16, 2023
2231d51
fix docify dependency
juangirini Nov 16, 2023
8ce5fcc
wip
juangirini Nov 17, 2023
bb14a83
fix experimental aura
juangirini Nov 17, 2023
188e308
fix experimental globally
juangirini Nov 17, 2023
0738681
fix experimental aura again
juangirini Nov 17, 2023
d622d84
fix aura cargo file
juangirini Nov 17, 2023
85d4e63
fix clippy
juangirini Nov 20, 2023
d13a924
make all tests compile
juangirini Nov 21, 2023
b19ffc4
fix experimental aura in cargo
juangirini Nov 21, 2023
a14ac7c
fix ci
juangirini Nov 22, 2023
7db6f4d
undo tmp change
juangirini Nov 22, 2023
d09bfd4
Merge branch 'master' into kiz-developer-hub
juangirini Nov 22, 2023
cd4cddd
undo deposit_event_indexed change
juangirini Nov 23, 2023
cff2de6
fix tests with block numbers
juangirini Nov 23, 2023
4d7020c
fix typos
juangirini Nov 23, 2023
1955b38
fix test skipping genesis
juangirini Nov 24, 2023
44ebcf2
add some review suggestions
juangirini Nov 24, 2023
d5bcd10
remove docs workflow
juangirini Nov 27, 2023
6a8aea3
Merge branch 'master' into kiz-developer-hub
juangirini Nov 28, 2023
0a8ce8d
remove substrate from workspace
juangirini Nov 28, 2023
cefc9d4
apply review suggestions
juangirini Nov 28, 2023
f65ece4
some minor improvements
juangirini Nov 29, 2023
1166806
Merge branch 'master' into kiz-developer-hub
juangirini Nov 29, 2023
9e08068
Merge branch 'master' into kiz-developer-hub
juangirini Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix some warnings
  • Loading branch information
kianenigma committed Oct 31, 2023
commit c91250b17d713866a727764e441442bc10408de9
8 changes: 5 additions & 3 deletions developer-hub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
//!
//! ### Checklist
//!
//! TODO
//! - [ ] Always make sure all downstream types and items are improved.
//! - [ ] Make sure you read all relevant documents, build on top of. Imagine the process of posting
//! something new in SE.
//!
//! ### Note on `crates.io` and Publishing
//!
Expand Down Expand Up @@ -102,8 +104,8 @@
//!
//! For more details about documenting guidelines, see:
//! <https://github.com/paritytech/polkadot-sdk/master/docs/DOCUMENTATION_GUIDELINES.md>
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![warn(rustdoc::broken_intra_doc_links)]
#![warn(rustdoc::private_intra_doc_links)]

/// An introduction to the Polkadot SDK. Read this module to learn about the structure of the SDK,
/// the tools that are provided as a part of it, and to gain a high level understanding of each.
Expand Down
5 changes: 4 additions & 1 deletion developer-hub/src/polkadot_sdk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
//! [![Runtime](https://img.shields.io/badge/fellowship-runtimes-e6007a?logo=polkadot)](https://github.com/polkadot-fellows/runtimes)
//! [![Manifesto](https://img.shields.io/badge/fellowship-manifesto-e6007a?logo=polkadot)](https://github.com/polkadot-fellows/manifesto)
//!
//!
//! ## Getting Started
//!
//! The primary way to get started with the Polkadot SDK is to start writing a Substrate-based
//! runtime using FRAME. See:
//!
//! 0. [`polkadot`], to understand what is Polkadot as a development platform.
//! 1. [`substrate`], for an overview of what Substrate is.
//! 2. Jump right into [`frame`] to learn about how to write a FRAME-based blockchain runtime.
//! 3. Continue with the [`developer_hub`'s "getting started"](crate#getting-started).
Expand Down Expand Up @@ -119,3 +119,6 @@ pub mod smart_contracts;
pub mod substrate;
/// Index of all the templates that can act as an initial scaffold for a new project.
pub mod templates;

/// Learn about XCM, the de-facto communication language between different consensus systems.
pub mod xcm;
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
57 changes: 51 additions & 6 deletions developer-hub/src/polkadot_sdk/polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,55 @@
//!
//! ## Getting Involved
//!
//! [![PolkadotForum](https://img.shields.io/badge/Polkadot_Forum-e6007a?logo=polkadot)](https://forum.polkadot.network/)
//! - RFCs TODO
//! - Polkadot Fellowship TODO
//! - Polkadot Specs
//! - Polkadot Implementor's guide
//! - [Polkadot Forum](https://forum.polkadot.network/)
//! - Polkadot Fellowship
juangirini marked this conversation as resolved.
Show resolved Hide resolved
//! - [Runtimes](https://github.com/polkadot-fellows/runtimes)
//! - [RFCs](https://github.com/polkadot-fellows/rfcs)
//! - [Polkadot Specs](spec.polkadot.network)
//! - [The Polkadot Parachain Host Implementers' Guide](https://paritytech.github.io/polkadot-sdk/book/)
//! - [Whitepaper](https://www.polkadot.network/whitepaper/)
//!
//! ## What is Polkadot
//! ## Platform
//!
//! ### Polkadot 1.x
//!
//! The original vision of Polkadot (i.e. **Polkadot 1**) revolves around the following arguments:
//!
//! * Future is multi-chain, because we need different chains with different specialization to
//! achieve widespread goals.
//! * In other words, no single chain is good enough to achieve this.
//! * A multi-chain future will inadvertently suffer from fragmentation of economic security.
//! * This stake fragmentation will make communication over consensus system with varying security
//! levels inherently unsafe.
//!
//! Polkadot's answer to the above is:
//!
//! * Shared Security: The idea of shared economic security sits at the core of Polkadot. Polkadot
//! enables different blockchains (ie. "*Parachains*") to pool their economic security from
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//! Polkadot (ie. "*Relay Chain*").
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//! * A framework to build blockchains: In order to materialize the multi-chain future, an easy
//! blockchain framework must exist. This is [`crate::polkadot_sdk::substrate`],
//! [`crate::polkadot_sdk::frame_runtime`] and [`crate::polkadot_sdk::cumulus`].
//! * A communication language between blockchains: In order for these blockchains to communicate,
//! they need a shared language. [`crate::polkadot_sdk::xcm`] is one such language.
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//!
//! > Note that the interoperability promised by Polkadot is unparalleled in that any two parachains
//! > connected to Polkadot have the same security and can have much higher guarantees about the
//! > security of the recipient of any message.
//!
//! Polkadot delivers the above vision, alongside a flexible means for parachains to schedule
//! themselves with the Relay Chain. To achieve this, Polkadot has been developed with an
//! architecture similar to that of a computer. Polkadot Relay Chain has a number of "cores". Each
//! is (in simple terms) is capable of progressing 1 parachain a a time. For example, a parachain
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//! can schedule itself for on a single core for 5 blocks.
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//!
//! Within the scope of Polkadot 1.x, two main scheduling ways has been considered:
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//!
//! * Long term Parachains, obtained through locking a sum of DOT in an auction system.
//! * on-demand Parachains, purchased through paying DOT to the relay-chain whenever needed.
//!
//! This scheduling system, and its evolution is the segway into Polkadot 2.x
//!
//! ### Polkadot 2.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi, it's possible that we can take a lot of inspiration about what's in the Wiki for here in the future. although this may be "too high level", need to probably tailor this to how its useful to a programmer: https://wiki.polkadot.network/docs/polkadot-direction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glossing over the wiki, it already looks pretty good. It is slightly verbose, but that is fine for a wiki. I think it is great that you are finding these similarities and making sure information is consistent.

Admittedly, I don't know the wiki too well. Given that this is a small resource, it should be easy for you and Radha to really know the content here a-z as it is being made.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On this, we can probably create a version which caters to what a developer need to know, then link both the wiki and RFCs

//!
//! <TODO>
10 changes: 10 additions & 0 deletions developer-hub/src/polkadot_sdk/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@
//! - classic [cumulus-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template)
//! - [`extended-parachain-template`](https://github.com/paritytech/extended-parachain-template)
//! - [`frontier-parachain-template`](https://github.com/paritytech/frontier-parachain-template)

// NOTE: a super important detail that I am looking forward to here is
// <https://github.com/paritytech/polkadot-sdk/issues/62#issuecomment-1691523754> and
// <https://github.com/paritytech/polkadot-sdk/issues/5>. Meaning that I would not spend time on
// teaching someone too much detail about the ugly thing we call "node" nowadays. In the future, I
// am sure we will either have a better "node-builder" code that can actually be tested, or an
// "omni-node" that can run (almost) any wasm file. We should already build tutorials in this
// direction IMO. This also affects all the templates. If we have a good neat runtime file, which we
// are moving toward, and a good node-builder, we don't need all of these damn templates. These
// templates are only there because the boilerplate is super horrible atm.
1 change: 1 addition & 0 deletions developer-hub/src/polkadot_sdk/xcm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//! # XCM
Empty file.
4 changes: 4 additions & 0 deletions developer-hub/src/reference_docs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ pub mod frame_composite_enums;
/// Learn about how to make a pallet/runtime that is fee-less and instead uses another mechanism to
/// control usage and sybil attacks.
pub mod fee_less_runtime;

/// Learn about metadata, the main means through which an upgrade-able runtime communicate its
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
/// properties to the outside world.
pub mod metadata;
1 change: 1 addition & 0 deletions docs/mermaid/IA.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ flowchart
polkadot_sdk --> frame
polkadot_sdk --> cumulus
polkadot_sdk --> polkadot
polkadot_sdk --> xcm


4 changes: 3 additions & 1 deletion substrate/frame/support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ pub mod __private {
pub use sp_core::{OpaqueMetadata, Void};
pub use sp_core_hashing_proc_macro;
pub use sp_inherents;
pub use sp_io::{self, storage::root as storage_root, TestExternalities};
#[cfg(feature = "std")]
pub use sp_io::TestExternalities;
pub use sp_io::{self, storage::root as storage_root};
pub use sp_metadata_ir as metadata_ir;
#[cfg(feature = "std")]
pub use sp_runtime::{bounded_btree_map, bounded_vec};
Expand Down