New Unixfs implementations
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go
- Lĩnh vực
- backend, data, distributed-systems
Hướng nghiên cứu
Bắt đầu bằng việc xem xét lớp trung gian blocks.Block được đề xuất cùng các định dạng unixfs.proto và dag-pb.proto, sau đó theo dõi cách một luồng CAR có thứ tự dựa trên io.Reader sẽ được biểu diễn. Issue liệt kê một số cách triển khai khả dĩ nhưng không nêu tên tệp hoặc test nào trong repository, vì vậy cần thống nhất phạm vi và tiêu chí hoàn thành trước khi bắt đầu công việc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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, ...)
- ... ?
- Ngôn ngữ chính
- Go
- Star
- 326
- Fork
- 165
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ipfs/boxo
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
need/triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
-
dif/medium effort/hours kind/enhancement P3 topic/devexp
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Issue tương tự
-
Pin and verify Security Insights schema in lintinsights targetCó thể đã có người làm @imshubham22apr-gif đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
gemaraproj/gemara#618 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
a2aproject/a2a-go#597 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scopes: GetAllowedTopics, GetProtectedTopics, and GetScopedTopics include empty topic names and do not trim whitespace charactersCó thể đã có người làm @patelshivani2283-lab đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/networking kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
siderolabs/talos#14972 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày