Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0dca76b
Anchor `darwinia-v0.11.7`
aurexav Dec 5, 2021
df31613
Bump Denpendencies
aurexav Dec 5, 2021
28c66c2
Anchor `darwinia-v0.11.7`
aurexav Dec 5, 2021
bafedc0
Resolve Dependencies
aurexav Dec 5, 2021
618fa0c
Downgrade `kvdb-rocksdb`
aurexav Dec 5, 2021
5bd28ff
Companion for Substrate#9163
aurexav Dec 5, 2021
691e61b
Companion for Substrate#9090
aurexav Dec 5, 2021
88898fa
Companion for Substrate#9228
aurexav Dec 5, 2021
ac4f96a
Companion for Substrate#9266
aurexav Dec 5, 2021
e30fcdf
Companion for Substrate#9276
aurexav Dec 5, 2021
656edb4
Companion for Substrate#9351
aurexav Dec 5, 2021
22ee908
Companion for Substrate#9367
aurexav Dec 5, 2021
414b724
Companion for Substrate#9384
aurexav Dec 5, 2021
ee19db5
Companion for Substrate#9315
aurexav Dec 5, 2021
7b583b5
Companion for Substrate#9395
aurexav Dec 5, 2021
acbaa65
Bump Ethereum Part.1
aurexav Dec 5, 2021
f97ea81
Companion for Substrate#9411
aurexav Dec 5, 2021
e7ec2b4
Companion for Substrate#9414
aurexav Dec 5, 2021
425e99d
Companion for Substrate#9165
aurexav Dec 5, 2021
87d8c63
Companion for Substrate#9319
aurexav Dec 5, 2021
4a1882c
Companion for Substrate#9502
aurexav Dec 5, 2021
6606935
Companion for Substrate#9471
aurexav Dec 5, 2021
754643f
Companion for Substrate#9514
aurexav Dec 6, 2021
ce718ce
Bump Ethereum Part.2
aurexav Dec 6, 2021
f301584
Bump `ethash`
aurexav Dec 6, 2021
5e56acd
update ethabi usage
xiaoch05 Dec 6, 2021
d6aa2a4
type fix
xiaoch05 Dec 6, 2021
f230257
rmv warning
xiaoch05 Dec 6, 2021
6943a14
Bump Ethereum Part.3
aurexav Dec 6, 2021
9537af9
Bump Ethereum Part.4
aurexav Dec 6, 2021
d50cb46
update kton ethabi
xiaoch05 Dec 6, 2021
5f650e4
Bump Ethereum Part.5
aurexav Dec 6, 2021
2b9d264
Merge commit 'd50cb463e39dae3bdd7f486c5e4413de1f68c87f' into xavier-s…
aurexav Dec 6, 2021
ccbab3a
Bump `kvdb-rocksdb`
aurexav Dec 6, 2021
f7b43d5
Companion for Substrate#9319 Part.2
aurexav Dec 6, 2021
dfb607c
Bump Ethereum Part.6
aurexav Dec 6, 2021
c1a0ae3
Format
aurexav Dec 6, 2021
a1cdf25
Companion for Substrate#9227
aurexav Dec 6, 2021
203b866
Companion for Substrate#9514 Part.2
aurexav Dec 6, 2021
739ee49
Companion for Substrate#9414 Part.2
aurexav Dec 6, 2021
8341f98
Suppress Warning
aurexav Dec 6, 2021
3fbb9d9
Bump Ethereum Part.7
aurexav Dec 6, 2021
61771c7
Companion for Substrate#9491
aurexav Dec 6, 2021
9bf0dc1
Companion for Substrate#9227 Part.2
aurexav Dec 6, 2021
fa0a299
Fix Compile
aurexav Dec 6, 2021
44e4010
Disable Extension for Current Version
aurexav Dec 6, 2021
3768f2b
Fix Compile
aurexav Dec 6, 2021
2befe87
Fix Test
aurexav Dec 6, 2021
8d2ee15
Merge & Fix Compile
aurexav Dec 6, 2021
9480402
Suppress Warning
aurexav Dec 6, 2021
84ebbe0
Fix Test
aurexav Dec 6, 2021
137602f
repair ethabi func
xiaoch05 Dec 6, 2021
9e0c7fe
Fix Test
aurexav Dec 6, 2021
baba7b2
Empty Merge
aurexav Dec 6, 2021
7b976be
Format
aurexav Dec 6, 2021
ca3e110
Update License
aurexav Dec 6, 2021
257c1b2
Use `EthereumBlockV0`
aurexav Dec 7, 2021
572773c
Add TODO
aurexav Dec 7, 2021
193ca9f
Set `constant`
aurexav Dec 7, 2021
4f0eeb3
Try Fix CI
aurexav Dec 7, 2021
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
91 changes: 52 additions & 39 deletions .maintain/frame-weight-template.hbs
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
// This file is part of Substrate.

// Copyright (C) 2020 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// This file is part of Darwinia.
//
// Copyright (C) 2018-2021 Darwinia Network
// SPDX-License-Identifier: GPL-3.0
//
// http://www.apache.org/licenses/LICENSE-2.0
// Darwinia is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Darwinia is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Darwinia. If not, see <https://www.gnu.org/licenses/>.

//! 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}}
//! 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}}

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

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

Expand All @@ -34,69 +36,80 @@ use sp_std::marker::PhantomData;

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

/// 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> {
{{#each benchmarks as |benchmark| ~}}
{{~/if}}
{{~#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| ~}}
{{~#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") ~}}
{{~/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| ~}}
{{~/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") ~}}
{{~/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| ~}}
{{~/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}}
}

// For backwards compatibility and tests
impl WeightInfo for () {
{{#each benchmarks as |benchmark| ~}}
{{~#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| ~}}
{{~#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") ~}}
{{~/each}}
{{~#if (ne benchmark.base_reads "0")}}
.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight))
{{/if}}
{{~#each benchmark.component_reads as |cr| ~}}
{{~/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") ~}}
{{~/each}}
{{~#if (ne benchmark.base_writes "0")}}
.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight))
{{/if}}
{{~#each benchmark.component_writes as |cw| ~}}
{{~/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}}
}
Loading