Skip to content

Commit 2378d40

Browse files
mattheworrisdo-not-replyrlaferla
authored andcommitted
Polkadot 0939 to 0942 upgrade (#1590)
# Goal The goal of this PR is upgrade Polkadot to v0.9.42 Polkadot Release Notes: https://github.com/paritytech/polkadot/releases/tag/v0.9.42 https://github.com/paritytech/polkadot/releases/tag/v0.9.41 https://github.com/paritytech/polkadot/releases/tag/v0.9.40 Polkadot Release Analysis: https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-41-v0-9-42/2828/1 Closes #1472 Closes #1270 Closes #1332 # Discussion - v0.9.40 was not working and there was evidence that changes in v0.9.42 were related, so we decided to jump ahead to v0.9.42 <!-- List discussion items --> # Runtime Migrations Included - [x] paritytech/polkadot#6937 - [x] paritytech/substrate#13715 - [x] paritytech/substrate#13936 - [x] paritytech/polkadot#7114 - [x] Further all migrations from 9.38+ are included: paritytech/polkadot#7162) # Checklist - [x] Chain spec updated - [ ] Custom RPC OR Runtime API added/changed? Updated js/api-augment. - [ ] Design doc(s) updated - [ ] Tests added - [ ] Benchmarks added - [x] Weights updated # Tests Performed - [x] `make ci-local` -- Passing (includes lint, docs, unit-test and integration-test) - [x] `make start-native` -- Successfully attached debugger when creating MSA with Polkadot UI - [x] `make start-relay` -- Docker Containers successfully started, but too slow in emulation on Apple Silicon M2. - [x] `make upgrade-local` -- Successfully started local relay network and upgraded to a newer test runtime. - [x] `make upgrade-local` -- Successfully updated a node running the current version on branch `main` --------- Co-authored-by: Frequency CI [bot] <[email protected]> Co-authored-by: Matthew Orris <--help> Co-authored-by: Robert La Ferla <[email protected]>
1 parent 53916e9 commit 2378d40

File tree

88 files changed

+6230
-3675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6230
-3675
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ res/
2020
scratch/
2121

2222
frequency.log
23+
24+
scripts/js/onboard/.yarnrc.yml
25+
scripts/js/onboard/.yarn/cache
26+
scripts/js/onboard/.yarn/*.gz

.maintain/frame-weight-template.hbs

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
//! Autogenerated weights for {{pallet}}
1919
//!
2020
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
21-
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
21+
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
22+
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
23+
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
2224
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
2325

2426
// Executed Command:
@@ -27,15 +29,12 @@
2729
{{/each}}
2830

2931
#![cfg_attr(rustfmt, rustfmt_skip)]
30-
#![allow(
31-
rustdoc::all,
32-
missing_docs,
33-
unused_parens,
34-
unused_imports
35-
)]
32+
#![allow(unused_parens)]
33+
#![allow(unused_imports)]
34+
#![allow(missing_docs)]
3635

3736
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
38-
use sp_std::marker::PhantomData;
37+
use core::marker::PhantomData;
3938

4039
/// Weight functions needed for {{pallet}}.
4140
pub trait WeightInfo {
@@ -57,29 +56,39 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
5756
{{/if}}
5857
{{#each benchmarks as |benchmark|}}
5958
{{#each benchmark.comments as |comment|}}
60-
// {{comment}}
59+
/// {{comment}}
60+
{{/each}}
61+
{{#each benchmark.component_ranges as |range|}}
62+
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
6163
{{/each}}
6264
fn {{benchmark.name~}}
6365
(
6466
{{~#each benchmark.components as |c| ~}}
6567
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
6668
) -> Weight {
67-
Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
69+
// Proof Size summary in bytes:
70+
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
71+
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
72+
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
73+
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
6874
{{#each benchmark.component_weight as |cw|}}
6975
// Standard Error: {{underscore cw.error}}
70-
.saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
76+
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
7177
{{/each}}
7278
{{#if (ne benchmark.base_reads "0")}}
73-
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64))
79+
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
7480
{{/if}}
7581
{{#each benchmark.component_reads as |cr|}}
76-
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
82+
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
7783
{{/each}}
7884
{{#if (ne benchmark.base_writes "0")}}
79-
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64))
85+
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
8086
{{/if}}
8187
{{#each benchmark.component_writes as |cw|}}
82-
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
88+
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
89+
{{/each}}
90+
{{#each benchmark.component_calculated_proof_size as |cp|}}
91+
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
8392
{{/each}}
8493
}
8594
{{/each}}
@@ -89,29 +98,39 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
8998
impl WeightInfo for () {
9099
{{#each benchmarks as |benchmark|}}
91100
{{#each benchmark.comments as |comment|}}
92-
// {{comment}}
101+
/// {{comment}}
102+
{{/each}}
103+
{{#each benchmark.component_ranges as |range|}}
104+
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
93105
{{/each}}
94106
fn {{benchmark.name~}}
95107
(
96108
{{~#each benchmark.components as |c| ~}}
97109
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
98110
) -> Weight {
99-
Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
111+
// Proof Size summary in bytes:
112+
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
113+
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
114+
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
115+
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
100116
{{#each benchmark.component_weight as |cw|}}
101117
// Standard Error: {{underscore cw.error}}
102-
.saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
118+
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
103119
{{/each}}
104120
{{#if (ne benchmark.base_reads "0")}}
105-
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as u64))
121+
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
106122
{{/if}}
107123
{{#each benchmark.component_reads as |cr|}}
108-
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
124+
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
109125
{{/each}}
110126
{{#if (ne benchmark.base_writes "0")}}
111-
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as u64))
127+
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}_u64))
112128
{{/if}}
113129
{{#each benchmark.component_writes as |cw|}}
114-
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
130+
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
131+
{{/each}}
132+
{{#each benchmark.component_calculated_proof_size as |cp|}}
133+
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
115134
{{/each}}
116135
}
117136
{{/each}}

.maintain/runtime-weight-template.hbs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
//! Autogenerated weights for {{pallet}}
22
//!
33
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
4-
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
4+
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
5+
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
6+
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
57
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
68

79
// Executed Command:
@@ -12,9 +14,10 @@
1214
#![cfg_attr(rustfmt, rustfmt_skip)]
1315
#![allow(unused_parens)]
1416
#![allow(unused_imports)]
17+
#![allow(missing_docs)]
1518

1619
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
17-
use sp_std::marker::PhantomData;
20+
use core::marker::PhantomData;
1821

1922
/// Weights for {{pallet}} using the Substrate node and recommended hardware.
2023
pub struct SubstrateWeight<T>(PhantomData<T>);
@@ -25,7 +28,7 @@ impl<T: frame_system::Config> {{pallet}}::WeightInfo for SubstrateWeight<T> {
2528
{{/if}}
2629
{{#each benchmarks as |benchmark|}}
2730
{{#each benchmark.comments as |comment|}}
28-
// {{comment}}
31+
/// {{comment}}
2932
{{/each}}
3033
{{#each benchmark.component_ranges as |range|}}
3134
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
@@ -35,22 +38,29 @@ impl<T: frame_system::Config> {{pallet}}::WeightInfo for SubstrateWeight<T> {
3538
{{~#each benchmark.components as |c| ~}}
3639
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
3740
) -> Weight {
38-
Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
41+
// Proof Size summary in bytes:
42+
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
43+
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
44+
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
45+
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
3946
{{#each benchmark.component_weight as |cw|}}
4047
// Standard Error: {{underscore cw.error}}
41-
.saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
48+
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
4249
{{/each}}
4350
{{#if (ne benchmark.base_reads "0")}}
44-
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64))
51+
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
4552
{{/if}}
4653
{{#each benchmark.component_reads as |cr|}}
47-
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
54+
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
4855
{{/each}}
4956
{{#if (ne benchmark.base_writes "0")}}
50-
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64))
57+
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
5158
{{/if}}
5259
{{#each benchmark.component_writes as |cw|}}
53-
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
60+
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
61+
{{/each}}
62+
{{#each benchmark.component_calculated_proof_size as |cp|}}
63+
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
5464
{{/each}}
5565
}
5666
{{/each}}

0 commit comments

Comments
 (0)