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

feat: upgrade to Polkadot v0.9.29 #416

Merged
merged 25 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
34ca624
chore: bump deps
wischli Sep 6, 2022
7160779
wip: migrate pallets and runtimes
wischli Sep 6, 2022
be04423
chore: bump more versions
wischli Sep 6, 2022
a24e19a
wip: fix clients
wischli Sep 6, 2022
2f04b88
fix: runtime tomls
wischli Sep 7, 2022
a18bca5
style: ignore clippy in default weights
wischli Sep 7, 2022
9c48ae3
fix: client pt2
wischli Sep 7, 2022
89ba1e5
fix: runtimes, clippy
wischli Sep 7, 2022
6d6aad3
feat: switch pallet execution order
wischli Sep 7, 2022
a4cb4ed
tests: merge delegation from wf-2168-polkadot-v0.9.28
wischli Sep 7, 2022
1ab83db
Merge remote-tracking branch 'origin/develop' into wf-2020-polkadot-v…
wischli Sep 20, 2022
d542a18
chore: bump deps to polkadot-v0.9.29
wischli Sep 20, 2022
9df8e97
fix: weights 1.5 for new stuff
wischli Sep 21, 2022
36649f6
Merge branch 'develop' into wf-2020-polkadot-v0.9.29
wischli Sep 21, 2022
d45b845
fix: cp mistake
wischli Sep 21, 2022
f49dd24
fix: update weight templates
wischli Sep 22, 2022
134d428
fix: pallet order instruction
wischli Sep 22, 2022
b5e01bd
chore: bump deps
wischli Sep 23, 2022
68056c6
feat: add backported batch fix
wischli Oct 4, 2022
be7c214
Merge remote-tracking branch 'origin/master' into wf-2020-polkadot-v0…
wischli Oct 5, 2022
80bba47
Merge remote-tracking branch 'origin/develop' into wf-2020-polkadot-v…
wischli Oct 5, 2022
909317a
refactor: same serde versions
wischli Oct 5, 2022
6aa4b19
fix: UnitWeightCost type
wischli Oct 5, 2022
061b1ab
fix: CI regex for versions
wischli Oct 5, 2022
2560d7a
fix: remove disable-runtime-api feat
wischli Oct 6, 2022
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
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ build:
refs:
- develop
- master
- /[0-9]+(?:\.[0-9]+){2}(?:-[0-9]+)?$/
- ^/[0-9]+(?:\.[0-9]+){2}(?:-[0-9]+)?$/
variables:
DOCKER_HUB_PARACHAIN: "kiltprotocol/kilt-node"
DOCKER_HUB_STANDALONE: "kiltprotocol/mashnet-node"
Expand All @@ -76,7 +76,7 @@ build-wasm-peregrine:
only:
- develop
- master
- /[0-9]+(?:\.[0-9]+){2}(?:-[0-9]+)?$/
- ^/[0-9]+(?:\.[0-9]+){2}(?:-[0-9]+)?$/
script:
- export PACKAGE=peregrine-runtime
- export RUNTIME_DIR=runtimes/peregrine
Expand All @@ -98,7 +98,7 @@ build-wasm-spiritnet:
only:
- develop
- master
- /[0-9]+(?:\.[0-9]+){2}(?:-[0-9]+)?$/
- ^/[0-9]+(?:\.[0-9]+){2}(?:-[0-9]+)?$/
script:
- export PACKAGE=spiritnet-runtime
- export RUNTIME_DIR=runtimes/spiritnet
Expand Down
18 changes: 9 additions & 9 deletions .maintain/runtime-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,34 @@
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `{{pallet}}`.
/// Weights for `{{pallet}}`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> {{pallet}}::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> WeightInfo<T> {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/each}}
fn {{benchmark.name~}}
pub(crate) fn {{benchmark.name~}}
(
{{~#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}} as u64)
{{#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}} as u64).saturating_mul({{cw.name}} as u64))
{{/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}} as u64))
{{/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}} as u64).saturating_mul({{cr.name}} as u64)))
{{/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}} as u64))
{{/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}} as u64).saturating_mul({{cw.name}} as u64)))
{{/each}}
}
{{/each}}
Expand Down
36 changes: 23 additions & 13 deletions .maintain/weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,39 @@ pub trait WeightInfo {

/// Weights for {{pallet}} using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
{{#if (eq pallet "frame_system")}}
impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
{{else}}
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
{{/if}}
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/each}}
{{#each benchmark.component_ranges as |range|}}
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
{{/each}}
fn {{benchmark.name~}}
(
{{~#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}} as u64)
{{#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}} as u64).saturating_mul({{cw.name}} as u64))
{{/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}} as u64))
{{/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}} as u64).saturating_mul({{cr.name}} as u64)))
{{/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}} as u64))
{{/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}} as u64).saturating_mul({{cw.name}} as u64)))
{{/each}}
}
{{/each}}
Expand All @@ -85,28 +92,31 @@ impl WeightInfo for () {
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/each}}
{{#each benchmark.component_ranges as |range|}}
/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
{{/each}}
fn {{benchmark.name~}}
(
{{~#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}} as u64)
{{#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}} as u64).saturating_mul({{cw.name}} as u64))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
{{/each}}
}
{{/each}}
}
}
Loading