Skip to content

Commit

Permalink
Polkadot v0.9.37 (#1029)
Browse files Browse the repository at this point in the history
* first try

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* compile and test ok

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* optimize import

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* add protoc install

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* add protoc to test

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* add all protoc

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* disable migration temp

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix try-runtime

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix try-runtime

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix runtime benchmarks

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix runtime benchmarks

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix xcm benchmarks

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* taplo lint fix

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix migration

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* update weight template

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* update polkadot.js api

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* change ExtrinsicBaseWeight

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* update nimbus benchmark

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* update nimbus again

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* disable author-inherient benchmark temparary

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix rpc test

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* revert rpc port

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* clean

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* Update orml

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Add protoc in manta integration test ci runner

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Fix tests

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Update calamari weights

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Add dolphin weights

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* fix lint

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* fix clippy

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>

* Add manta weights

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* update to newer 6fa7fe1326ecaab9921c2c3888530ad679cfbb87 commit of polkadot-v0.9.37

Signed-off-by: Adam Reif <Garandor@manta.network>

* Use EnsureNever for the assets CreateOrigin

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Fix linter

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Update deps as per dependabot

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* update nimbus, reenable author inherent benchmark

Signed-off-by: Adam Reif <Garandor@manta.network>

* Use ensure signed for pallet-assets benchmarking

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* fix try-runtime

Signed-off-by: Adam Reif <Garandor@manta.network>

* fix nimbus compilation again

Signed-off-by: Adam Reif <Garandor@manta.network>

* Bump manta-rs

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Fix linters

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

---------

Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: Adam Reif <Garandor@manta.network>
Co-authored-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Co-authored-by: Adam Reif <Garandor@manta.network>
Co-authored-by: ferrell-code <charlie@manta.network>
  • Loading branch information
4 people authored May 9, 2023
1 parent c7b8588 commit b84ad5f
Show file tree
Hide file tree
Showing 168 changed files with 16,759 additions and 13,940 deletions.
120 changes: 64 additions & 56 deletions .github/resources/frame-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,64 +48,72 @@ pub trait WeightInfo {
/// Weights for {{pallet}} using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> {{pallet}}::WeightInfo for SubstrateWeight<T> {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/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)
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
{{/each}}
}
{{/each}}
{{#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 {
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.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}}))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.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}}))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
}
{{/each}}
}

// For backwards compatibility and tests
impl WeightInfo for () {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/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)
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight)))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)))
{{/each}}
}
{{/each}}
{{#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 {
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
Weight::from_ref_time({{underscore benchmark.base_weight}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
{{/each}}
{{#if (ne benchmark.base_writes "0")}}
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
}
{{/each}}
}
12 changes: 6 additions & 6 deletions .github/resources/xcm-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ impl<T: frame_system::Config> 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
6 changes: 6 additions & 0 deletions .github/workflows/check_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down Expand Up @@ -189,6 +192,9 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/integration_test_calamari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ jobs:
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev yarn
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/integration_test_dolphin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ jobs:
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/integration_test_manta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ jobs:
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev yarn
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/metadata_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish_draft_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ jobs:
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_all_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ jobs:
run: sccache --start-server
- name: init rust toolchain
# NOTE: We use nightly Rust only to get nightly fmt & clippy
# TODO: use nightly after https://github.com/clap-rs/clap/issues/4733 fixed.
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install nightly-2023-03-13
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/try-runtime-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ jobs:
run: sccache --start-server
- name: init
run: |
sudo apt update
sudo apt install -y pkg-config libssl-dev protobuf-compiler
protoc --version
curl -s https://sh.rustup.rs -sSf | sh -s -- -y
source ${HOME}/.cargo/env
rustup toolchain install stable
Expand Down
Loading

0 comments on commit b84ad5f

Please sign in to comment.