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

Liquidity mining benchmark #316

Merged
merged 2 commits into from
Sep 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ subkey generate-node-key --file ~/node-key/bifrost.key

Replace your-fullnode-name
```sh
docker pull bifrostnetwork/bifrost:v0.8.3
docker pull bifrostnetwork/bifrost:latest
docker run -d \
-v ~/node-key:/node-key \
-p 9944:9944 \
-p 9933:9933 \
-p 30333:30333 \
-p 9615:9615 \
bifrostnetwork/bifrost:v0.8.3 \
bifrostnetwork/bifrost:latest \
--name your-fullnode-name \
--base-path "/data" \
--node-key-file "/node-key/bifrost.key" \
Expand All @@ -154,4 +154,4 @@ bifrostnetwork/bifrost:v0.8.3 \
--ws-external \
--rpc-cors all \
--execution wasm
```
```
35 changes: 16 additions & 19 deletions runtime/bifrost/src/weights/bifrost_liquidity_mining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
//! Autogenerated weights for `bifrost_liquidity_mining`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-09-23, STEPS: `50`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2021-09-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-local"), DB CACHE: 128

// Executed Command:
// target/release/bifrost
// benchmark
// --chain=bifrost-local
// --steps=50
// --repeat=1
// --repeat=20
// --pallet=bifrost-liquidity-mining
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --header=./HEADER-GPL3
// --output=./runtime/bifrost/src/weights/bifrost_liquidity_mining
// --output=./runtime/bifrost/src/weights/bifrost_liquidity_mining.rs


#![cfg_attr(rustfmt, rustfmt_skip)]
Expand All @@ -56,62 +56,59 @@ impl<T: frame_system::Config> bifrost_liquidity_mining::WeightInfo for WeightInf
// Storage: System EventCount (r:1 w:1)
// Storage: System Events (r:1 w:1)
fn charge() -> Weight {
(332_610_000 as Weight)
(316_998_000 as Weight)
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
// Storage: LiquidityMining TotalPoolInfos (r:1 w:1)
// Storage: LiquidityMining TotalDepositData (r:1 w:1)
// Storage: Tokens Accounts (r:2 w:2)
// Storage: Tokens Locks (r:2 w:2)
// Storage: Tokens Accounts (r:4 w:4)
// Storage: System Account (r:1 w:1)
// Storage: System Number (r:1 w:0)
// Storage: System ExecutionPhase (r:1 w:0)
// Storage: System EventCount (r:1 w:1)
// Storage: System Events (r:1 w:1)
fn deposit() -> Weight {
(250_610_000 as Weight)
.saturating_add(T::DbWeight::get().reads(10 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
(331_734_000 as Weight)
.saturating_add(T::DbWeight::get().reads(11 as Weight))
.saturating_add(T::DbWeight::get().writes(9 as Weight))
}
// Storage: LiquidityMining TotalPoolInfos (r:1 w:1)
// Storage: System Number (r:1 w:0)
// Storage: LiquidityMining TotalDepositData (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Tokens Accounts (r:4 w:4)
// Storage: Tokens Accounts (r:6 w:6)
// Storage: System ExecutionPhase (r:1 w:0)
// Storage: System EventCount (r:1 w:1)
// Storage: System Events (r:1 w:1)
// Storage: Tokens Locks (r:2 w:2)
fn redeem() -> Weight {
(446_501_000 as Weight)
(509_879_000 as Weight)
.saturating_add(T::DbWeight::get().reads(13 as Weight))
.saturating_add(T::DbWeight::get().writes(11 as Weight))
}
// Storage: LiquidityMining TotalPoolInfos (r:1 w:1)
// Storage: System Number (r:1 w:0)
// Storage: LiquidityMining TotalDepositData (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Tokens Accounts (r:4 w:4)
// Storage: Tokens Accounts (r:6 w:6)
// Storage: System ExecutionPhase (r:1 w:0)
// Storage: System EventCount (r:1 w:1)
// Storage: System Events (r:1 w:1)
// Storage: Tokens Locks (r:2 w:2)
fn redeem_all() -> Weight {
(175_000_000 as Weight)
(508_156_000 as Weight)
.saturating_add(T::DbWeight::get().reads(13 as Weight))
.saturating_add(T::DbWeight::get().writes(11 as Weight))
}
// Storage: LiquidityMining TotalPoolInfos (r:1 w:1)
// Storage: System Number (r:1 w:0)
// Storage: LiquidityMining TotalDepositData (r:2 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Tokens Accounts (r:4 w:4)
// Storage: Tokens Accounts (r:6 w:6)
// Storage: System ExecutionPhase (r:1 w:0)
// Storage: System EventCount (r:1 w:1)
// Storage: System Events (r:1 w:1)
// Storage: Tokens Locks (r:2 w:2)
fn volunteer_to_redeem() -> Weight {
(497_906_000 as Weight)
(553_725_000 as Weight)
.saturating_add(T::DbWeight::get().reads(14 as Weight))
.saturating_add(T::DbWeight::get().writes(11 as Weight))
}
Expand All @@ -124,7 +121,7 @@ impl<T: frame_system::Config> bifrost_liquidity_mining::WeightInfo for WeightInf
// Storage: System EventCount (r:1 w:1)
// Storage: System Events (r:1 w:1)
fn claim() -> Weight {
(299_343_000 as Weight)
(298_725_000 as Weight)
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
Expand Down