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 11 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
68 changes: 60 additions & 8 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion cumulus/parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,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 Expand Up @@ -589,6 +589,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,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 Expand Up @@ -991,6 +991,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,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 Expand Up @@ -895,6 +895,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,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 Expand Up @@ -996,6 +996,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,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 Expand Up @@ -518,6 +518,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,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 Expand Up @@ -518,6 +518,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,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 Expand Up @@ -736,6 +736,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn construct_and_apply_extrinsic(
}

fn executive_init_block(header: &HeaderFor<Runtime>) {
Executive::initialize_block(header)
Executive::initialize_block(header);
}

fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys<Runtime> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,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 Expand Up @@ -775,6 +775,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,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 Expand Up @@ -462,6 +462,10 @@ impl_runtime_apis! {
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,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 Expand Up @@ -366,6 +366,10 @@ impl_runtime_apis! {
fn check_inherents(block: Block, data: sp_inherents::InherentData) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
6 changes: 5 additions & 1 deletion cumulus/parachains/runtimes/starters/seedling/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,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 Expand Up @@ -332,6 +332,10 @@ impl_runtime_apis! {
fn check_inherents(block: Block, data: sp_inherents::InherentData) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
6 changes: 5 additions & 1 deletion cumulus/parachains/runtimes/starters/shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,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 Expand Up @@ -364,6 +364,10 @@ impl_runtime_apis! {
fn check_inherents(block: Block, data: sp_inherents::InherentData) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}

fn after_inherents() {
Executive::after_inherents()
}
}

impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
Expand Down
Loading
Loading