mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 02:21:03 +00:00
Use higher priority for PVF preparation in dispute/approval context (#4172)
Related to https://github.com/paritytech/polkadot-sdk/issues/4126 discussion Currently all preparations have same priority and this is not ideal in all cases. This change should improve the finality time in the context of on-demand parachains and when `ExecutorParams` are updated on-chain and a rebuild of all artifacts is required. The desired effect is to speed up approval and dispute PVF executions which require preparation and delay backing executions which require preparation. --------- Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -197,7 +197,7 @@ impl Config {
|
||||
prepare_worker_program_path,
|
||||
prepare_worker_spawn_timeout: Duration::from_secs(3),
|
||||
prepare_workers_soft_max_num: 1,
|
||||
prepare_workers_hard_max_num: 1,
|
||||
prepare_workers_hard_max_num: 2,
|
||||
|
||||
execute_worker_program_path,
|
||||
execute_worker_spawn_timeout: Duration::from_secs(3),
|
||||
|
||||
@@ -14,17 +14,18 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/// A priority assigned to execution of a PVF.
|
||||
/// A priority assigned to preparation of a PVF.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub enum Priority {
|
||||
/// Normal priority for things that do not require immediate response, but still need to be
|
||||
/// done pretty quick.
|
||||
///
|
||||
/// Approvals and disputes fall into this category.
|
||||
/// Backing falls into this category.
|
||||
Normal,
|
||||
/// This priority is used for requests that are required to be processed as soon as possible.
|
||||
///
|
||||
/// For example, backing is on a critical path and requires execution as soon as possible.
|
||||
/// Disputes and approvals are on a critical path and require execution as soon as
|
||||
/// possible to not delay finality.
|
||||
Critical,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user