Skip to content

Commit aec2fe8

Browse files
authored
Bifrost V0.8.3 (#246)
* allow transfer of all tokens except native token * bump version to 0.8.3 * enable transaction payment * update benchmark * Disable election
1 parent 75c568c commit aec2fe8

6 files changed

Lines changed: 30 additions & 32 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "node-cli"
3-
version = "0.8.2"
3+
version = "0.8.3"
44
authors = ["Liebi Technologies <bifrost@liebi.com>"]
55
description = "Bifrost Parachain Node"
66
build = "build.rs"

node/service/src/chain_spec/bifrost.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn bifrost_genesis(
6767
council_membership: Default::default(),
6868
technical_membership: Default::default(),
6969
treasury: Default::default(),
70-
elections: Default::default(),
70+
phragmen_election: Default::default(),
7171
sudo: SudoConfig { key: root_key.clone() },
7272
parachain_info: ParachainInfoConfig { parachain_id: id },
7373
collator_selection: CollatorSelectionConfig {

runtime/bifrost/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
110110
spec_name: create_runtime_str!("bifrost"),
111111
impl_name: create_runtime_str!("bifrost"),
112112
authoring_version: 1,
113-
spec_version: 802,
113+
spec_version: 803,
114114
impl_version: 0,
115115
apis: RUNTIME_API_VERSIONS,
116116
transaction_version: 1,
@@ -164,7 +164,8 @@ impl Filter<Call> for CallFilter {
164164
Call::Balances(_) => false,
165165
Call::Vesting(_) => false,
166166
Call::Tokens(_) => false,
167-
Call::Currencies(_) => false,
167+
Call::PhragmenElection(_) => false,
168+
Call::Currencies(orml_currencies::Call::transfer_native_currency(..)) => false,
168169
_ => true,
169170
}
170171
}
@@ -451,8 +452,7 @@ impl pallet_democracy::Config for Runtime {
451452
type PreimageByteDeposit = PreimageByteDeposit;
452453
type Proposal = Call;
453454
type Scheduler = Scheduler;
454-
// NOTE: Treasury replaced by `()`.
455-
type Slash = ();
455+
type Slash = Treasury;
456456
// Any single technical committee member may veto a coming council proposal, however they can
457457
// only do it once and it lasts only for the cool-off period.
458458
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
@@ -521,7 +521,7 @@ impl pallet_tips::Config for Runtime {
521521
type TipCountdown = TipCountdown;
522522
type TipFindersFee = TipFindersFee;
523523
type TipReportDepositBase = TipReportDepositBase;
524-
type Tippers = Elections;
524+
type Tippers = PhragmenElection;
525525
type WeightInfo = pallet_tips::weights::SubstrateWeight<Runtime>;
526526
}
527527

@@ -874,7 +874,7 @@ construct_runtime! {
874874
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
875875
Council: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 31,
876876
TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 32,
877-
Elections: pallet_elections_phragmen::{Pallet, Call, Storage, Event<T>, Config<T>} = 33,
877+
PhragmenElection: pallet_elections_phragmen::{Pallet, Call, Storage, Event<T>, Config<T>} = 33,
878878
CouncilMembership: pallet_membership::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 34,
879879
TechnicalMembership: pallet_membership::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 35,
880880

@@ -938,7 +938,7 @@ pub type SignedExtra = (
938938
frame_system::CheckEra<Runtime>,
939939
frame_system::CheckNonce<Runtime>,
940940
frame_system::CheckWeight<Runtime>,
941-
// pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
941+
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
942942
);
943943
/// Unchecked extrinsic type as expected by this runtime.
944944
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;

runtime/bifrost/src/weights/bifrost_flexible_fee.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
//! Autogenerated weights for bifrost_flexible_fee
2020
//!
2121
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
22-
//! DATE: 2021-08-11, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
23-
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asgard-local"), DB CACHE: 128
22+
//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
23+
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128
2424
2525
// Executed Command:
2626
// target/release/bifrost
2727
// benchmark
28-
// --chain=asgard-local
28+
// --chain=bifrost-genesis
2929
// --steps=50
3030
// --repeat=20
3131
// --pallet=bifrost_flexible_fee
@@ -34,7 +34,7 @@
3434
// --wasm-execution=compiled
3535
// --heap-pages=4096
3636
// --header=./HEADER-GPL3
37-
// --output=./runtime/asgard/src/weights/bifrost_flexible_fee.rs
37+
// --output=./runtime/bifrost/src/weights/
3838

3939
#![allow(unused_parens)]
4040
#![allow(unused_imports)]
@@ -46,8 +46,6 @@ use sp_std::marker::PhantomData;
4646
pub struct WeightInfo<T>(PhantomData<T>);
4747
impl<T: frame_system::Config> bifrost_flexible_fee::WeightInfo for WeightInfo<T> {
4848
fn set_user_fee_charge_order() -> Weight {
49-
(6_081_000 as Weight)
50-
.saturating_add(T::DbWeight::get().writes(1 as Weight))
51-
.saturating_add(T::DbWeight::get().writes(1 as Weight))
49+
(8_034_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
5250
}
5351
}

runtime/bifrost/src/weights/frame_system.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
//! Autogenerated weights for frame_system
2020
//!
2121
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
22-
//! DATE: 2021-08-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
22+
//! DATE: 2021-08-23, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
2323
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bifrost-genesis"), DB CACHE: 128
2424
2525
// Executed Command:
26-
// target/debug/bifrost
26+
// target/release/bifrost
2727
// benchmark
2828
// --chain=bifrost-genesis
2929
// --steps=50
@@ -46,39 +46,39 @@ use sp_std::marker::PhantomData;
4646
pub struct WeightInfo<T>(PhantomData<T>);
4747
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
4848
fn remark(_b: u32) -> Weight {
49-
(51_052_000 as Weight)
49+
(3_385_000 as Weight)
5050
}
5151
fn remark_with_event(b: u32) -> Weight {
52-
(1_623_480_000 as Weight)
52+
(68_651_000 as Weight)
5353
// Standard Error: 0
5454
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
5555
.saturating_add(T::DbWeight::get().reads(4 as Weight))
5656
.saturating_add(T::DbWeight::get().writes(2 as Weight))
5757
}
5858
fn set_heap_pages() -> Weight {
59-
(73_328_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
59+
(4_193_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
6060
}
6161
fn set_changes_trie_config() -> Weight {
62-
(373_044_000 as Weight)
62+
(22_114_000 as Weight)
6363
.saturating_add(T::DbWeight::get().reads(1 as Weight))
6464
.saturating_add(T::DbWeight::get().writes(2 as Weight))
6565
}
6666
fn set_storage(i: u32) -> Weight {
67-
(358_763_000 as Weight)
68-
// Standard Error: 311_000
69-
.saturating_add((27_904_000 as Weight).saturating_mul(i as Weight))
67+
(0 as Weight)
68+
// Standard Error: 0
69+
.saturating_add((971_000 as Weight).saturating_mul(i as Weight))
7070
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
7171
}
7272
fn kill_storage(i: u32) -> Weight {
73-
(0 as Weight)
74-
// Standard Error: 242_000
75-
.saturating_add((24_201_000 as Weight).saturating_mul(i as Weight))
73+
(779_000 as Weight)
74+
// Standard Error: 1_000
75+
.saturating_add((826_000 as Weight).saturating_mul(i as Weight))
7676
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
7777
}
7878
fn kill_prefix(p: u32) -> Weight {
79-
(1_234_472_000 as Weight)
80-
// Standard Error: 531_000
81-
.saturating_add((45_655_000 as Weight).saturating_mul(p as Weight))
79+
(14_414_000 as Weight)
80+
// Standard Error: 4_000
81+
.saturating_add((3_271_000 as Weight).saturating_mul(p as Weight))
8282
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
8383
}
8484
}

0 commit comments

Comments
 (0)