paras: dismiss pvf_checking_enabled configuration (#7138)

* paras: unconditionally precheck pvfs

* Update integration tests

* paras_registrar tests

* runtime benchmark tests

* fix bench

* bypass prechecking in test node

* adjust bench

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot runtime_parachains::paras

* ".git/.scripts/commands/bench/bench.sh" runtime kusama runtime_parachains::paras

* ".git/.scripts/commands/bench/bench.sh" runtime rococo runtime_parachains::paras

* ".git/.scripts/commands/bench/bench.sh" runtime westend runtime_parachains::paras

* use test helper

* fix new test

---------

Co-authored-by: command-bot <>
This commit is contained in:
Chris Sosnin
2023-05-08 21:58:55 +03:00
committed by GitHub
parent 580111dd98
commit 9c08536d5f
22 changed files with 716 additions and 464 deletions
+10 -2
View File
@@ -988,6 +988,7 @@ mod benchmarking {
use super::*;
use frame_support::assert_ok;
use frame_system::RawOrigin;
use runtime_parachains::paras;
use sp_runtime::traits::{Bounded, One};
use frame_benchmarking::{account, benchmarks, whitelisted_caller, BenchmarkError};
@@ -1002,7 +1003,7 @@ mod benchmarking {
assert_eq!(event, &system_event);
}
fn register_a_parathread<T: Config>(i: u32) -> (ParaId, T::AccountId) {
fn register_a_parathread<T: Config + paras::Config>(i: u32) -> (ParaId, T::AccountId) {
let para = ParaId::from(i);
let leaser: T::AccountId = account("leaser", i, 0);
T::Currency::make_free_balance_be(&leaser, BalanceOf::<T>::max_value());
@@ -1013,14 +1014,21 @@ mod benchmarking {
leaser.clone(),
para,
worst_head_data,
worst_validation_code
worst_validation_code.clone(),
));
assert_ok!(paras::Pallet::<T>::add_trusted_validation_code(
frame_system::Origin::<T>::Root.into(),
worst_validation_code,
));
T::Registrar::execute_pending_transitions();
(para, leaser)
}
benchmarks! {
where_clause { where T: paras::Config }
force_lease {
// If there is an offset, we need to be on that block to be able to do lease things.
frame_system::Pallet::<T>::set_block_number(T::LeaseOffset::get() + One::one());