paritytech / paritytech/try-runtime-cli

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

Đang mở
#109 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Rust
Star
25
Fork
29
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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
        };

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu tại core/src/commands/on_runtime_upgrade/mod.rs, quanh phép gán sync_checks, sau đó theo dõi cách --checks=pre-and-post và --checks=all được xử lý khi có và không có --disable-mbm-checks. Tái hiện hai lệnh với runtime được cung cấp và URI trực tiếp; hoàn tất khi hành vi dự kiến của pre_upgrade và post_upgrade đối với các kiểm tra MBM đã được xác lập và xác minh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
cli, testing
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.