paritytech / paritytech/try-runtime-cli

`on-runtime-upgrade` does not run neither `pre_upgrade` nor `post_upgrade` without `--disable-mbm-checks`

オープン
#109 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Rust
スター
25
フォーク
29
PR マージ指標
30日以内にマージされた PR はありません

説明

Neither of the following examples runs those hooks:
--checks=pre-and-post

try-runtime --runtime ./target/release/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.compact.compressed.wasm on-runtime-upgrade --disable-spec-version-check --checks=pre-and-post --blocktime 6000 live --uri wss://westend-bridge-hub-rpc.polkadot.io

nor --checks=all

try-runtime --runtime ./target/release/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.compact.compressed.wasm on-runtime-upgrade --disable-spec-version-check --checks=all --blocktime 6000 live --uri wss://westend-bridge-hub-rpc.polkadot.io

The pre_upgrade nor post_upgrade hooks are only triggered when I add --disable-mbm-checks. It could mean that for MBM migrations we don't check pre_upgrade / post_upgrade - maybe intentional?

But the consequence is that e.g. for polkadot-fellows we just run pre_upgrade / post_upgrade only for Encointer see: https://github.com/polkadot-fellows/runtimes/blob/main/.github/workflows/runtimes-matrix.json#L104.

I think it could be related to the https://github.com/paritytech/try-runtime-cli/blob/main/core/src/commands/on_runtime_upgrade/mod.rs#L135-L139

        let sync_checks = if command.disable_mbm_checks {
            command.checks
        } else {
            UpgradeCheckSelect::None
        };

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

core/src/commands/on_runtime_upgrade/mod.rs の sync_checks の代入付近から始め、--disable-mbm-checks の有無によって --checks=pre-and-post と --checks=all がどのように処理されるかを追跡します。提供された runtime と live URI に対して 2 つのコマンドを再現します。MBM checks について、期待される pre_upgrade と post_upgrade の動作が確立され、検証されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
cli, testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。