Naming blocks in the datastore
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
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Bắt đầu bằng cách đọc các issue được liên kết của go-ipfs và js-ipfs, sau đó so sánh hành vi tra cứu datastore hiện tại của chúng đối với CIDv0 và CIDv1. Xem xét các đề xuất được liệt kê về multihash, CIDv1, chuyển hướng kép và metadata. Để được coi là hoàn tất, cần có một đặc tả về cách đặt tên datastore được thống nhất và một lộ trình migration; phạm vi triển khai chưa được xác định ở đây.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context: https://github.com/ipfs/ipfs/issues/337
Currently, both js-ipfs and go-ipfs index blocks in the datastore by CID. Unfortunately, it's possible for a single block to have multiple CIDs due to (a) different CID versions and (b) due to different multicodecs (e.g., dag-cbor v. cbor v. raw).
The primary concern is (a). As we switch to returning CIDv1 (for multibase support), we still want to be able to lookup blocks that were fetched/added as CIDv0.
Currently, when looking up a CID, both go-ipfs and js-ipfs will first attempt to lookup the CID under the original CID version, then under the other CID version. However, this costs us two look-ups.
Primary use-case:
Ensure that CIDv1 and CIDv0 can be used interchangeably, especially in the gateway.
Proposals:
- Index blocks by multihash only.
- Index blocks by CIDv1.
- Double indirection. Map CIDs to a locally chosen hash function to blocks.
- Store extra metadata along with the block (known codecs, refcounts, etc.).
- Unclear how to do this efficiently with a datastore (would likely require a bunch of separate writes/keys).
Desired properties:
- No duplicate blocks when...
a. CID Versions differ: 1, 2 & 3
b. CID Codecs differ: 1 & 3.
c. Hash functions differ: 3. - No discarded structural information (keep codecs): 2 & 3.
- Viable migration path: 1, 2 & 3.
- Fast migration path: 1 & 3.
- Zero Overhead:
a. Time: 1, 2, & 4.
b. Space: 1 & 2.
The current consensus is option 1 (multihash) (https://github.com/ipfs/go-ipfs/issues/6815, https://github.com/ipfs/js-ipfs/issues/2415). The proposal here is to consider option 2 (and at least look at the others).
However, option 1 doesn't give us property 2 as it discards the codec on write. @jbenet has objected strongly to this as we will be discarding structural information about the data. This information will still be stored in the pin set but we'll be losing this information for unpinned data.
We have also run into this same issue when trying to write a reverse datastore migration, migrating back from multihashes to CIDs: we need to somehow recover the codecs. The reverse migration in Option 2 would simply be: do nothing.
We need to consider the pros/cons of switching to option 1 before proceeding.
Side note: why should we even care about (b), multiple codecs for the same block?
IPLD objects as "files"
- I might want to add one or more CBOR-IPLD objects to an IPFS directory for legacy applications, and address them in IPLD.
- I might want to address a yaml/json object in an IPFS directory as an IPLD object.
Dumb block transport
I might want to take an unbalanced DAG (blockchain), a DAG with weird codecs (git, eth, etc.), etc. and sync it with another node. It would be nice if I could take this DAG, treat all the nodes as raw nodes, then build a well-balanced "overlay-dag" using simple, well-supported codecs.
This might, for example, be useful for storing DAGs with custom codecs in pinning services.
- 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
- Đọ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/specs
-
Simplify Spec StatusesĐang mởneed/triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Revise steward and editor rolesĐang mởneed/triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
dnslink:// URIsĐang mởneed/triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
need/triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug hal:proposed neofs-storage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nspcc-dev/neofs-node#4325 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pytorch plugin gives every master pod RANK=0, so master replicas > 1 leaves a rank missingCó thể đã có người làm @rakesh0x đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
volcano-sh/volcano#6323 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: facilitator bug complexity: trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
accensa/x402-facilitator-stellar#709 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
resiliency: ParseRetryConditionMatch fails when HTTPStatusCodes or GRPCStatusCodes contain whitespaceCó thể đã có người làm @patelshivani2283-lab đã nhận 2 ngày trước. Đ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