ipld / ipld/ipld

Invisible IPLD nodes

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
question ready
Dominant language
Nunjucks
Stars
1.3k
Forks
172
Avg merge
7d 2h
Merged PRs (30d)
3

Description

How should we deal with degenerate IPLD nodes that are *just* CIDs?

```
c := dag.add("value")
b := dag.add({"/": c })
a := dag.add({"/": b})
```

The question is: what do `/ipld/$a`, `/ipld/$b` resolve to?

Option 1: `/ipld/$a` resolves to `{"/": b}` (same for `b`). This is inconsistent with the rest of IPLD because it's usually impossible to resolve a path to a CID.

Option 2: `/ipld/$a`, `/ipld/$b`, and `/ipld/$c` all resolve to `"value"`. This would make `a` and `b` disappear. Furthermore, a blockstore may *have* `$a` but be unable to resolve `/ipld/$a`.

Option 3: Disallow them. That is, valid IPLD nodes may not be bare CIDs.

Thoughts?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.