No digest item for a custom consensus engine
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- blockchain
調査の方向性
core/src/common/empty_block/inherents/providers.rs から始め、特に SmartInherentProvider と 129-140 行付近の digest 構築を確認してください。BABE と AURA がどのように処理されているか、および参照されている検証パスを確認してください。カスタムコンセンサスエンジン ID(SPIN など)が期待される digest item を提供できる、サポートされた方法を確立してテストできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hello! I work on a Substrate-based chain with a custom consensus engine and as suggested in https://github.com/paritytech/try-runtime-cli/blob/b45be7dfce89fd881be27171d3ea114ef19d832c/core/src/common/empty_block/inherents/providers.rs#L96-L98 reporting a case when SmartInherentProvider doesn't work for me.
Currently, providers.rs only accounts for BABE and AURA when constructing the digest for the empty block. In my case for QF Network's blockchain node QuantumFusion-network/qf-solochain we are developing a custom consensus engine called SPIN with its own engine ID SPIN_ENGINE_ID. Because of this there is no slot with the expected engine ID in the empty block and the slot number validation fails during try-runtime usage.
It is easy to add custom engine ID in a fork project like:
// core/src/common/empty_block/inherents/providers.rs#L128
let digest = vec![
DigestItem::PreRuntime(
BABE_ENGINE_ID,
PreDigest::SecondaryPlain(SecondaryPlainPreDigest {
slot,
authority_index: 0,
})
.encode(),
),
DigestItem::PreRuntime(AURA_ENGINE_ID, slot.encode()),
DigestItem::PreRuntime(*b"spin", slot.encode()),
];
But perhaps there are some recommendations on how to properly support custom engine IDs in the digest? Thank you.
- 主要言語
- Rust
- スター
- 25
- フォーク
- 29
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
paritytech/try-runtime-cli のほかの issue
-
try-runtime-cli Crashes Due to OOM (Out-of-Memory) & Long Execution Time – Resolved with 32GB RAM オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
paritytech/try-runtime-cli#119 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
paritytech/try-runtime-cli#118 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
paritytech/try-runtime-cli#111 · コメント 1 件 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
paritytech/try-runtime-cli#110 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
paritytech/try-runtime-cli#109 · コメント 2 件 · リアクション 1 件 ·
paritytech/try-runtime-cli の issue をすべて見る
似ている issue
-
risk:low runtime status:in-progress type:test
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
bevyengine/bevy#25861 ·