rust-bitcoin / rust-bitcoin/rust-miniscript

`sanity_check` methods throughout the codebase shouldn't be part of the API

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

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

主要言語
Rust
スター
426
フォーク
200
平均マージ
7日 17時間
マージ済み PR(30日)
8

説明

Actually I'll just file an issue. There are a lot of sanity_check methods in the code, many of which are not called from within the library, and at least one has a doc example suggesting to use it to check "whether all spend paths are accessible in the Bitcoin network".

So we need to re-assess all these functions and see if they can be pulled into the type system somehow so you simply can't create the objects without running the (non-pub) methods.

Originally posted by @apoelstra in https://github.com/rust-bitcoin/rust-miniscript/pull/652#discussion_r1514517762

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

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

はじめの一歩

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

調査の方向性

まず、コードベース全体にある sanity_check メソッドを一覧化し、Bitcoin の支払いパスに関するドキュメント例を含め、リンクされた pull request の議論を確認します。どのメソッドが外部から呼び出し可能で、どの不変条件を代わりに型システムで強制すべきかを判断します。API が不適切なチェックを公開しなくなり、オブジェクトの有効性が一貫して扱われるようになれば完了です。

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

評価

技術スタック
rust
領域
blockchain
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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