Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion PR for contract deletion updates #2409

Merged
Merged
Changes from 3 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
11 changes: 0 additions & 11 deletions parachains/runtimes/contracts/contracts-rococo/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ pub const CONTRACTS_DEBUG_OUTPUT: bool = true;
parameter_types! {
pub const DepositPerItem: Balance = deposit(1, 0);
pub const DepositPerByte: Balance = deposit(0, 1);
// The lazy deletion runs inside on_initialize.
pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *
RuntimeBlockWeights::get().max_block;
// The weight needed for decoding the queue should be less or equal than a fifth
// of the overall weight dedicated to the lazy deletion.
pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get().ref_time() / (
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(1).ref_time() -
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(0).ref_time()
)) / 5) as u32;
pub MySchedule: Schedule<Runtime> = Default::default();
}

Expand All @@ -50,8 +41,6 @@ impl Config for Runtime {
type WeightPrice = pallet_transaction_payment::Pallet<Self>;
type WeightInfo = SubstrateWeight<Self>;
type ChainExtension = ();
type DeletionQueueDepth = DeletionQueueDepth;
type DeletionWeightLimit = DeletionWeightLimit;
type Schedule = MySchedule;
type CallStack = [Frame<Self>; 5];
type AddressGenerator = DefaultAddressGenerator;
Expand Down