Skip to content

Commit 3e07be6

Browse files
vivekvpandyasea212
andauthored
Upgrade 0929 (#887)
* Upgrade Cargo.toml for pallets for polkadot-v0.9.26 * update runtime and node to version 0.9.26 * Fixes required for 0.9.26 * Use bounded_vec! * Make node compile * Update cargo lock * Pin tracing-core version * Align node folder to parachain-template * Upgrade polkadot version in global-dispute. * Use substrate, polkadot etc from Purestake * Upgrade to moonbeam-polkadot-v0.9.29 * Replace execute_block_no_check() to try_execute_block() * Format the code * Include frame/support in try-runtime feature * Add pallet-proxy to try-runtime feature in runtime * Use substrate,polkadot,cumulus,nimbus etc from zeitgeist github as it contains fix for try-runtime * Make try-runtime feature work * Remove println from global dispute benchmarks * Unpin tracing from version 0.1.26 * Fix clippy and quick_check benchmarks, also update weight_template * Fix weights after benchamarks * Fix try-runtime features of zrml pallets * Fix issue with setting timestamp * Fix issues with testing * Fix benchmarks * Fix test with runtime-benchmarks,with-global-disputes * Minor format change in prediction_markets/src/benchmarks.rs * Don't require Aura for PM tests * Allow arbitrary timestamp delta in benchmark environment Co-authored-by: Harald Heckmann <mail@haraldheckmann.de>
1 parent b77b5ac commit 3e07be6

File tree

93 files changed

+2997
-2617
lines changed

Some content is hidden

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

93 files changed

+2997
-2617
lines changed

Cargo.lock

Lines changed: 850 additions & 761 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,6 @@ members = [
4646
"zrml/styx",
4747
]
4848
resolver = "2"
49-
50-
[patch."https://github.com/purestake/crowdloan-rewards"]
51-
# This patch does ensure that crowdloan-rewards only uses partiytech dependencies.
52-
# If it is not used, the Zeitgeist runtimes will contain duplicate crates from
53-
# different repositories which results in bigger WASM-blobs, binary and the inability
54-
# to compile with the "runtime-benchmarks" feature.
55-
pallet-crowdloan-rewards = { git = "https://github.com/zeitgeistpm/crowdloan-rewards", branch = "polkadot-v0.9.26" }
56-
57-
[patch."https://github.com/purestake/moonbeam"]
58-
# Use dependencies from Paritytech
59-
moonbeam-vrf = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
60-
# Fix author-mapping migration
61-
pallet-author-mapping = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
62-
# Use dependencies from Paritytech
63-
pallet-parachain-staking = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
64-
session-keys-primitives = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
65-
66-
[patch."https://github.com/purestake/nimbus"]
67-
# Use dependencies from Paritytech
68-
nimbus-consensus = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
69-
# Use dependencies from Paritytech
70-
nimbus-primitives = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
71-
# Use dependencies from Paritytech
72-
pallet-author-inherent = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
73-
# Use dependencies from Paritytech
74-
pallet-author-slot-filter = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
75-
7649
# The list of dependencies below (which can be both direct and indirect dependencies) are crates
7750
# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of
7851
# their debug info might be missing) or to require to be frequently recompiled. We compile these

misc/frame_weight_template.hbs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ impl<T: frame_system::Config> {{pallet}}::weights::WeightInfo for WeightInfo<T>
4444
{{~#each benchmark.components as |c| ~}}
4545
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
4646
) -> Weight {
47-
({{underscore benchmark.base_weight}} as Weight)
47+
Weight::from_ref_time({{underscore benchmark.base_weight}})
4848
{{#each benchmark.component_weight as |cw|}}
4949
// Standard Error: {{underscore cw.error}}
50-
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
50+
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
5151
{{/each}}
5252
{{#if (ne benchmark.base_reads "0")}}
53-
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
53+
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
5454
{{/if}}
5555
{{#each benchmark.component_reads as |cr|}}
56-
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
56+
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
5757
{{/each}}
5858
{{#if (ne benchmark.base_writes "0")}}
59-
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
59+
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
6060
{{/if}}
6161
{{#each benchmark.component_writes as |cw|}}
62-
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
62+
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
6363
{{/each}}
6464
}
6565
{{/each}}

misc/orml_weight_template.hbs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ impl<T: frame_system::Config> {{pallet}}::WeightInfo for WeightInfo<T> {
4545
{{~#each benchmark.components as |c| ~}}
4646
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
4747
) -> Weight {
48-
({{underscore benchmark.base_weight}} as Weight)
48+
Weight::from_ref_time({{underscore benchmark.base_weight}})
4949
{{#each benchmark.component_weight as |cw|}}
5050
// Standard Error: {{underscore cw.error}}
51-
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
51+
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
5252
{{/each}}
5353
{{#if (ne benchmark.base_reads "0")}}
54-
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
54+
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
5555
{{/if}}
5656
{{#each benchmark.component_reads as |cr|}}
57-
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
57+
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
5858
{{/each}}
5959
{{#if (ne benchmark.base_writes "0")}}
60-
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
60+
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
6161
{{/if}}
6262
{{#each benchmark.component_writes as |cw|}}
63-
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
63+
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
6464
{{/each}}
6565
}
6666
{{/each}}

misc/weight_template.hbs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
5757
{{~#each benchmark.components as |c| ~}}
5858
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
5959
) -> Weight {
60-
({{underscore benchmark.base_weight}} as Weight)
60+
Weight::from_ref_time({{underscore benchmark.base_weight}})
6161
{{#each benchmark.component_weight as |cw|}}
6262
// Standard Error: {{underscore cw.error}}
63-
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
63+
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
6464
{{/each}}
6565
{{#if (ne benchmark.base_reads "0")}}
66-
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
66+
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
6767
{{/if}}
6868
{{#each benchmark.component_reads as |cr|}}
69-
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
69+
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
7070
{{/each}}
7171
{{#if (ne benchmark.base_writes "0")}}
72-
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
72+
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
7373
{{/if}}
7474
{{#each benchmark.component_writes as |cw|}}
75-
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
75+
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
7676
{{/each}}
7777
}
7878
{{/each}}

0 commit comments

Comments
 (0)