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

Polkadot v0.9.37 #1029

Merged
merged 48 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7afdc3c
first try
zqhxuyuan Feb 28, 2023
c4054ef
compile and test ok
zqhxuyuan Mar 1, 2023
8f6e1ce
optimize import
zqhxuyuan Mar 1, 2023
18cba20
add protoc install
zqhxuyuan Mar 1, 2023
5edfa36
add protoc to test
zqhxuyuan Mar 1, 2023
d92b864
add all protoc
zqhxuyuan Mar 1, 2023
f9988c6
disable migration temp
zqhxuyuan Mar 1, 2023
3ef5926
fix try-runtime
zqhxuyuan Mar 6, 2023
8ceb67e
fix try-runtime
zqhxuyuan Mar 6, 2023
3a2d34f
fix runtime benchmarks
zqhxuyuan Mar 6, 2023
fb2c722
fix runtime benchmarks
zqhxuyuan Mar 6, 2023
47e96af
fix xcm benchmarks
zqhxuyuan Mar 6, 2023
79a7cec
merge master
zqhxuyuan Mar 6, 2023
e4e623c
taplo lint fix
zqhxuyuan Mar 6, 2023
551f11c
fix migration
zqhxuyuan Mar 6, 2023
5c4d372
update weight template
zqhxuyuan Mar 8, 2023
eafbcd1
merge master and fix lint use old nightly
zqhxuyuan Mar 8, 2023
977ef57
update polkadot.js api
zqhxuyuan Mar 8, 2023
592ccca
change ExtrinsicBaseWeight
zqhxuyuan Mar 8, 2023
f49ab74
update nimbus benchmark
zqhxuyuan Mar 8, 2023
07a3cde
update nimbus again
zqhxuyuan Mar 8, 2023
f5dcaaa
disable author-inherient benchmark temparary
zqhxuyuan Mar 9, 2023
458fed6
fix rpc test
zqhxuyuan Mar 9, 2023
d2257af
revert rpc port
zqhxuyuan Mar 9, 2023
d5ee1c5
clean
zqhxuyuan Mar 20, 2023
19d77df
Update orml
ghzlatarev Apr 18, 2023
48042c5
Compiles with features
ghzlatarev Apr 20, 2023
25de757
Add protoc in manta integration test ci runner
ghzlatarev Apr 20, 2023
661714d
Fix tests
ghzlatarev Apr 20, 2023
009d6bd
Update calamari weights
ghzlatarev Apr 20, 2023
b554d32
Add dolphin weights
ghzlatarev Apr 20, 2023
8e258f4
fix lint
zqhxuyuan Apr 23, 2023
53af915
Merge remote-tracking branch 'origin' into polkadot-v0.9.37
zqhxuyuan Apr 23, 2023
e13148e
fix clippy
zqhxuyuan Apr 24, 2023
3af4236
Add manta weights
ghzlatarev Apr 24, 2023
b26368a
update to newer 6fa7fe1326ecaab9921c2c3888530ad679cfbb87 commit of po…
Apr 26, 2023
04ce1f6
Use EnsureNever for the assets CreateOrigin
ghzlatarev Apr 26, 2023
3fe1c59
Fix linter
ghzlatarev Apr 26, 2023
7cc6e7f
Update deps as per dependabot
ghzlatarev Apr 26, 2023
5e9de61
update nimbus, reenable author inherent benchmark
Apr 27, 2023
067c63e
Use ensure signed for pallet-assets benchmarking
ghzlatarev Apr 27, 2023
fbe9c79
fix try-runtime
Apr 27, 2023
77788e2
fix nimbus compilation again
Apr 27, 2023
77ce8aa
Merge branch 'manta' into polkadot-v0.9.37
Apr 27, 2023
9933144
Bump manta-rs
ghzlatarev Apr 28, 2023
2dc3ae0
Fix merge conflicts
ghzlatarev May 8, 2023
d0262a4
Fix linters
ghzlatarev May 8, 2023
1a73e4b
Merge branch 'manta' into polkadot-v0.9.37
ferrell-code May 9, 2023
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
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
zqhxuyuan marked this conversation as resolved.
Show resolved Hide resolved
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.
ghzlatarev marked this conversation as resolved.
Show resolved Hide resolved
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