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

Network fee distribution and Incentive Pools #2153

Draft
wants to merge 58 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
979cc54
fee distributionn framework
zqhxuyuan May 23, 2022
5e67844
do_set_rate
zqhxuyuan May 24, 2022
143de0a
xcm fee
zqhxuyuan May 24, 2022
f9fcd8c
income source as paramter
zqhxuyuan May 24, 2022
bac9f23
mandala tx fee to collator
zqhxuyuan May 25, 2022
e93bde1
mandala init genesis fees
zqhxuyuan May 25, 2022
9d27a84
fees mock test
zqhxuyuan May 26, 2022
e82485f
merge master
zqhxuyuan May 27, 2022
8538d0c
dispatch call test
zqhxuyuan May 27, 2022
149a2f5
use PoolPercent as parameters
zqhxuyuan Jun 9, 2022
cede726
fix clippy
zqhxuyuan Jun 9, 2022
74c45c2
check rate
zqhxuyuan Jun 9, 2022
cb22815
tx fee allocation refactor
zqhxuyuan Jun 9, 2022
b034472
fix clippy and genesis use u32 tuple
zqhxuyuan Jun 10, 2022
c98a4cf
fix test
zqhxuyuan Jun 10, 2022
7d81546
rename on_fee_deposit
zqhxuyuan Jun 13, 2022
e6eb9bd
add DealTxFeesWithAccount
zqhxuyuan Jun 13, 2022
6558c9e
extract distribution_fees
zqhxuyuan Jun 13, 2022
eec6dc9
add dex for distribution treasury to incentive
zqhxuyuan Jun 14, 2022
2eb5e13
distribution fee test
zqhxuyuan Jun 14, 2022
388a759
distribut incentive dex test
zqhxuyuan Jun 14, 2022
92eef59
add threshold and Period
zqhxuyuan Jun 14, 2022
9d9faa8
rename to AllocationPeriod
zqhxuyuan Jun 14, 2022
0226b92
Changed Homa momdule's staking reward to go to OnFeeDeposit configure…
Jun 14, 2022
d72d8d5
merge master
zqhxuyuan Jun 14, 2022
2c7211c
update to v0.9.22
zqhxuyuan Jun 14, 2022
94a393f
benchmark
zqhxuyuan Jun 14, 2022
7314463
build_pool_percents helper method
zqhxuyuan Jun 15, 2022
c768270
fix benchmark
zqhxuyuan Jun 15, 2022
2f575ef
move HomaTreasuryPalletId to common
zqhxuyuan Jun 15, 2022
d112816
Acala XcmFeeToTreasury
zqhxuyuan Jun 15, 2022
74e5909
remove AccountId from XcmFeeToTreasury
zqhxuyuan Jun 16, 2022
2973996
merge master and update to v0.9.23
zqhxuyuan Jun 16, 2022
f609940
Changed the interest accumulation so the generated stable currencies …
Jun 16, 2022
cec2f74
xcm fee go to NetworkTreasuryPool instead TreasuryAccount
zqhxuyuan Jun 16, 2022
02b4ff4
Merge branch 'fee_distribution' of ssh://github.com/AcalaNetwork/Acal…
Jun 16, 2022
fc1b802
Pulled from the latest from the branch
Jun 16, 2022
a45260c
Fixed acala integration test build problem
Jun 16, 2022
679a97b
Updated a unit test
Jun 17, 2022
ca5f62c
add some comments
zqhxuyuan Jun 17, 2022
49aa1d6
Merge branch 'fee_distribution' of https://github.com/AcalaNetwork/Ac…
zqhxuyuan Jun 17, 2022
19877f1
dev genesis config to Karura/Acala
zqhxuyuan Jun 20, 2022
e4c4923
FeesConfig
zqhxuyuan Jun 20, 2022
0a4aa80
fix clippy
zqhxuyuan Jun 20, 2022
b2c50f6
Merge remote-tracking branch 'origin/master' into fee_distribution
zqhxuyuan Jun 20, 2022
30122aa
merge master
zqhxuyuan Jun 20, 2022
351a8b5
cargo run --profile production --color=never --bin=acala --features=r…
Jun 20, 2022
af7347a
runtime upgrade
zqhxuyuan Jun 20, 2022
c89715c
Merge branch 'fee_distribution' of https://github.com/AcalaNetwork/Ac…
zqhxuyuan Jun 20, 2022
57444e5
cargo run --profile production --color=never --bin=acala --features=r…
Jun 20, 2022
d79e376
cargo run --profile production --color=never --bin=acala --features=r…
Jun 20, 2022
74b5b6f
Merge remote-tracking branch 'origin/master' into fee_distribution
Jun 20, 2022
8a21a4a
cargo run --release --color=never --bin=acala --features=runtime-benc…
Jun 20, 2022
db24f7e
update runtime WeightInfo
zqhxuyuan Jun 21, 2022
c17c11f
add DistributeTxFees to Karura/Acala
zqhxuyuan Jun 21, 2022
117f791
add post_upgrade assert
zqhxuyuan Jun 21, 2022
d0e6454
Liquidation penalty now goes to OnFeeDeposit, and the same amount of …
Jun 21, 2022
d5707e5
Revert "Liquidation penalty now goes to OnFeeDeposit, and the same am…
Jul 3, 2022
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
Prev Previous commit
Next Next commit
cargo run --profile production --color=never --bin=acala --features=r…
…untime-benchmarks --features=with-mandala-runtime -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=module_fees --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --template=./templates/runtime-weight-template.hbs --output=./runtime/mandala/src/weights/
  • Loading branch information
Acala Benchmarking Bot committed Jun 20, 2022
commit 351a8b58fabc6c34422488f2a87edaca0cde4cb1
74 changes: 74 additions & 0 deletions runtime/mandala/src/weights/module_fees.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// This file is part of Acala.

// Copyright (C) 2020-2022 Acala Foundation.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0

// This program 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.

// This program 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 this program. If not, see <https://www.gnu.org/licenses/>.

//! Autogenerated weights for module_fees
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-06-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
// target/production/acala
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=module_fees
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --template=./templates/runtime-weight-template.hbs
// --output=./runtime/mandala/src/weights/

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

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

/// Weight functions for module_fees.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> module_fees::WeightInfo for WeightInfo<T> {
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Fees IncomeToTreasuries (r:1 w:1)
fn set_income_fee() -> Weight {
(16_072_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Fees TreasuryToIncentives (r:1 w:1)
fn set_treasury_pool() -> Weight {
(16_821_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Fees TreasuryTokens (r:1 w:0)
// Storage: Fees TreasuryToIncentives (r:1 w:0)
// Storage: System Account (r:2 w:2)
// Storage: EvmAccounts EvmAddresses (r:1 w:0)
fn force_transfer_to_incentive() -> Weight {
(47_115_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
}