Unify code paths of create_inherent and enter (#7137)

* Remove redundant enter call.

* Remove optionality in dispute signature checking

* Make enter_inner and create_inherent the same.

* Remove redundant metric.

* Unification: enter and create_inherent.

* Remove `enter_inner` function.

* Remove dead code.

* Remove redundant import.

* Remove dead code in disputes.

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

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

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

* Merge fix.

* Fix tests.

* Remove obsolete comment.

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

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

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

* Review remarks, fixes.

* Guide updates.

* Fmt.

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

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: command-bot <>
This commit is contained in:
eskimor
2023-06-14 10:57:06 +02:00
committed by GitHub
parent e71c541ede
commit 596a9ccd02
13 changed files with 676 additions and 1550 deletions
+10 -16
View File
@@ -147,45 +147,39 @@ pub mod metric_definitions {
labels: &["when"],
};
/// Counts the number of bitfields processed in `enter_inner`.
/// Counts the number of bitfields processed in `process_inherent_data`.
pub const PARACHAIN_INHERENT_DATA_BITFIELDS_PROCESSED: CounterDefinition = CounterDefinition {
name: "polkadot_parachain_inherent_data_bitfields_processed",
description: "Counts the number of bitfields processed in `enter_inner`.",
description: "Counts the number of bitfields processed in `process_inherent_data`.",
};
/// Counts the `total`, `sanitized` and `included` number of parachain block candidates
/// in `enter_inner`.
/// in `process_inherent_data`.
pub const PARACHAIN_INHERENT_DATA_CANDIDATES_PROCESSED: CounterVecDefinition =
CounterVecDefinition {
name: "polkadot_parachain_inherent_data_candidates_processed",
description:
"Counts the number of parachain block candidates processed in `enter_inner`.",
"Counts the number of parachain block candidates processed in `process_inherent_data`.",
labels: &["category"],
};
/// Counts the number of `imported`, `current` and `concluded_invalid` dispute statements sets
/// processed in `enter_inner`. The `current` label refers to the disputes statement sets of
/// processed in `process_inherent_data`. The `current` label refers to the disputes statement sets of
/// the current session.
pub const PARACHAIN_INHERENT_DATA_DISPUTE_SETS_PROCESSED: CounterVecDefinition =
CounterVecDefinition {
name: "polkadot_parachain_inherent_data_dispute_sets_processed",
description: "Counts the number of dispute statements sets processed in `enter_inner`.",
description:
"Counts the number of dispute statements sets processed in `process_inherent_data`.",
labels: &["category"],
};
/// Counts the number of dispute statements sets included in a block in `enter_inner`.
pub const PARACHAIN_INHERENT_DATA_DISPUTE_SETS_INCLUDED: CounterDefinition =
CounterDefinition {
name: "polkadot_parachain_inherent_data_dispute_sets_included",
description:
"Counts the number of dispute statements sets included in a block in `enter_inner`.",
};
/// Counts the number of `valid` and `invalid` bitfields signature checked in `enter_inner`.
/// Counts the number of `valid` and `invalid` bitfields signature checked in `process_inherent_data`.
pub const PARACHAIN_CREATE_INHERENT_BITFIELDS_SIGNATURE_CHECKS: CounterVecDefinition =
CounterVecDefinition {
name: "polkadot_parachain_create_inherent_bitfields_signature_checks",
description: "Counts the number of bitfields signature checked in `enter_inner`.",
description:
"Counts the number of bitfields signature checked in `process_inherent_data`.",
labels: &["validity"],
};