Skip to content

Commit

Permalink
Upgrade 0929 (#887)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
vivekvpandya and sea212 authored Jan 20, 2023
1 parent b77b5ac commit 3e07be6
Show file tree
Hide file tree
Showing 93 changed files with 2,997 additions and 2,617 deletions.
1,611 changes: 850 additions & 761 deletions Cargo.lock

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,6 @@ members = [
"zrml/styx",
]
resolver = "2"

[patch."https://github.com/purestake/crowdloan-rewards"]
# This patch does ensure that crowdloan-rewards only uses partiytech dependencies.
# If it is not used, the Zeitgeist runtimes will contain duplicate crates from
# different repositories which results in bigger WASM-blobs, binary and the inability
# to compile with the "runtime-benchmarks" feature.
pallet-crowdloan-rewards = { git = "https://github.com/zeitgeistpm/crowdloan-rewards", branch = "polkadot-v0.9.26" }

[patch."https://github.com/purestake/moonbeam"]
# Use dependencies from Paritytech
moonbeam-vrf = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
# Fix author-mapping migration
pallet-author-mapping = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
# Use dependencies from Paritytech
pallet-parachain-staking = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }
session-keys-primitives = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.26" }

[patch."https://github.com/purestake/nimbus"]
# Use dependencies from Paritytech
nimbus-consensus = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
# Use dependencies from Paritytech
nimbus-primitives = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
# Use dependencies from Paritytech
pallet-author-inherent = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }
# Use dependencies from Paritytech
pallet-author-slot-filter = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.26" }

# The list of dependencies below (which can be both direct and indirect dependencies) are crates
# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of
# their debug info might be missing) or to require to be frequently recompiled. We compile these
Expand Down
12 changes: 6 additions & 6 deletions misc/frame_weight_template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ impl<T: frame_system::Config> {{pallet}}::weights::WeightInfo for WeightInfo<T>
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
({{underscore benchmark.base_weight}} as Weight)
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
}
{{/each}}
Expand Down
12 changes: 6 additions & 6 deletions misc/orml_weight_template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ impl<T: frame_system::Config> {{pallet}}::WeightInfo for WeightInfo<T> {
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
({{underscore benchmark.base_weight}} as Weight)
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
}
{{/each}}
Expand Down
12 changes: 6 additions & 6 deletions misc/weight_template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
({{underscore benchmark.base_weight}} as Weight)
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
}
{{/each}}
Expand Down
Loading

0 comments on commit 3e07be6

Please sign in to comment.