Skip to content

Commit

Permalink
remove unused config types
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas committed Apr 3, 2024
1 parent a254a67 commit 3d26834
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 23 deletions.
6 changes: 2 additions & 4 deletions crates/subspace-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const_assert!(solution_range_to_sectors(sectors_to_solution_range(5)) == 5);

parameter_types! {
pub const Version: RuntimeVersion = VERSION;
pub const BlockHashCount: BlockNumber = 2400;
pub const BlockHashCount: BlockNumber = 250;
/// We allow for 2 seconds of compute with a 6 second average block time.
pub SubspaceBlockWeights: BlockWeights = BlockWeights::with_sensible_defaults(BLOCK_WEIGHT_FOR_2_SEC, NORMAL_DISPATCH_RATIO);
/// We allow for 3.75 MiB for `Normal` extrinsic with 5 MiB maximum block length.
Expand Down Expand Up @@ -288,7 +288,7 @@ impl frame_system::Config for Runtime {
/// The ubiquitous origin type.
type RuntimeOrigin = RuntimeOrigin;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
type BlockHashCount = ConstU32<250>;
type BlockHashCount = BlockHashCount;
/// The weight of database operations that the runtime can invoke.
type DbWeight = ParityDbWeight;
/// Version of the runtime.
Expand Down Expand Up @@ -480,7 +480,6 @@ impl pallet_sudo::Config for Runtime {
}

parameter_types! {
pub const RelayConfirmationDepth: BlockNumber = 18;
pub const SelfChainId: ChainId = ChainId::Consensus;
}

Expand Down Expand Up @@ -548,7 +547,6 @@ impl pallet_messenger::Config for Runtime {
}

type Currency = Balances;
type ConfirmationDepth = RelayConfirmationDepth;
type WeightInfo = pallet_messenger::weights::SubstrateWeight<Runtime>;
type WeightToFee = IdentityFee<domain_runtime_primitives::Balance>;
type OnXDMRewards = OnXDMRewards;
Expand Down
2 changes: 0 additions & 2 deletions domains/pallets/messenger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ mod pallet {
type Currency: Mutate<Self::AccountId>
+ InspectHold<Self::AccountId>
+ MutateHold<Self::AccountId>;
/// Confirmation depth for XDM coming from chains.
type ConfirmationDepth: Get<BlockNumberFor<Self>>;
/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
/// Weight to fee conversion.
Expand Down
6 changes: 0 additions & 6 deletions domains/pallets/messenger/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ macro_rules! impl_runtime {
pub const ExistentialDeposit: u64 = 1;
}

parameter_types! {
pub const ConfirmedStateRootsBound: u32 = 2;
pub const RelayerConfirmationDepth: u64 = 2;
}

parameter_types! {
pub SelfChainId: ChainId = $chain_id.into();
pub const ChannelReserveFee: Balance = 10;
Expand All @@ -114,7 +109,6 @@ macro_rules! impl_runtime {
type RuntimeEvent = RuntimeEvent;
type SelfChainId = SelfChainId;
type Currency = Balances;
type ConfirmationDepth = RelayerConfirmationDepth;
type WeightInfo = ();
type WeightToFee = frame_support::weights::IdentityFee<u64>;
type OnXDMRewards = ();
Expand Down
2 changes: 0 additions & 2 deletions domains/runtime/auto-id/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ impl pallet_sudo::Config for Runtime {
}

parameter_types! {
pub const RelayConfirmationDepth: BlockNumber = 18;
pub SelfChainId: ChainId = SelfDomainId::self_domain_id().into();
}

Expand Down Expand Up @@ -382,7 +381,6 @@ impl pallet_messenger::Config for Runtime {
}

type Currency = Balances;
type ConfirmationDepth = RelayConfirmationDepth;
type WeightInfo = pallet_messenger::weights::SubstrateWeight<Runtime>;
type WeightToFee = IdentityFee<Balance>;
type OnXDMRewards = OnXDMRewards;
Expand Down
2 changes: 0 additions & 2 deletions domains/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ impl pallet_sudo::Config for Runtime {
}

parameter_types! {
pub const RelayConfirmationDepth: BlockNumber = 18;
pub SelfChainId: ChainId = SelfDomainId::self_domain_id().into();
}

Expand Down Expand Up @@ -496,7 +495,6 @@ impl pallet_messenger::Config for Runtime {
}

type Currency = Balances;
type ConfirmationDepth = RelayConfirmationDepth;
type WeightInfo = pallet_messenger::weights::SubstrateWeight<Runtime>;
type WeightToFee = IdentityFee<Balance>;
type OnXDMRewards = OnXDMRewards;
Expand Down
3 changes: 0 additions & 3 deletions domains/test/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ impl pallet_sudo::Config for Runtime {
}

parameter_types! {
pub const StateRootsBound: u32 = 50;
pub const RelayConfirmationDepth: BlockNumber = 1;
pub SelfChainId: ChainId = SelfDomainId::self_domain_id().into();
}

Expand Down Expand Up @@ -483,7 +481,6 @@ impl pallet_messenger::Config for Runtime {
}

type Currency = Balances;
type ConfirmationDepth = RelayConfirmationDepth;
type WeightInfo = pallet_messenger::weights::SubstrateWeight<Runtime>;
type WeightToFee = IdentityFee<Balance>;
type OnXDMRewards = OnXDMRewards;
Expand Down
6 changes: 2 additions & 4 deletions test/subspace-test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const MAX_OBJECT_MAPPING_RECURSION_DEPTH: u16 = 5;

parameter_types! {
pub const Version: RuntimeVersion = VERSION;
pub const BlockHashCount: BlockNumber = 2400;
pub const BlockHashCount: BlockNumber = 250;
/// We allow for 2 seconds of compute with a 6 second average block time.
pub SubspaceBlockWeights: BlockWeights = BlockWeights::with_sensible_defaults(BLOCK_WEIGHT_FOR_2_SEC, NORMAL_DISPATCH_RATIO);
/// We allow for 3.75 MiB for `Normal` extrinsic with 5 MiB maximum block length.
Expand Down Expand Up @@ -235,7 +235,7 @@ impl frame_system::Config for Runtime {
/// The ubiquitous origin type.
type RuntimeOrigin = RuntimeOrigin;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
type BlockHashCount = ConstU32<250>;
type BlockHashCount = BlockHashCount;
/// The weight of database operations that the runtime can invoke.
type DbWeight = ParityDbWeight;
/// Version of the runtime.
Expand Down Expand Up @@ -533,7 +533,6 @@ impl pallet_sudo::Config for Runtime {
}

parameter_types! {
pub const RelayConfirmationDepth: BlockNumber = 18;
pub SelfChainId: ChainId = ChainId::Consensus;
}

Expand Down Expand Up @@ -590,7 +589,6 @@ impl pallet_messenger::Config for Runtime {
}

type Currency = Balances;
type ConfirmationDepth = RelayConfirmationDepth;
type WeightInfo = pallet_messenger::weights::SubstrateWeight<Runtime>;
type WeightToFee = IdentityFee<domain_runtime_primitives::Balance>;
type OnXDMRewards = ();
Expand Down

0 comments on commit 3d26834

Please sign in to comment.