Light client module interface for ICS
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 18/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- rust
- 領域
- blockchain
調査の方向性
この issue では、ファイル、テスト、エントリポイントが指定されていません。まず Rust light-client とモジュールインターフェースの抽象化を見つけ、それらを提案されている query、transaction、verification のシグネチャと比較してください。インターフェースとシリアライズ動作について合意され、実装され、適切なテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This issue is a work-in-progress version of the interface for a light client module.
Serialization format
Module programmers will use two types of serialization format.
Let's assume that chain A has light clients of chain B, and chain C. Chain B is using MessagePack to serialize data. Chain C is using ProtoBuf to serialize data. Let's think of verifyChannelState in the light client. The handler module passes the expected ChannelEnd value to the function. So we need a serialization method of how to serialize the ChannelEnd (this is the serialization type 1). To verify the ChannelEnd struct, each light client serializes the ChannelEnd data to each chain's serialization format (MessagePack and ProtoBuf). This is the serialization type 2.
Serialization type 1
We will use JSON.
The handler module will send several types of data to the light client modules. If we use "RLP" for this serialization format, each module's developer should implement decoder of RLP. To reduce the light client developer's work, we (Junha and I) concluded to use JSON format in this case.
If the module system supports a default serialization method of simple struct types, we can use it instead.
Serialization type 2
Each light client must implement each chain's serialize code.
Interface functions
Query
fn query_client_state(client_id: String, block_number: Option<u64>) -> Bytes
fn query_consensus_state(
client_id: String,
counterparty_block_number: u64,
block_number: Option<u64>,
) -> Bytes
Transaction
fn create(id: IdentifierSlice, _consensus_state: Bytes, header: Bytes)
fn update(id: IdentifierSlice, header: Bytes)
Functions can be called from other modules
pub fn query_latest_height(id: IdentifierSlice) -> u64
pub fn verify_connection_state(
client_identifier: IdentifierSlice,
proof_height: BlockNumber,
proof: Bytes,
counterparty_connection_identifier: IdentifierSlice,
connection_end: &ConnectionEnd,
)
fn verify_channel_state(
id: IdentifierSlice,
proof_height: BlockNumber,
proof: Bytes,
port_identifier: IdentifierSlice,
counterparty_channel_identifier: IdentifierSlice,
channel_end: &ChannelEnd,
)
fn verify_packet_data(
id: IdentifierSlice,
proof_height: BlockNumber,
proof: Bytes,
counterparty_port_identifier: IdentifierSlice,
counterparty_channel_identifier: IdentifierSlice,
sequence: &Sequence,
packet_commitment: &PacketCommitment,
)
fn verify_packet_acknowledgment(
id: IdentifierSlice,
proof_height: BlockNumber,
proof: Bytes,
port_identifier: IdentifierSlice,
channel_identifier: IdentifierSlice,
sequence: &Sequence,
acknowledgment: &Acknowledgement,
)
fn verify_packet_acknowledgment_absence(
id: IdentifierSlice,
proof_height: BlockNumber,
proof: Bytes,
port_identifier: IdentifierSlice,
channel_identifier: IdentifierSlice,
sequence: &Sequence,
)
fn verify_next_sequence_recv(
id: IdentifierSlice,
proof_height: BlockNumber,
proof: Bytes,
port_identifier: IdentifierSlice,
channel_identifier: IdentifierSlice,
next_sequence_recv: &Sequence,
)
- 主要言語
- Rust
- スター
- 36
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeChain-io/foundry のほかの issue
-
Remove informerオープン
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
CodeChain-io/foundry#607 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
CodeChain-io/foundry#606 ·
-
Change the return type of execute_transactions to signify it always succeeds再び着手できるかも @dynaxis が 2109 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
CodeChain-io/foundry#605 · リアクション 1 件 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
CodeChain-io/foundry#604 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
CodeChain-io/foundry#603 ·
CodeChain-io/foundry の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
fastrevmd-lab/rustmistmcp#161 ·
-
arch-audit refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
SocketDev/socket-patch#1011 ·
メンテナーはふだん 1 日以内に返信
-
bug user-priority/P2
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
opencode: an unanswered --version probe launches opencode 2 without per-session service isolationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
security-advisory
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MinBZK/regelrecht#1686 ·
メンテナーはふだん 1 日以内に返信