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

chore: upgrade to polkadot-v1.1.0 #691

Merged
merged 170 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
445ba54
correct rate limiter Cargo.toml
apopiak Jul 12, 2023
cb275b6
Merge branch 'feat/xcm-defer' into feat/xcm-rate-limiter
apopiak Jul 12, 2023
db44625
bump crate versions
apopiak Jul 12, 2023
79a64a1
Revert "remove xcm rate limiter from runtime"
apopiak Jul 24, 2023
144605e
update xcmp queue pallet
apopiak Jul 24, 2023
673f54e
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak Jul 24, 2023
33828ce
Merge branch 'master' into feat/xcm-rate-limiter
mrq1911 Jul 27, 2023
4d48737
Merge branch 'master' into feat/xcm-rate-limiter
apopiak Jul 28, 2023
353a6c6
Merge branch 'master' into feat/xcm-rate-limiter
mrq1911 Aug 8, 2023
a6ee5de
bump integration tests
dmoka Aug 8, 2023
8797e19
Merge remote-tracking branch 'origin/feat/xcm-rate-limiter' into feat…
dmoka Aug 8, 2023
a931eb0
bump runtime version
dmoka Aug 8, 2023
21f5866
change function order to follow execution orders
dmoka Aug 8, 2023
b743f77
bump patch versions of touched packages
dmoka Aug 8, 2023
c95d0e5
fix xcm rate limiter non deterministic tests as we use different rela…
dmoka Aug 8, 2023
ce57dbb
merge master to feat/xcm-rate-limiter
dmoka Aug 11, 2023
62ecd90
bump versions
dmoka Aug 11, 2023
b33182c
merge master to feat/xcm-rate-limiter
dmoka Aug 14, 2023
04440f3
bump runtime version
dmoka Aug 14, 2023
0671025
bump patch versions for touched packages
dmoka Aug 14, 2023
658b7be
update lock
dmoka Aug 14, 2023
fed4df2
Merge branch 'master' of github.com:galacticcouncil/HydraDX-node into…
apopiak Oct 13, 2023
1f06cf5
initial changes
Roznovjak Oct 15, 2023
505083e
update nft pallet
Roznovjak Oct 16, 2023
0a9fc86
update orml dependencies
Roznovjak Oct 18, 2023
502b082
client update
Roznovjak Oct 19, 2023
54744fe
bump versions
apopiak Oct 20, 2023
c90e469
remove duplicate assert macro definitions
apopiak Oct 20, 2023
0a0682a
update xcmp queue pallet to new extended version
apopiak Oct 20, 2023
ff7c102
update integration tests
apopiak Oct 20, 2023
7a1eaed
formatting
apopiak Oct 20, 2023
2d572ec
update mock files
Roznovjak Oct 20, 2023
948c8ca
additional changes
Roznovjak Oct 26, 2023
5216112
additional changes
Roznovjak Oct 26, 2023
ef38de8
remove unused dependencies
Roznovjak Nov 1, 2023
462371b
fixes
Roznovjak Nov 1, 2023
b1efc31
fix tests
Roznovjak Nov 2, 2023
ed390fb
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 2, 2023
64019b9
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 2, 2023
3cd144f
fix tests
Roznovjak Nov 3, 2023
0180444
add storage migrations
Roznovjak Nov 6, 2023
746b365
formatting
Roznovjak Nov 6, 2023
209c72f
update democracy pallet
Roznovjak Nov 6, 2023
128f14e
update democracy cargo file
Roznovjak Nov 6, 2023
2ea91ba
add missing vec dependency to democracy pallet
Roznovjak Nov 6, 2023
92e34b3
formatting
Roznovjak Nov 6, 2023
c1324e0
skip serializing of PhantomData in pallets
Roznovjak Nov 7, 2023
8e818e8
update crate versions
Roznovjak Nov 7, 2023
948a199
update cumulus to updated xcmp benchmarking version
apopiak Nov 7, 2023
7042d35
update weight templates
Roznovjak Nov 9, 2023
628ea58
fix pallet claims benchmark
Roznovjak Nov 9, 2023
9452117
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 10, 2023
bc2524b
reduce amount of messages per deferred bucket
apopiak Nov 14, 2023
7171ba8
update weight template
apopiak Nov 14, 2023
d38d151
combine proof size and time into one line in the template
apopiak Nov 14, 2023
f17ace5
add storage version to asset registry pallet
Roznovjak Nov 16, 2023
189ac70
use storage version in asset registry pallet
Roznovjak Nov 16, 2023
c8f7f4a
update README
Roznovjak Nov 16, 2023
6ace867
update Makefile
Roznovjak Nov 16, 2023
de617a9
adjust xcmp weights params
apopiak Nov 17, 2023
8195504
adjust max deferred messages
apopiak Nov 17, 2023
a38de08
update xcmp queue
apopiak Nov 17, 2023
0302867
mark params as unused to make clippy happy
apopiak Nov 17, 2023
e3dd35e
add updated xcmp queue weights
apopiak Nov 17, 2023
6ac69c6
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 19, 2023
c44c307
remove commented out lines
Roznovjak Nov 20, 2023
d4c0307
add todos
apopiak Nov 20, 2023
427b8a0
fix the client
Roznovjak Nov 20, 2023
554ff41
fix clippy
Roznovjak Nov 21, 2023
5f064d9
add weight tests for xcm defer and adjust max blocks processed
apopiak Nov 21, 2023
2008b0f
remove commented code
apopiak Nov 21, 2023
c920964
formatting
apopiak Nov 21, 2023
f9fb9f7
fix DCA tests as FEE has been changed, it became chaper with ~20%
dmoka Nov 21, 2023
d6658af
Update frontier git ref
vgantchev Nov 21, 2023
39b992f
fix some integration tests
Roznovjak Nov 21, 2023
cd906ef
fix EVM upgrade
vgantchev Nov 21, 2023
89f9658
fix test for total issuance
dmoka Nov 21, 2023
1243a00
Merge remote-tracking branch 'origin/polkadot-v1.1.0' into polkadot-v…
dmoka Nov 21, 2023
9abbde9
fix non native fee integration test
Roznovjak Nov 21, 2023
b5ca288
formatting
Roznovjak Nov 21, 2023
91ea7a4
remove pallet xcm migration
Roznovjak Nov 22, 2023
b6d37fb
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 24, 2023
475a308
bump crate versions
Roznovjak Nov 24, 2023
25742c4
fix some integration tests
Roznovjak Nov 27, 2023
e0ebb52
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 27, 2023
2e54793
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Nov 28, 2023
e3db2d6
fix pallet-route-executor tests
Roznovjak Nov 28, 2023
c1cd97b
add transfer impl to currencies::Mutate
Roznovjak Nov 28, 2023
0d87ede
fix staking integration tests
Roznovjak Nov 28, 2023
151dc3c
remove commented out lines
Roznovjak Nov 29, 2023
345d82c
bump crate versions
Roznovjak Nov 29, 2023
ed6e7ce
fix integration testnet
Roznovjak Nov 29, 2023
4639569
fix some integration tests
Roznovjak Nov 29, 2023
3dabe52
fix nonnative fee test with onchain routing as onchain-oracle-price i…
dmoka Nov 30, 2023
6793c87
client fix: database opening
Roznovjak Dec 2, 2023
17e3c09
small fixes
Roznovjak Dec 5, 2023
57d2287
add conditional compilation for EVM stuff in transaction multi paymen…
Roznovjak Dec 5, 2023
ec8dcf9
don't use evm feature as default feature in tx multi payment pallet
Roznovjak Dec 5, 2023
e58ecad
revert use of evm feature in adapters crate
Roznovjak Dec 5, 2023
9844934
make pallet-evm optional dependency in tx multi payment pallet
Roznovjak Dec 5, 2023
6300a42
tidy up conditional compilation in tx multi payment pallet
Roznovjak Dec 5, 2023
10bc08d
configurable pool type for default route in route executor pallet
Roznovjak Dec 6, 2023
0bd0ae8
rebenchmark xyk and lbp pallet
Roznovjak Dec 7, 2023
66db772
rebenchmark router pallet
Roznovjak Dec 7, 2023
9eefe5f
simplify router weight method
Roznovjak Dec 7, 2023
c768e36
rebenchmark router pallet
Roznovjak Dec 7, 2023
3015b7d
Fixed pallet-claims tests
martinfridrich Dec 7, 2023
c948e0d
Merge branch 'polkadot-v1.1.0' of github.com:galacticcouncil/HydraDX-…
martinfridrich Dec 7, 2023
7415998
evm stuff
vgantchev Dec 7, 2023
0eeefc1
more evm stuff
vgantchev Dec 7, 2023
2739cfe
fix benchmarking
Roznovjak Dec 7, 2023
87126d1
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Dec 8, 2023
65a46d1
update makefile
Roznovjak Dec 8, 2023
d958f16
configure defer duration
apopiak Dec 8, 2023
544cb4a
bump runtime version
Roznovjak Dec 8, 2023
7e99737
pin orml dependencies
Roznovjak Dec 8, 2023
67235ef
pin dependencies
Roznovjak Dec 8, 2023
8031bea
rebenchmark dca pallet
Roznovjak Dec 8, 2023
a8ea5dd
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Dec 11, 2023
0b797d9
update benchmarking script
Roznovjak Dec 12, 2023
d3ca7a4
fix weight template file
Roznovjak Dec 12, 2023
060bb84
fix stableswap integration tests
Roznovjak Dec 12, 2023
65ab1ce
rebenchmark some pallets
Roznovjak Dec 12, 2023
a2a3556
rebenchmark route executor pallet
Roznovjak Dec 12, 2023
70aad84
rebenchmark dca pallet
Roznovjak Dec 12, 2023
0dd2e7b
formatting
Roznovjak Dec 12, 2023
42d1b15
fix transact call filter integration tests
Roznovjak Dec 13, 2023
3287312
fix dca tests - the fee became smaller due to new polkadot version
dmoka Dec 13, 2023
94828ab
Merge branch 'polkadot-v1.1.0' into apopiak/xcmp-benchmarking
Roznovjak Dec 14, 2023
8c39131
Merge pull request #705 from galacticcouncil/apopiak/xcmp-benchmarking
Roznovjak Dec 14, 2023
d065dca
rebenchmark xcmp queue pallet
Roznovjak Dec 14, 2023
c9c32c9
rebenchmark collator selection pallet
Roznovjak Dec 15, 2023
57e3f46
fix router_execution_sell benchmarks in stablepool and omnipool
Roznovjak Dec 18, 2023
d6c76e6
rebenchmark stableswap and omnipool
Roznovjak Dec 18, 2023
976035a
fix integration test
Roznovjak Dec 18, 2023
2cdb430
update pallet weights
Roznovjak Dec 18, 2023
6c88813
Merge branch 'feat/xcm-rate-limiter' into apopiak/rate-limiter-polkad…
apopiak Dec 22, 2023
c4f8c5c
fix merge issues and tests
apopiak Dec 22, 2023
c3e7610
formatting
apopiak Dec 22, 2023
f5de0ca
bump crate versions
apopiak Dec 22, 2023
bbbe2d4
make clippy happy
apopiak Dec 22, 2023
d77d88b
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Dec 23, 2023
20380ce
Merge branch 'polkadot-v1.1.0' into apopiak/rate-limiter-polkadot-v1-1
Roznovjak Dec 24, 2023
c51a163
add previously removed fn
Roznovjak Dec 25, 2023
f56681e
fix integration tests
Roznovjak Dec 26, 2023
192a887
Merge branch 'polkadot-v1.1.0' into apopiak/rate-limiter-polkadot-v1-1
Roznovjak Dec 26, 2023
947f1b9
Merge pull request #727 from galacticcouncil/apopiak/rate-limiter-pol…
Roznovjak Dec 26, 2023
5727b23
some rebenchmarking + fix failing tests
Roznovjak Dec 27, 2023
e953ec5
bump crate versions
Roznovjak Dec 27, 2023
08384dc
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Jan 2, 2024
f0f0f09
bump versions
Roznovjak Jan 3, 2024
d309caf
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Jan 9, 2024
1eebacc
rebenchmark omnipool and referrals
Roznovjak Jan 9, 2024
74e4acb
fix integration tests
Roznovjak Jan 10, 2024
d6424e3
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Jan 10, 2024
d234c12
formatting
Roznovjak Jan 10, 2024
9d16f6b
bump math crate version
Roznovjak Jan 10, 2024
56de0a3
bump runtime version
Roznovjak Jan 15, 2024
b9e0679
impl functions for storing, loading and modifying TestExternalities
Roznovjak Jan 9, 2024
023f3cd
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Jan 18, 2024
9444d9e
zombienet uses polkadot binary from polkadot-sdk repo
Roznovjak Jan 18, 2024
93c0b87
remove legacy CI inclusion test
Roznovjak Jan 18, 2024
0ed9ad1
CI: don't install unused dependencies
Roznovjak Jan 18, 2024
3f9ffb3
split benchmark test into separate job
Roznovjak Jan 18, 2024
f5cf908
clippy all fixed
Roznovjak Jan 18, 2024
ff27f8f
testing benchmarks again
Roznovjak Jan 18, 2024
e9a6b2c
bump crate versions
Roznovjak Jan 18, 2024
b888cd8
use concrete values for balances config params
Roznovjak Jan 18, 2024
0b857ae
Merge branch 'master' into polkadot-v1.1.0
Roznovjak Jan 19, 2024
3566634
rebenchmark omnipool router execution extrinsics
Roznovjak Jan 19, 2024
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
45 changes: 4 additions & 41 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ jobs:
- run: git describe --tags --abbrev=0
- name: Setup cmake
uses: jwlawson/[email protected]
- name: Install misc dependencies
run: sudo rm /var/lib/dpkg/lock-frontend && sudo rm /var/lib/dpkg/lock && sudo apt-get install -y protobuf-compiler m4
- name: Install Rust
uses: codota/toolchain@00a8bf2bdcfe93aefd70422d3dec07337959d3a4
with:
profile: minimal
- name: Run tests
run: make test
- name: Run clippy
run: make clippy
run: make test-release
- name: Build release
run: time make build
- name: Version info
Expand All @@ -44,44 +40,11 @@ jobs:
with:
name: hydradx_runtime.compact.compressed.wasm
path: target/release/wbuild/hydradx-runtime/hydradx_runtime.compact.compressed.wasm
- name: Run benchmark tests
- name: Clippy
run: make clippy-all
- name: Test benchmarks
run: make test-benchmarks

test-inclusion:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/download-artifact@v2
name: Download node binary
with:
name: hydradx
path: target/release
- uses: robinraju/release-downloader@v1
name: Download relay chain binary
with:
repository: paritytech/polkadot
tag: ${{ env.RELAY_CHAIN_VERSION }}
fileName: polkadot
out-file-path: ../polkadot/target/release
- run: chmod +x ./hydradx && ./hydradx --version
name: HydraDX version
working-directory: target/release
- run: chmod +x ./polkadot && ./polkadot --version
name: Polkadot version
working-directory: ../polkadot/target/release
- uses: actions/setup-node@v2
name: Setup node.js
with:
node-version: '14'
check-latest: true
- run: npm install && npm start
name: Launch rococo local & wait for inclusion
working-directory: scripts/wait-for-inclusion

version-check:
runs-on: ubuntu-latest
permissions:
Expand Down
91 changes: 47 additions & 44 deletions .maintain/pallet-weight-template-no-back.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,66 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for {{pallet}}
//! Autogenerated weights for `{{pallet}}`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
//! DATE: {{date}}, STEPS: {{cmd.steps}}, REPEAT: {{cmd.repeat}}, LOW RANGE: {{cmd.lowest_range_values}}, HIGH RANGE: {{cmd.highest_range_values}}
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
//! WASM-EXECUTION: `{{cmd.wasm_execution}}`, CHAIN: `{{cmd.chain}}`, DB CACHE: {{cmd.db_cache}}

// Executed Command:
{{#each args as |arg|~}}
{{#each args as |arg|}}
// {{arg}}
{{/each}}

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(clippy::unnecessary_cast)]
#![allow(missing_docs)]

use frame_support::{
traits::Get,
weights::{constants::RocksDbWeight, Weight},
};
use sp_std::marker::PhantomData;
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

use {{pallet}}::weights::WeightInfo;

/// Weights for {{pallet}} using the hydraDX node and recommended hardware.
/// Weight functions for `{{pallet}}`.
pub struct HydraWeight<T>(PhantomData<T>);

impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
impl<T: frame_system::Config> {{pallet}}::WeightInfo for HydraWeight<T> {
{{#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}} as u64)
{{~#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.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 u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.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 u64))
{{/if}}
{{~#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
{{/each}}
}
{{/each}}
}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
// Proof Size summary in bytes:
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).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 benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
}
170 changes: 93 additions & 77 deletions .maintain/pallet-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,108 +15,124 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for {{pallet}}
{{header}}
//! Autogenerated weights for `{{pallet}}`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
//! DATE: {{date}}, STEPS: {{cmd.steps}}, REPEAT: {{cmd.repeat}}, LOW RANGE: {{cmd.lowest_range_values}}, HIGH RANGE: {{cmd.highest_range_values}}
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
//! WASM-EXECUTION: `{{cmd.wasm_execution}}`, CHAIN: `{{cmd.chain}}`, DB CACHE: `{{cmd.db_cache}}`

// Executed Command:
{{#each args as |arg|~}}
{{#each args as |arg|}}
// {{arg}}
{{/each}}

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(clippy::unnecessary_cast)]
#![allow(missing_docs)]

use frame_support::{
traits::Get,
weights::{constants::RocksDbWeight, Weight},
};
use sp_std::marker::PhantomData;
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use core::marker::PhantomData;

/// Weight functions needed for {{pallet}}.
/// Weight functions needed for `{{pallet}}`.
pub trait WeightInfo {
{{#each benchmarks as |benchmark|}}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{c.name}}: u32, {{/each~}}
) -> Weight;
{{/each}}
{{#each benchmarks as |benchmark|}}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{c.name}}: u32, {{/each~}}
) -> Weight;
{{/each}}
}

/// Weights for {{pallet}} using the hydraDX node and recommended hardware.
/// Weights for `{{pallet}}` using the HydraDX node and recommended hardware.
pub struct HydraWeight<T>(PhantomData<T>);

{{#if (eq pallet "frame_system")}}
impl<T: crate::Config> WeightInfo for HydraWeight<T> {
{{else}}
impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{/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 {
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
{{~#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.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 u64))
{{/if}}
{{#each benchmark.component_reads as |cr|}}
.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 u64))
{{/if}}
{{~#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
{{/each}}
}
{{/each}}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
// Proof Size summary in bytes:
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
{{/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}}_u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
}

// For backwards compatibility and tests
// For backwards compatibility and tests.
impl WeightInfo for () {
{{#each benchmarks as |benchmark|}}
{{#each benchmark.comments as |comment|}}
// {{comment}}
{{#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}}
fn {{benchmark.name~}}
(
{{~#each benchmark.components as |c| ~}}
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
) -> Weight {
// Proof Size summary in bytes:
// Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
{{#each benchmark.component_weight as |cw|}}
// Standard Error: {{underscore cw.error}}
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
{{/each}}
{{#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
{{/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}}_u64))
{{/if}}
{{#each benchmark.component_writes as |cw|}}
.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
{{/each}}
{{#each benchmark.component_calculated_proof_size as |cp|}}
.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
{{/each}}
}
{{/each}}
}
Loading
Loading