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

malus: add finality_delay cli flag #5770

Merged
merged 7 commits into from
Jul 22, 2022

Conversation

ordian
Copy link
Member

@ordian ordian commented Jul 8, 2022

This allows to pass a --finality-delay X cli param to malus to configure the finality delay.

The ugly part is that it's feature gated with #[cfg(feature = "malus")] in new_full function. However, due to how cargo resolves features, in some packages, malus is enabled when launching from workspace root, but not if individually (e.g. running only adder-collator tests). I'm open to ideas to how avoid that w/o exposing this flag to validators. This param propagates to cumulus unfortunately, not sure if there's a sane way to hide it.

cumulus companion: paritytech/cumulus#1442

@ordian ordian added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Jul 8, 2022
@github-actions github-actions bot added the A3-in_progress Pull request is in progress. No review needed at this stage. label Jul 8, 2022
Copy link
Contributor

@sandreim sandreim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is a good idea to add any malus stuff in the real node. We should add a mechanism that allows us to feed any override into the node from the malus crate.

There is another CLI flag that might help with your testing -

pub grandpa_pause: Vec<u32>,
Does this work ?

ordian added a commit to paritytech/cumulus that referenced this pull request Jul 12, 2022
ordian added a commit to paritytech/cumulus that referenced this pull request Jul 12, 2022
@ordian
Copy link
Member Author

ordian commented Jul 12, 2022

I don't think it is a good idea to add any malus stuff in the real node.

The cli flag is now only available for malus binaries. As an extra protection, it's only activated if malus feature is enabled.

We should add a mechanism that allows us to feed any override into the node from the malus crate.

new_full is already a way to pass this override. Whether we pass a bunch of params or a closure that will take another bunch or params, it doesn't change that. We could create a wrapper for build_full for cumulus and non-malus node that doesn't expose malus-specific flags if that's helpful.

There is another CLI flag that might help with your testing

I'm not sure yet if grandpa_pause will be enough for my use case, but it's less flexible in that only delay finality once (which might make some of the tests more flaky).

@ordian ordian marked this pull request as ready for review July 12, 2022 13:04
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Jul 12, 2022
cli/src/command.rs Show resolved Hide resolved
@ordian ordian changed the title malus: add malus_delay_finality cli flag malus: add finality_delay cli flag Jul 12, 2022
* master:
  westend xcm: collectives parachain is trusted teleporter (#5798)
  Cleanup light client leftovers (#5794)
  Fix benchmarking tests (#5791)
  allow re-use and avoid compiling kusama parachain code (#5792)
  Introduce async runtime calling trait for runtime-api subsystem (#5782)
  add `Extrinsic Ordering` check that runs against a local reference node (#5790)
  Co #11456: Expose `benchmark extrinsic` command (#5620)
  `staking-miner`:  Add handling of `SIGTERM`, `SIGKILL`, `SIGQUIT` and `SIGINT` (#5780)
  Zombienet: paritydb test (#5310)
  Fix Typo (#5766)
  Fix Core Version display in the release notes (#5781)
  companion for new pools reward scheme (#5757)
  fix disable-runtime-api feature flag (#5773)
  split NetworkBridge into two subsystems (#5616)
  Implement prune only stagnant check mode (#5761)
ordian added a commit to paritytech/cumulus that referenced this pull request Jul 22, 2022
ordian added a commit to paritytech/cumulus that referenced this pull request Jul 22, 2022
@ordian
Copy link
Member Author

ordian commented Jul 22, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 7e11707 into master Jul 22, 2022
@paritytech-processbot paritytech-processbot bot deleted the ao-malus-delay-finality branch July 22, 2022 23:24
paritytech-processbot bot pushed a commit to paritytech/cumulus that referenced this pull request Jul 23, 2022
* companion for paritytech/polkadot#5770

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
ordian added a commit that referenced this pull request Jul 28, 2022
* master: (37 commits)
  Backport crate version bumps to 0.9.27 (#5826)
  Fix GHA (#5825)
  [ci] Add timeout to benchmark jobs (#5822)
  Parachains db column "migration" (#5797)
  Companion for #11831 (#5784)
  [ci] Return production image (#5818)
  add migration for staking v10 (#5817)
  Prepare for rust 1.62.1 (#5811)
  Bump strum to 0.24.1 (#5816)
  Bump substrate (#5814)
  Add missing trigger wildcards for some CI workflows (#5812)
  malus: add `finality_delay` cli flag (#5770)
  [ci] publish parachain-implementers-guide (#5806)
  westend xcm: collectives parachain is trusted teleporter (#5798)
  Cleanup light client leftovers (#5794)
  Fix benchmarking tests (#5791)
  allow re-use and avoid compiling kusama parachain code (#5792)
  Introduce async runtime calling trait for runtime-api subsystem (#5782)
  add `Extrinsic Ordering` check that runs against a local reference node (#5790)
  Co #11456: Expose `benchmark extrinsic` command (#5620)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants