Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
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
342 changes: 171 additions & 171 deletions Cargo.lock

Large diffs are not rendered by default.

23 changes: 20 additions & 3 deletions node/core/pvf/src/executor_intf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use sc_executor_common::{
};
use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics};
use sp_core::storage::{ChildInfo, TrackedStorageKey};
use sp_externalities::MultiRemovalResults;
use std::{
any::{Any, TypeId},
path::Path,
Expand Down Expand Up @@ -160,15 +161,31 @@ impl sp_externalities::Externalities for ValidationExternalities {
panic!("child_storage: unsupported feature for parachain validation")
}

fn kill_child_storage(&mut self, _: &ChildInfo, _: Option<u32>) -> (bool, u32) {
fn kill_child_storage(
&mut self,
_child_info: &ChildInfo,
_maybe_limit: Option<u32>,
_maybe_cursor: Option<&[u8]>,
) -> MultiRemovalResults {
panic!("kill_child_storage: unsupported feature for parachain validation")
}

fn clear_prefix(&mut self, _: &[u8], _: Option<u32>) -> (bool, u32) {
fn clear_prefix(
&mut self,
_prefix: &[u8],
_maybe_limit: Option<u32>,
_maybe_cursor: Option<&[u8]>,
) -> MultiRemovalResults {
panic!("clear_prefix: unsupported feature for parachain validation")
}

fn clear_child_prefix(&mut self, _: &ChildInfo, _: &[u8], _: Option<u32>) -> (bool, u32) {
fn clear_child_prefix(
&mut self,
_child_info: &ChildInfo,
_prefix: &[u8],
_maybe_limit: Option<u32>,
_maybe_cursor: Option<&[u8]>,
) -> MultiRemovalResults {
panic!("clear_child_prefix: unsupported feature for parachain validation")
}

Expand Down
2 changes: 2 additions & 0 deletions runtime/common/src/auctions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ pub mod pallet {
for ((bidder, _), amount) in ReservedAmounts::<T>::drain() {
CurrencyOf::<T>::unreserve(&bidder, amount);
}
#[allow(deprecated)]
Winning::<T>::remove_all(None);
AuctionInfo::<T>::kill();
Ok(())
Expand Down Expand Up @@ -557,6 +558,7 @@ impl<T: Config> Pallet<T> {
.unwrap_or([Self::EMPTY; SlotRange::SLOT_RANGE_COUNT]);
// This `remove_all` statement should remove at most `EndingPeriod` / `SampleLength` items,
// which should be bounded and sensibly configured in the runtime.
#[allow(deprecated)]
Winning::<T>::remove_all(None);
AuctionInfo::<T>::kill();
return Some((res, lease_period_index))
Expand Down
1 change: 1 addition & 0 deletions runtime/common/src/crowdloan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ impl<T: Config> Pallet<T> {
}

pub fn crowdloan_kill(index: FundIndex) -> child::KillStorageResult {
#[allow(deprecated)]
child::kill_storage(&Self::id_from_index(index), Some(T::RemoveKeysLimit::get()))
}

Expand Down
5 changes: 5 additions & 0 deletions runtime/common/src/purchase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,15 @@ pub fn remove_pallet<T>() -> frame_support::weights::Weight
where
T: frame_system::Config,
{
#[allow(deprecated)]
use frame_support::migration::remove_storage_prefix;
#[allow(deprecated)]
remove_storage_prefix(b"Purchase", b"Accounts", b"");
#[allow(deprecated)]
remove_storage_prefix(b"Purchase", b"PaymentAccount", b"");
#[allow(deprecated)]
remove_storage_prefix(b"Purchase", b"Statement", b"");
#[allow(deprecated)]
remove_storage_prefix(b"Purchase", b"UnlockBlock", b"");

<T as frame_system::Config>::BlockWeights::get().max_block
Expand Down
2 changes: 2 additions & 0 deletions runtime/parachains/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,9 @@ impl<T: paras_inherent::Config> BenchBuilder<T> {
pub(crate) fn build(self) -> Bench<T> {
// Make sure relevant storage is cleared. This is just to get the asserts to work when
// running tests because it seems the storage is not cleared in between.
#[allow(deprecated)]
inclusion::PendingAvailabilityCommitments::<T>::remove_all(None);
#[allow(deprecated)]
inclusion::PendingAvailability::<T>::remove_all(None);

// We don't allow a core to have both disputes and be marked fully available at this block.
Expand Down
2 changes: 2 additions & 0 deletions runtime/parachains/src/disputes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,12 @@ impl<T: Config> Pallet<T> {

for to_prune in to_prune {
// This should be small, as disputes are rare, so `None` is fine.
#[allow(deprecated)]
<Disputes<T>>::remove_prefix(to_prune, None);

// This is larger, and will be extracted to the `shared` pallet for more proper pruning.
// TODO: https://github.com/paritytech/polkadot/issues/3469
#[allow(deprecated)]
<Included<T>>::remove_prefix(to_prune, None);
SpamSlots::<T>::remove(to_prune);
}
Expand Down
2 changes: 2 additions & 0 deletions runtime/parachains/src/inclusion/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ fn bitfield_checks() {
);

// clean up
#[allow(deprecated)]
PendingAvailability::<Test>::remove_all(None);
}

Expand Down Expand Up @@ -574,6 +575,7 @@ fn bitfield_checks() {
0
);

#[allow(deprecated)]
PendingAvailability::<Test>::remove_all(None);
}

Expand Down