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

Integrate Treasury and Council Pallets with Enhanced Configuration and Benchmarking #716

Merged
merged 100 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f1e3e4a
added preimage pallet
asiniscalchi Aug 6, 2024
d8d1775
added bench and try-runtime
asiniscalchi Aug 6, 2024
a313927
add preimage pallet
asiniscalchi Aug 6, 2024
e483045
runtime version 1802 -> 1803
asiniscalchi Aug 6, 2024
98911e8
back to version 1802
asiniscalchi Aug 7, 2024
225f0ac
initilize the pallet
asiniscalchi Aug 7, 2024
6c7b164
add license
asiniscalchi Aug 7, 2024
a2fc1a4
rollback weights
asiniscalchi Aug 7, 2024
1381084
license
asiniscalchi Aug 7, 2024
655d450
adding council
asiniscalchi Aug 7, 2024
cd77bd1
add pallet collective pallet in toml
asiniscalchi Aug 8, 2024
d9b31df
all settingS
asiniscalchi Aug 8, 2024
12a9932
council compiling
asiniscalchi Aug 8, 2024
82976e5
using locla weights
asiniscalchi Aug 8, 2024
1c2fee5
refactoring
asiniscalchi Aug 8, 2024
d14ba48
fix clippy
asiniscalchi Aug 8, 2024
1d0e9b7
pallet_collective weights
asiniscalchi Aug 8, 2024
63a95e9
init the pallet
asiniscalchi Aug 8, 2024
2ac6a53
fix xompilATION
asiniscalchi Aug 8, 2024
73cf876
add fast mode
asiniscalchi Aug 9, 2024
4f803c6
fast-mode compiles
asiniscalchi Aug 9, 2024
d6ab42e
added treasury with dummy configuration
asiniscalchi Aug 7, 2024
f4b46b5
better settings
asiniscalchi Aug 8, 2024
606854a
fmt
asiniscalchi Aug 8, 2024
fbe0246
Treasury uses Council
asiniscalchi Aug 8, 2024
0070457
added pallet treasury
asiniscalchi Aug 8, 2024
9f6b64d
fix compilation
asiniscalchi Aug 8, 2024
a2336db
refactoring
asiniscalchi Aug 8, 2024
3453306
less collators in zombinet
asiniscalchi Aug 9, 2024
aa8f6bf
test to check the treasury address
asiniscalchi Aug 9, 2024
62a8e6f
fast mode
asiniscalchi Aug 9, 2024
fd696b5
fast-mode compiles
asiniscalchi Aug 9, 2024
439a1d8
first try
asiniscalchi Aug 9, 2024
36e6d98
add election in toml
asiniscalchi Aug 9, 2024
64bd670
some deps
asiniscalchi Aug 9, 2024
af1d0b2
compiling
asiniscalchi Aug 9, 2024
be1b35d
identation
asiniscalchi Aug 12, 2024
cefbe39
refactoring
asiniscalchi Aug 12, 2024
54df68b
using 2 nodes2
asiniscalchi Aug 14, 2024
40d5290
Merge branch 'main' into feature/add_council
asiniscalchi Aug 23, 2024
22f1090
migrations module is a sigle file
asiniscalchi Aug 23, 2024
2f9115c
Merge branch 'feature/add_council' into feature/add_treasury
asiniscalchi Aug 23, 2024
2be8089
compiling
asiniscalchi Aug 23, 2024
49202ad
treasury fix
asiniscalchi Aug 23, 2024
3a1da4b
treasury fix
asiniscalchi Aug 23, 2024
6951fa2
some work on benchmark
asiniscalchi Aug 23, 2024
6768892
weight treasury
asiniscalchi Aug 23, 2024
e5b2d6f
add weights
asiniscalchi Aug 23, 2024
84a726a
compilation fix
asiniscalchi Aug 23, 2024
99aaad1
remove weights
asiniscalchi Aug 26, 2024
11f7e2c
Merge branch 'main' into feature/add_treasury
asiniscalchi Aug 26, 2024
2b1cad4
missing files
asiniscalchi Aug 26, 2024
9f1335f
treasury weigh2t
asiniscalchi Aug 26, 2024
105f1ff
Merge branch 'main' into feature/add_council
asiniscalchi Aug 26, 2024
f66107a
removed commented code
asiniscalchi Aug 27, 2024
e00b94f
Merge branch 'feature/add_council' into feature/add_treasury
asiniscalchi Aug 27, 2024
15423a2
compile council
asiniscalchi Aug 27, 2024
eef8a27
add pallet_collective
asiniscalchi Aug 27, 2024
a83e6d6
add weights
asiniscalchi Aug 27, 2024
48c0665
added councli
asiniscalchi Aug 27, 2024
81690df
colelctibve integrated
asiniscalchi Aug 27, 2024
d4ac88f
Merge branch 'feature/add_treasury' into feature/elections
asiniscalchi Aug 27, 2024
8d4f34b
Merge branch 'feature/elections' of github.com:freeverseio/laos into …
asiniscalchi Aug 27, 2024
7698b81
added dependecy
asiniscalchi Aug 27, 2024
cfc45ec
same time for voting and locking
asiniscalchi Aug 27, 2024
d3c6b12
add council to benchmarks
asiniscalchi Aug 28, 2024
bdeffd1
Merge branch 'feature/add_treasury' into feature/elections
asiniscalchi Aug 28, 2024
0dd7839
duplicate
asiniscalchi Aug 28, 2024
0fd914b
added weights
asiniscalchi Aug 28, 2024
e24aa5e
Loser cnadidate funds to Treasury
asiniscalchi Aug 28, 2024
8791a60
weights
asiniscalchi Aug 28, 2024
9c117ad
just 1 collator in zombienet
asiniscalchi Aug 28, 2024
7d5b75c
memebrs to be elected 7
asiniscalchi Aug 28, 2024
0f7f7d1
number index of pallet
asiniscalchi Aug 28, 2024
7d15828
Merge branch 'feature/add_treasury' into feature/elections
asiniscalchi Aug 28, 2024
05e48f1
compialtion conditional
asiniscalchi Aug 28, 2024
f64ddf6
compialtion conditional
asiniscalchi Aug 28, 2024
076ed82
conditional compilation
asiniscalchi Aug 28, 2024
6a5ab44
Merge branch 'feature/add_treasury' into feature/elections
asiniscalchi Aug 28, 2024
667c1df
fmt
asiniscalchi Aug 28, 2024
269fa10
Merge branch 'feature/add_treasury' into feature/elections
asiniscalchi Aug 28, 2024
e046634
low to 15 minutes
asiniscalchi Aug 28, 2024
1355783
typo
asiniscalchi Aug 28, 2024
4df6b9e
10 mins
asiniscalchi Aug 28, 2024
8d26dad
lint fixes + assign burn to `Permill::zero()`
luispdm Aug 29, 2024
ad04e8f
Review #723 (#751)
magecnion Aug 30, 2024
146f93b
increase e2e timeout
magecnion Aug 30, 2024
64c377d
increase gas price && add logs
luispdm Aug 30, 2024
eec8cc3
update truffle && revert gas price increase
luispdm Aug 30, 2024
dad853a
customize nonce when creating collection when event is emitted; remov…
luispdm Aug 30, 2024
1dc98ee
remove gas limit && add nonce logs
luispdm Aug 30, 2024
fc16558
decrease timeout to 10m
luispdm Aug 30, 2024
4dd8e6a
try inverting order of tests
luispdm Sep 2, 2024
e2503be
remove custom nonce
luispdm Sep 2, 2024
8e2f0df
try with 2 collators
luispdm Sep 2, 2024
799697e
restore order of tests and 3 collators in zombienet
luispdm Sep 2, 2024
1a9c4d7
restore gas limit in create collection tests
luispdm Sep 2, 2024
f991dba
restore timeout
luispdm Sep 2, 2024
4136e17
Merge pull request #723 from freeverseio/feature/elections
luispdm Sep 2, 2024
7783196
Merge remote-tracking branch 'origin' into feature/add_treasury
luispdm Sep 2, 2024
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
3 changes: 3 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch =
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-consensus-aura = { workspace = true }
cumulus-primitives-core = { workspace = true }
parachains-common = { workspace = true }

# EVM
fp-account = { workspace = true, features = ["serde"] }
Expand Down
29 changes: 7 additions & 22 deletions primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,15 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, IdentityFee, Weight};
use frame_support::weights::IdentityFee;
use frame_system::limits;
pub use parachains_common::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
use sp_core::Hasher as HasherT;
use sp_runtime::{
traits::{BlakeTwo256, IdentifyAccount, Verify},
Perbill,
};
use sp_runtime::traits::{BlakeTwo256, IdentifyAccount, Verify};

/// Authority ID used in parachain.
pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;

/// Maximal weight of single LaosParachain block.
///
/// This represents 0.5 seconds of compute assuming a target block time of 12 seconds.
///
/// Max PoV size is set to `5Mb` as all Cumulus-based parachains do.
pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,
);

/// Represents the portion of a block that will be used by Normal extrinsics.
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);

/// Block number type used in Laos chain.
pub type BlockNumber = u32;

Expand Down Expand Up @@ -76,21 +61,21 @@ pub type WeightToFee = IdentityFee<Balance>;

frame_support::parameter_types! {
/// Size limit of the Laos parachain blocks.
pub BlockLength: limits::BlockLength =
pub RuntimeBlockLength: limits::BlockLength =
limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
/// Weight limit of the Laos parachain blocks.
pub BlockWeights: limits::BlockWeights =
pub RuntimeBlockWeights: limits::BlockWeights =
luispdm marked this conversation as resolved.
Show resolved Hide resolved
limits::BlockWeights::with_sensible_defaults(MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO);
}

#[cfg(test)]
mod tests {
use super::*;
use frame_support::dispatch::DispatchClass;
use frame_support::{dispatch::DispatchClass, weights::Weight};

#[test]
fn test_block_weights() {
let weights = BlockWeights::get();
let weights = RuntimeBlockWeights::get();

assert_eq!(weights.base_block, Weight::from_parts(453383000, 0));
assert_eq!(weights.max_block, Weight::from_parts(500000000000, 5242880));
Expand Down
9 changes: 9 additions & 0 deletions runtime/laos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ pallet-message-queue = { workspace = true }
pallet-multisig = { workspace = true }
pallet-session = { workspace = true }
pallet-sudo = { workspace = true }
pallet-treasury = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-collective = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
pallet-vesting = { workspace = true }
Expand Down Expand Up @@ -118,6 +120,7 @@ test-utils = { workspace = true }
ethereum = { workspace = true }

[features]
fast-mode=[]
default = [
"std",
]
Expand All @@ -142,6 +145,8 @@ std = [
"pallet-balances/std",
"pallet-session/std",
"pallet-sudo/std",
"pallet-treasury/std",
"pallet-collective/std",
"pallet-laos-evolution/std",
"pallet-asset-metadata-extender/std",
"pallet-multisig/std",
Expand Down Expand Up @@ -208,8 +213,10 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-laos-evolution/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
Expand Down Expand Up @@ -247,9 +254,11 @@ try-runtime = [
"pallet-balances/try-runtime",
"pallet-session/try-runtime",
"pallet-sudo/try-runtime",
"pallet-collective/try-runtime",
"pallet-laos-evolution/try-runtime",
"pallet-multisig/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-xcm/try-runtime",
"staging-parachain-info/try-runtime",
Expand Down
2 changes: 1 addition & 1 deletion runtime/laos/src/apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl_runtime_apis! {
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
let weight = Executive::try_runtime_upgrade(checks).unwrap();
(weight, laos_primitives::BlockWeights::get().max_block)
(weight, laos_primitives::RuntimeBlockWeights::get().max_block)
}

fn execute_block(
Expand Down
2 changes: 2 additions & 0 deletions runtime/laos/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ frame_benchmarking::define_benchmarks!(
[pallet_vesting, Vesting]
[pallet_message_queue, MessageQueue]
[cumulus_pallet_parachain_system, ParachainSystem]
[pallet_treasury, Treasury]
[pallet_collective, Council]
// TODO pallet_xcm?
);
36 changes: 36 additions & 0 deletions runtime/laos/src/configs/collective_council.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use crate::{weights, AccountId, BlockNumber, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin};
use frame_support::{pallet_prelude::Weight, parameter_types};
use frame_system::EnsureRoot;
use laos_primitives::RuntimeBlockWeights;
#[cfg(not(feature = "fast-mode"))]
use parachains_common::DAYS;
asiniscalchi marked this conversation as resolved.
Show resolved Hide resolved
#[cfg(feature = "fast-mode")]
use parachains_common::MINUTES;
use sp_runtime::Perbill;

#[cfg(feature = "fast-mode")]
pub const COUNCIL_MOTION_DURATION: BlockNumber = 5 * MINUTES;
#[cfg(not(feature = "fast-mode"))]
pub const COUNCIL_MOTION_DURATION: BlockNumber = 7 * DAYS;

parameter_types! {
pub const CouncilMotionDuration: BlockNumber = COUNCIL_MOTION_DURATION;
pub const CouncilMaxProposals: u32 = 7;
pub const CouncilMaxMembers: u32 = 20;
pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block;
pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block;
}

pub type CouncilCollective = pallet_collective::Instance1;
impl pallet_collective::Config<CouncilCollective> for Runtime {
type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote;
type MaxMembers = CouncilMaxMembers;
type MaxProposalWeight = MaxCollectivesProposalWeight;
type MaxProposals = CouncilMaxProposals;
type MotionDuration = CouncilMotionDuration;
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type SetMembersOrigin = EnsureRoot<AccountId>;
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
}
2 changes: 2 additions & 0 deletions runtime/laos/src/configs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mod authorship;
mod balances;
mod base_fee;
mod benchmark;
mod collective_council;
mod cumulus_parachain_system;
mod cumulus_xcmp_queue;
mod ethereum;
Expand All @@ -33,6 +34,7 @@ mod sudo;
pub mod system;
mod timestamp;
mod transaction_payment;
mod treasury;
mod utility;
mod vesting;
pub(crate) mod xcm_config;
Expand Down
4 changes: 2 additions & 2 deletions runtime/laos/src/configs/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ impl frame_system::Config for Runtime {
/// Weight information for the extrinsics of this pallet.
type SystemWeightInfo = ();
/// Block & extrinsics weights: base values and limits.
type BlockWeights = laos_primitives::BlockWeights;
type BlockWeights = laos_primitives::RuntimeBlockWeights;
/// The maximum length of a block (in bytes).
type BlockLength = laos_primitives::BlockLength;
type BlockLength = laos_primitives::RuntimeBlockLength;
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
type SS58Prefix = SS58Prefix;
/// The action to take on a Runtime Upgrade
Expand Down
95 changes: 95 additions & 0 deletions runtime/laos/src/configs/treasury.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
use super::collective_council::CouncilCollective;
use crate::{
currency::UNIT, weights, AccountId, Balance, Balances, BlockNumber, Permill, Runtime,
RuntimeEvent, Treasury,
};
use frame_support::{
parameter_types,
traits::{
tokens::{PayFromAccount, UnityAssetBalanceConversion},
EitherOfDiverse,
},
PalletId,
};
use frame_system::EnsureRoot;
#[cfg(feature = "fast-mode")]
use parachains_common::MINUTES;
#[cfg(not(feature = "fast-mode"))]
use parachains_common::DAYS;
asiniscalchi marked this conversation as resolved.
Show resolved Hide resolved
use sp_runtime::traits::IdentityLookup;

#[cfg(feature = "fast-mode")]
const TREASURY_SPENDING_PERIOD: BlockNumber = 5 * MINUTES;
#[cfg(not(feature = "fast-mode"))]
const TREASURY_SPENDING_PERIOD: BlockNumber = 7 * DAYS;

parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const ProposalBondMinimum: Balance = 100 * UNIT;
pub const SpendPeriod: BlockNumber = TREASURY_SPENDING_PERIOD;
pub const MaxApprovals: u32 = 100;
pub const TreasuryId: PalletId = PalletId(*b"py/trsry");
pub const PayoutPeriod: BlockNumber = 5;
pub TreasuryAccount: AccountId = Treasury::account_id();
}

type ApproveOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 1>,
>;
type RejectOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 2>,
>;

impl pallet_treasury::Config for Runtime {
type AssetKind = ();
type ApproveOrigin = ApproveOrigin;
type BalanceConverter = UnityAssetBalanceConversion;
type Beneficiary = AccountId;
type BeneficiaryLookup = IdentityLookup<Self::Beneficiary>;
type Burn = ();
luispdm marked this conversation as resolved.
Show resolved Hide resolved
type BurnDestination = ();
type Currency = Balances;
type MaxApprovals = MaxApprovals;
type OnSlash = Treasury;
type PalletId = TreasuryId;
type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
type PayoutPeriod = PayoutPeriod;
type ProposalBond = ProposalBond;
type ProposalBondMaximum = ();
type ProposalBondMinimum = ProposalBondMinimum;
type RejectOrigin = RejectOrigin;
type RuntimeEvent = RuntimeEvent;
type SpendFunds = ();
type SpendOrigin = frame_support::traits::NeverEnsureOrigin<Balance>;
type SpendPeriod = SpendPeriod;
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = TreasuryBenchmarkHelper;
}

#[cfg(feature = "runtime-benchmarks")]
pub struct TreasuryBenchmarkHelper;

#[cfg(feature = "runtime-benchmarks")]
impl pallet_treasury::ArgumentsFactory<(), AccountId> for TreasuryBenchmarkHelper {
fn create_asset_kind(_seed: u32) {}

fn create_beneficiary(seed: [u8; 32]) -> AccountId {
AccountId::from(seed)
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn check_trasury_address() {
assert_eq!(
pallet_treasury::Pallet::<Runtime>::account_id().to_string(),
"0x6d6f646C70792f74727372790000000000000000"
);
}
}
4 changes: 2 additions & 2 deletions runtime/laos/src/configs/xcm_message_queue.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{weights, Runtime, RuntimeEvent, XcmpQueue};
use cumulus_primitives_core::AggregateMessageOrigin;
use frame_support::parameter_types;
use laos_primitives::BlockWeights;
use laos_primitives::RuntimeBlockWeights;
use parachains_common::message_queue::NarrowOriginToSibling;
use sp_core::ConstU32;
use sp_runtime::Perbill;
Expand All @@ -14,7 +14,7 @@ parameter_types! {
/// This may be legitimately `None` in the case that you will call
/// `ServiceQueues::service_queues` manually.
pub MessageQueueServiceWeight: Weight =
Perbill::from_percent(25) * BlockWeights::get().max_block;
Perbill::from_percent(25) * RuntimeBlockWeights::get().max_block;
}

impl pallet_message_queue::Config for Runtime {
Expand Down
7 changes: 6 additions & 1 deletion runtime/laos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
pub mod apis;
pub mod configs;
pub mod currency;
mod migrations;
mod precompiles;
mod self_contained_call;
pub mod types;
Expand Down Expand Up @@ -127,6 +128,10 @@ construct_runtime!(
CumulusXcm: cumulus_pallet_xcm = 32,
MessageQueue: pallet_message_queue = 34,

// Governance
Council: pallet_collective::<Instance1> = 40,
magecnion marked this conversation as resolved.
Show resolved Hide resolved
Treasury: pallet_treasury = 41,

// Frontier
Ethereum: pallet_ethereum = 50,
EVM: pallet_evm = 51,
Expand Down Expand Up @@ -163,7 +168,7 @@ type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
migrations::Migrations,
>;

#[cfg(test)]
Expand Down
19 changes: 19 additions & 0 deletions runtime/laos/src/migrations.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2023-2024 Freeverse.io
// This file is part of LAOS.

// LAOS 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.

// LAOS 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 LAOS. If not, see <http://www.gnu.org/licenses/>.

use crate::Runtime;

pub type Migrations = (cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,);
Loading
Loading