Polkadot-SDK FRAME @ 2024

Polkadot SDK and FRAME


Stable + Meaningful Releases

--

Past

--

Now

Screenshot 2024-11-08 at 03.01.45.png

--

Now


Getting Started

Screenshot 2024-11-08 at 03.07.23.png

--

Templates

Notes:


--

Umbrella Crates

[dependencies]
codec = { workspace = true }
scale-info = { workspace = true }
polkadot-sdk = { version = "x.y.z", features = [
	"pallet-balances", "pallet-sudo", "pallet-timestamp", "runtime"] 
}

[features]
default = ["std"]
std = [
	"codec/std",
	"scale-info/std",
	
	"polkadot-sdk/std",
]

--

polkadot-sdk Crate

--

polkadot-sdk Crate

Note:

--

polkadot-sdk-frame Crate

#![cfg_attr(not(feature = "std"), no_std)]

extern crate alloc;
use alloc::{vec, vec::Vec};

use polkadot_sdk::{polkadot_sdk_frame as frame, *};
use frame::{
	prelude::*,
	runtime::{apis, prelude::*},
};

--

polkadot-sdk-frame Crate

Note:
polkadot_sdk_frame - Rust
Fetching Title#nysy

--

Past (substrate-node-template)

--
Screenshot 2024-11-08 at 03.50.38.png

Screenshot 2024-11-08 at 03.51.50.png


API Documentation

--

Screenshot 2024-11-08 at 03.56.40.png

--

Screenshot 2024-11-08 at 04.03.39.png

Note:

API Documentation:

Note:

--

API Documentation:


Reflection

All of this, releases, stable and well-documented API, is to say polkadot-sdk is a step closer to a mature mono-repo.

and we shall keep it that way.


FRAME Updates

All of this is opt-in.

--

Before

impl frame_system::Config for Test {
	type BaseCallFilter = ();
	type BlockWeights = ();
	type BlockLength = ();
	type DbWeight = ();
	type RuntimeOrigin = RuntimeOrigin;
	type RuntimeCall = RuntimeCall;
	type Nonce = u64;
	type Block = Block;
	type Hash = sp_core::H256;
	type Hashing = sp_runtime::traits::BlakeTwo256;
	type AccountId = AccountId;
	type Lookup = IdentityLookup<Self::AccountId>;
	type RuntimeEvent = RuntimeEvent;
	type Version = ();
	type PalletInfo = PalletInfo;
	type AccountData = ();
	type OnNewAccount = ();
	type OnKilledAccount = ();
	type SystemWeightInfo = ();
	type SS58Prefix = ();
	type OnSetCode = ();
	type MaxConsumers = ConstU32<16>;
}

--

After

#[derive_implTestDefaultConfig]
impl frame_system::Config for Test {
	type Block = frame_system::mocking::MockBlock<Test>;
}

Or

#[derive_implTestDefaultConfig]
impl frame_system::Config for Test {
	type Block = frame_system::mocking::MockBlock<Test>;
	type AccountData = pallet_balances::AccountData<u64>;
}

Node

--

Omni Node


Closing Remarks

Note: