Skip to content
Open
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bifrost-cli"
version = "0.25.0"
version = "0.25.2"
authors.workspace = true
description = "Bifrost Parachain Node"
build = "build.rs"
Expand Down
38 changes: 3 additions & 35 deletions node/service/src/chain_spec/bifrost_kusama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@

use crate::chain_spec::{get_account_id_from_seed, get_from_seed, RelayExtensions};
use bifrost_kusama_runtime::{
AccountId, Balance, BalancesConfig, BlockNumber, InflationInfo, Range, SS58Prefix,
VestingConfig,
AccountId, Balance, BalancesConfig, BlockNumber, SS58Prefix, VestingConfig,
};
use bifrost_primitives::{
BifrostKusamaChainId, CurrencyId, CurrencyId::*, TokenInfo, TokenSymbol::*,
};
use bifrost_runtime_common::bridge_xcm_helper::DEFAULT_XCM_FEES_IK_PERSPECTIVE;
use bifrost_runtime_common::{constants::currency::DOLLARS, constants::time::HOURS, AuraId};
use bifrost_runtime_common::{constants::currency::DOLLARS, AuraId};
use cumulus_primitives_core::ParaId;
use frame_benchmarking::{account, whitelisted_caller};
use hex_literal::hex;
Expand All @@ -34,7 +33,7 @@ use sc_service::ChainType;
use serde::de::DeserializeOwned;
use serde_json as json;
use sp_core::{crypto::UncheckedInto, sr25519};
use sp_runtime::{traits::Zero, Perbill};
use sp_runtime::traits::Zero;
use std::{
collections::BTreeMap,
fs::{read_dir, File},
Expand All @@ -51,37 +50,6 @@ pub fn ENDOWMENT() -> u128 {
1_000_000 * DOLLARS
}

const BLOCKS_PER_ROUND: u32 = 2 * HOURS;

pub fn inflation_config() -> InflationInfo<Balance> {
fn to_round_inflation(annual: Range<Perbill>) -> Range<Perbill> {
use bifrost_parachain_staking::inflation::{
perbill_annual_to_perbill_round, BLOCKS_PER_YEAR,
};
perbill_annual_to_perbill_round(
annual,
// rounds per year
BLOCKS_PER_YEAR / BLOCKS_PER_ROUND,
)
}
let annual = Range {
min: Perbill::from_percent(4),
ideal: Perbill::from_percent(5),
max: Perbill::from_percent(5),
};
InflationInfo {
// staking expectations
expect: Range {
min: 100_000 * DOLLARS,
ideal: 200_000 * DOLLARS,
max: 500_000 * DOLLARS,
},
// annual inflation
annual,
round: to_round_inflation(annual),
}
}

fn bifrost_kusama_properties() -> Properties {
let mut properties = Properties::new();
let mut token_symbol: Vec<String> = vec![];
Expand Down
20 changes: 10 additions & 10 deletions pallets/asset-registry/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! Autogenerated weights for bifrost_asset_registry
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0
//! DATE: 2026-06-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2026-07-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `vps-b02dace3`, CPU: `Intel Core Processor (Haswell, no TSX)`
//! WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-kusama-local"), DB CACHE: 1024

Expand Down Expand Up @@ -70,8 +70,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `337`
// Estimated: `3802`
// Minimum execution time: 40_021_000 picoseconds.
Weight::from_parts(41_052_000, 3802)
// Minimum execution time: 39_152_000 picoseconds.
Weight::from_parts(43_668_000, 3802)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
Expand All @@ -81,8 +81,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `424`
// Estimated: `6364`
// Minimum execution time: 45_479_000 picoseconds.
Weight::from_parts(48_179_000, 6364)
// Minimum execution time: 45_184_000 picoseconds.
Weight::from_parts(48_011_000, 6364)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -98,7 +98,7 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `414`
// Estimated: `3879`
// Minimum execution time: 48_146_000 picoseconds.
// Minimum execution time: 48_502_000 picoseconds.
Weight::from_parts(50_307_000, 3879)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
Expand All @@ -115,8 +115,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `414`
// Estimated: `3879`
// Minimum execution time: 45_421_000 picoseconds.
Weight::from_parts(47_490_000, 3879)
// Minimum execution time: 44_355_000 picoseconds.
Weight::from_parts(58_884_000, 3879)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
Expand All @@ -126,8 +126,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `409`
// Estimated: `3874`
// Minimum execution time: 38_928_000 picoseconds.
Weight::from_parts(40_647_000, 3874)
// Minimum execution time: 39_552_000 picoseconds.
Weight::from_parts(41_790_000, 3874)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand Down
39 changes: 29 additions & 10 deletions pallets/bb-bnc/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,26 @@ mod benchmarks {
BalanceOf::<T>::unique_saturated_from(100_000_000_000_000_u128),
)?;

T::MultiCurrency::mint_into(
CurrencyId::Native(TokenSymbol::BNC),
&test_account,
BalanceOf::<T>::unique_saturated_from(900_000_000_000_000_u128),
)?;

T::MultiCurrency::mint_into(
CurrencyId::VToken(TokenSymbol::BNC),
&test_account,
BalanceOf::<T>::unique_saturated_from(900_000_000_000_000_u128),
)?;

let issuance_adjustment: i128 =
<T::MultiCurrency as frame_support::traits::fungibles::Inspect<T::AccountId>>::total_issuance(CurrencyId::VToken(TokenSymbol::BNC))
.unique_saturated_into();
assert_ok!(T::VtokenMinting::set_v_currency_issuance(
CurrencyId::VToken(TokenSymbol::BNC),
issuance_adjustment,
));

let rewards = vec![CurrencyId::Native(TokenSymbol::BNC)];

assert_ok!(BbBNC::<T>::notify_rewards(
Expand All @@ -293,19 +313,18 @@ mod benchmarks {
rewards
));

assert_ok!(BbBNC::<T>::create_lock(
RawOrigin::Signed(test_account.clone()).into(),
BalanceOf::<T>::unique_saturated_from(10_000_000_000_000_u128),
(365 * 86400 / 12u32).into()
));
for _ in 0..T::MaxPositions::get() {
assert_ok!(BbBNC::<T>::create_lock(
RawOrigin::Signed(test_account.clone()).into(),
BalanceOf::<T>::unique_saturated_from(10_000_000_000_000_u128),
(7 * 86400 / 12u32).into()
));
}

<frame_system::Pallet<T>>::set_block_number((2 * 365 * 86400 / 12u32).into());
<frame_system::Pallet<T>>::set_block_number((14 * 86400 / 12u32).into());

#[extrinsic_call]
_(
RawOrigin::Signed(test_account),
ClaimOption::CreatePosition { lock_months: 12 },
);
_(RawOrigin::Signed(test_account), ClaimOption::DirectBnc);

Ok(())
}
Expand Down
Loading
Loading