Change UnixFS dag-pb protobuf field ordering

Đang mở
#533 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi

Hướng nghiên cứu

Bắt đầu bằng cách đọc đặc tả định dạng tuần tự hóa dag-pb được liên kết và các tham chiếu đến các pull request IPIP-499 và specs để hiểu bối cảnh về tính tương thích và profile. Công việc hoàn tất khi đề xuất sắp xếp thứ tự, các hệ quả của đề xuất này đối với wire format và mọi lộ trình nâng cấp lên unixfs-v1-2026 đều được đặc tả rõ ràng và chấp thuận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

need/triage

The .proto definition of a PBNode is this (spec):

message PBNode {
  // refs to other objects
  repeated PBLink Links = 2;

  // opaque user data
  optional bytes Data = 1;
}

Implementations are expected to write the repeated Links messages to the output buffer first, then the Data field, even though the field IDs are ordered the opposite way (not disallowed by the protobuf spec, though some off the shelf encoders will write in ID order).

When the PBNode represents a directory, the Links objects could be either flat directory entries, or HAMT shard entries - the information needed to ascertain this is contained in the Data field.

This means when processing an incoming PBNode message, we typically read all of the Links, and then use the Data to decide how to process them.

If we are performing a graph traversal, a streaming parser would let us process the PBNode message as it arrives, and to select the Link message we wish to traverse through or resolve to, however this is not currently possible since we need to process the Data field before we can return a Link. This can add significant overhead when there are many thousands of Links.

We should allow ordering the Data field first, this would enable the streaming use-case and help with IPFS code running in resource-constrained environments such as web browsers.

Since IPIP-499 we now have CID profiles which could be an upgrade path for the network. This proposal could be part of a unixfs-v1-2026 profile.

Ngôn ngữ chính
HTML
Star
1.2k
Fork
250
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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ipfs/specs

Tất cả issue của ipfs/specs

Issue tương tự

Thêm issue về Distributed Systems

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.