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

Multi-Block-Migrations, poll hook and new System callbacks #1781

Merged
merged 136 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
7b74965
Import #14414
ggwpez Oct 3, 2023
5ca965e
Fixup tests
ggwpez Oct 3, 2023
2a5d351
Fix tests
ggwpez Oct 3, 2023
debede3
Make shit compile
ggwpez Oct 4, 2023
f27091b
Fix tests
ggwpez Oct 4, 2023
2eb5095
Clippy
ggwpez Oct 4, 2023
c4a5b57
Fix
ggwpez Oct 4, 2023
ecef8df
Fix test
ggwpez Oct 4, 2023
d128cd8
Fix defensive behaviour
ggwpez Oct 5, 2023
10c63ed
Fix
ggwpez Oct 5, 2023
11ddb74
Apply suggestions from code review
ggwpez Oct 6, 2023
1c80b7e
Add docs
ggwpez Oct 30, 2023
73a403b
Add inherent_order
ggwpez Oct 30, 2023
b0872fc
Add inherent order trait stub
ggwpez Oct 30, 2023
7c7f56e
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Oct 30, 2023
91b965a
Check inhernet order
ggwpez Oct 30, 2023
0090a14
Ensure inherents are ordered
ggwpez Oct 30, 2023
0e813fc
Fix all inherent order stuff and test
ggwpez Oct 30, 2023
821a327
Make stuff compile
ggwpez Oct 30, 2023
a251841
Add on_poll to pallets
ggwpez Oct 30, 2023
4d69aa4
Call hooks
ggwpez Oct 30, 2023
b76709c
Call migrations
ggwpez Oct 30, 2023
779a1b2
Remove unwrap
ggwpez Oct 30, 2023
91ee7ff
Fix tests
ggwpez Oct 30, 2023
03bd6d5
Update ui tests
ggwpez Oct 30, 2023
22b8529
Review fixes
ggwpez Nov 7, 2023
ddd6b36
fmt
ggwpez Nov 7, 2023
c01da99
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Nov 7, 2023
a776dc9
fmt
ggwpez Nov 7, 2023
6e20c6e
Update substrate/frame/executive/src/tests.rs
ggwpez Nov 7, 2023
b7d2d15
Update substrate/frame/support/src/migrations.rs
ggwpez Nov 7, 2023
8c05371
Update substrate/frame/support/src/migrations.rs
ggwpez Nov 7, 2023
4ba87c5
Apply suggestions from code review
ggwpez Nov 7, 2023
7e97ec2
review fixes
ggwpez Nov 7, 2023
c0a8736
Fix compile
ggwpez Nov 7, 2023
c7d351b
Remove inherent ordering
ggwpez Nov 8, 2023
8c286cc
Cleanup
ggwpez Nov 8, 2023
74c5dad
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Nov 10, 2023
445000d
fmt
ggwpez Nov 10, 2023
76fb0f6
Check that pallet is configured
ggwpez Nov 10, 2023
fc8490d
Cleanup
ggwpez Nov 10, 2023
cabd815
Rename after_inherents to last_inherent
ggwpez Nov 10, 2023
aa9646d
Cleanup
ggwpez Nov 10, 2023
0b80d25
Beauty fixes
ggwpez Nov 10, 2023
b751f86
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Nov 10, 2023
6fe7ac4
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Nov 10, 2023
47f2509
Update substrate/frame/support/src/migrations.rs
ggwpez Nov 13, 2023
888ed99
Update substrate/frame/support/src/traits/hooks.rs
ggwpez Nov 13, 2023
c892609
Update substrate/frame/support/src/traits/hooks.rs
ggwpez Nov 13, 2023
990a350
Update substrate/frame/migrations/src/tests.rs
ggwpez Nov 13, 2023
ad68d88
Update substrate/frame/migrations/src/tests.rs
ggwpez Nov 13, 2023
262c6af
Update substrate/frame/migrations/src/lib.rs
ggwpez Nov 13, 2023
6f1d180
Use derive_impl
ggwpez Nov 13, 2023
e08c56f
Rename to TransactionForbidden
ggwpez Nov 13, 2023
5d7a133
Review fixes
ggwpez Nov 13, 2023
7d2a438
Update substrate/client/block-builder/src/lib.rs
ggwpez Nov 14, 2023
aa046d3
Finally remove last_inherent
ggwpez Nov 20, 2023
f6e2a27
Simplify code
ggwpez Nov 20, 2023
c3e21c4
Add more tests
ggwpez Nov 20, 2023
32f8429
tests
ggwpez Nov 20, 2023
f42f7df
Merge branch 'master' into oty-after-inherents
ggwpez Nov 21, 2023
20e931a
Fixup tests after merge
ggwpez Nov 21, 2023
f6e06a2
Update substrate/frame/migrations/src/lib.rs
ggwpez Nov 21, 2023
9a402e1
Update substrate/frame/executive/src/lib.rs
ggwpez Nov 21, 2023
492dbd0
Update substrate/frame/migrations/Cargo.toml
ggwpez Nov 21, 2023
8fe5134
Update substrate/frame/support/src/migrations.rs
ggwpez Nov 21, 2023
afdd752
Apply suggestions from code review
ggwpez Nov 21, 2023
a2c2cca
Add docs
ggwpez Nov 21, 2023
9f80434
Fixup runtimes
ggwpez Nov 21, 2023
ed0e8d5
Fix
ggwpez Nov 21, 2023
e325a56
Review fixes
ggwpez Nov 21, 2023
900c6c5
fixes
ggwpez Nov 21, 2023
e9a8212
Remove MBMs engine from Executive
ggwpez Nov 21, 2023
d303294
Fix test
ggwpez Nov 21, 2023
1ea9b15
Clippy
ggwpez Nov 21, 2023
da95824
Fix try_execute_block
ggwpez Nov 22, 2023
6b68aea
Fix doctest
ggwpez Nov 22, 2023
b16dffe
Add fuse comment
ggwpez Nov 22, 2023
2c26e25
Swap pre_inherents and note_finished_initialize
ggwpez Nov 22, 2023
cbb97be
Final fixes
ggwpez Nov 22, 2023
d166bfa
fix benchmarks
ggwpez Nov 22, 2023
b0e7d50
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Nov 23, 2023
b8df700
Add SafeMode adapter to handle failed migrations
ggwpez Nov 23, 2023
a947c93
Fix
ggwpez Nov 27, 2023
b45e28c
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Nov 27, 2023
017b3ad
Dont reexport stuff
ggwpez Nov 27, 2023
cb3c710
Fmt
ggwpez Nov 27, 2023
5d80401
Lockfile
ggwpez Nov 27, 2023
1825aaa
Fix macro export
ggwpez Nov 27, 2023
a6bffb1
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Nov 30, 2023
6b919df
Update lockfile
ggwpez Nov 30, 2023
b72ec2c
Fix
ggwpez Nov 30, 2023
8dfdc16
Please build
ggwpez Dec 1, 2023
bc10038
Do proper benchmarking
ggwpez Dec 4, 2023
0b643a0
Break loop early when out of weight
ggwpez Dec 4, 2023
fb63f08
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Dec 4, 2023
66cb02e
format toml files
ggwpez Dec 4, 2023
b2594ec
Ignore target folder
ggwpez Dec 4, 2023
03f1c71
fmt
ggwpez Dec 4, 2023
8550cf7
Update lockfile
ggwpez Dec 4, 2023
e0b3874
Test set_code rejects during MBM
ggwpez Dec 4, 2023
a9d1474
Use default configs
ggwpez Dec 7, 2023
d973edc
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Dec 7, 2023
9cea489
Fixup merge
ggwpez Dec 7, 2023
66047af
Fix
ggwpez Dec 22, 2023
b79dc45
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Jan 2, 2024
b372868
fmt
ggwpez Jan 2, 2024
642a83b
Remove unneeded config
ggwpez Jan 2, 2024
32c382e
Clippy
ggwpez Jan 2, 2024
4b8ad61
Add missing config items
ggwpez Jan 2, 2024
d279316
Fix mock configs
ggwpez Jan 2, 2024
67479a6
Remove unused import
ggwpez Jan 2, 2024
d4330bd
Clippy
ggwpez Jan 2, 2024
cd1aa20
Fix mermaid execute block graph
ggwpez Jan 2, 2024
5d37d68
Fix migration order
ggwpez Jan 2, 2024
0fb1ac2
Review fixes
ggwpez Jan 2, 2024
1aed440
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Feb 9, 2024
3dffae1
Introduce IsInherent
ggwpez Feb 9, 2024
4a99674
Add execution phases: ApplyInherent and AfterInherent
ggwpez Feb 14, 2024
213c659
Add to workspace, thanks CI 🙈
ggwpez Feb 16, 2024
2cfdb0d
Revert "Add execution phases: ApplyInherent and AfterInherent"
ggwpez Feb 20, 2024
d43a8bc
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Feb 20, 2024
390cf21
Add docs
ggwpez Feb 21, 2024
5a63c1f
Format TOML files
ggwpez Feb 21, 2024
cfd01a8
Update UI tests
ggwpez Feb 21, 2024
853b3c0
Add prdoc
ggwpez Feb 23, 2024
afe900c
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Feb 23, 2024
73957a2
Lockfile
ggwpez Feb 23, 2024
071809c
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Feb 26, 2024
adf40a9
Re-generate zombienet chainspec - hope this helps
ggwpez Feb 27, 2024
e194efa
Lockfile
ggwpez Feb 27, 2024
af1393f
Use correct RA version
ggwpez Feb 28, 2024
851b1e4
Revert "Re-generate zombienet chainspec - hope this helps"
ggwpez Feb 28, 2024
f8f5491
Merge remote-tracking branch 'origin/master' into oty-after-inherents
ggwpez Feb 28, 2024
bd79a2e
Lockfile
ggwpez Feb 28, 2024
1e9e4e7
Merge branch 'master' into oty-after-inherents
ggwpez Feb 28, 2024
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
77 changes: 65 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions cumulus/pallets/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ impl system::Config for Test {
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions cumulus/pallets/xcmp-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ impl frame_system::Config for Test {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Test>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
ggwpez marked this conversation as resolved.
Show resolved Hide resolved
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions cumulus/parachain-template/pallets/template/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ impl system::Config for Test {
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl crate::Config for Test {
Expand Down
7 changes: 6 additions & 1 deletion cumulus/parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ impl frame_system::Config for Runtime {
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down Expand Up @@ -581,7 +586,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
5 changes: 5 additions & 0 deletions cumulus/parachains/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ mod tests {
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_balances::Config for Test {
Expand Down
5 changes: 5 additions & 0 deletions cumulus/parachains/pallets/collective-content/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ impl frame_system::Config for Test {
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}
pub struct CCWeightInfo;
impl WeightInfo for CCWeightInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down Expand Up @@ -989,7 +994,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down Expand Up @@ -895,7 +900,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down Expand Up @@ -1078,7 +1083,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down Expand Up @@ -1112,7 +1117,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ impl frame_system::Config for Runtime {
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = ConstU32<16>;
type SingleBlockMigrations = ();
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down Expand Up @@ -517,7 +522,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
Loading