New Unixfs implementations
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- go
調査の方向性
まず、提案されている中間層 blocks.Block と unixfs.proto および dag-pb.proto の形式を確認し、次に io.Reader ベースの順序付き CAR ストリームがどのように表現されるかを追跡します。issue には複数の実装候補が挙げられていますが、リポジトリのファイルやテストは指定されていないため、作業を開始する前にスコープと完了基準を合意する必要があります。
索引モデルが issue の本文から書いたものです。
説明
Dedicated unixfs implementations are often much more performant and efficient.
See for example two of mines:
- https://github.com/Jorropo/linux2ipfs (blazingly fast file adder / fastest
ipfs addimplementation that exists) - https://github.com/Jorropo/go-featheripfs (high performance very high efficiency ordered car ->
io.Readerfile with incremental verification and data streaming)
I think it is more sustainable to maintain a handful of dedicated implementations that individually do one job well (something like feather and something that would maintain state to support unordered dags are really different).
Unified middle layer
The way I have been writing my implementations is by jugling bytes unixfs.proto and dag-pb.proto by hand everywhere.
This is kinda meh looking because of all the little details that have to be checked.
I really think we need some efficient middle layer that takes in blocks.Block parse them, do sanity checks and return some representation that looks like internal unixfs (so one node per block, and full support for all schenanigans you would want to do but with error checking):
package unixfs
type Type uint8
const (
_ Type = iota
Directory
File
Metadata
Symlink
HAMTShard
)
type Node struct{
Type Type
Data []byte // for files
Entries []Entry
DagSize uint64
HashType uint64 // for HAMT dirs
Fanout uint64 // for HAMT dirs
}
type Entry struct{
Link
Name string // for directories
}
type Link struct{
Type Type // Indicative, not actually
Cid cid.Cid
FileSize uint64 // for files
DagSize uint64
}
func (*Node) UnmarshalIPFS(blocks.Block) error
func (*Node) MarshalIPFS() (blocks.Block, error)
func (*Node) Encode() (Link, blocks.Block, error)
// File operations
func (*Node) ParseFile(Link, blocks.Block) error
func (*Node) AddFileSegments(Link...) error
func (*Node) FileSize() uint64
// Directory operations
func (*Node) ParseDirectory(Link, blocks.Block) error
func (*Node) AddChildrenNode(Link...) error
// other types ...
This would not includes helper functions for more advanced stuff like HAMT, chunking, ... we will most likely need thoses too but the goal here is to provide a thin wrapper around the protobuf that add the repetitive input validation.
Impls
List of implementations we need:
- Efficient state-light streaming decoder with incremental verification. (I'll probably use feather after refactoring it to use the unified lower layer and adding the missing features)
The goal is to incremental verify ordered.carfiles from saturn on the cheap resource wise. (and other ordered blocks sources)- Capable of streaming the verification of an ordered stream of block (such as a car file red from
io.Reader) incrementally (while streaming the result out). - Interface must implement
io.Readerfor reading from files without any background goroutine (efficiency). - It must support incrementally verifying requests mapping to https://github.com/ipfs/boxo/pull/176 sementics.
- Capable of streaming the verification of an ordered stream of block (such as a car file red from
- Decoder with incremental verification and output stream with random walk BFS input.
- Streaming data in order can have a high cost, however if we are cleaver we can use
.WriteAtto write blocks in any order as long as we receive roots before leaves (or cache leaves but then incremental verification is not possible)
- Streaming data in order can have a high cost, however if we are cleaver we can use
- MFS rewrite.
- Some write opperation helpers (concatenate, chunking, ...)
- ... ?
- 主要言語
- Go
- スター
- 326
- フォーク
- 165
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ipfs/boxo のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 46/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
need/triage
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
-
dif/medium effort/hours kind/enhancement P3 topic/devexp
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
area/networking kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
siderolabs/talos#14972 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
kubectl wait outputs cryptic "error: unrecognized condition: []" when --for is omitted対応中かも @muskan-creates352 が今日担当しました。 オープンkind/bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
kubernetes/kubectl#1910 · コメント 1 件 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
stacklok/toolhive-catalog#1967 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
unbound-force/gaze#353 ·
メンテナーはふだん 1 日以内に返信