The `dag` and `files` distinction
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
One complicating piece for the user is the distinction of `ipfs` and `ipfs unix`. right now `ipfs {add, cat, ls}` conflate the two. And there _may_ be a future where different datastructures can be mounted to expose things differently.
Overall, we need to go through the codebase and:
- [ ] clearly distinguish `merkledag` and `unixfs` uses
- [ ] when we make `tour` clearly talk about this
- [ ] optimize flow with usability in mind, but not at the cost of expressivity (what you _can do_) or confusion (is it easy to understand what is going on)
### NOTE: the following is speculative. these mount examples are a lot of work and not in our near future. They're just an example of how the different models work
**note well what each of these commands does!!**
```
> ipfs block mount blocks/
> cat blocks/QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv
+
" Sfl ∂ÎJ8J_gÃH5è"p·¥E}ÜBR–˶™–bar+
" Ä€úU3:?∂,∫€X3T∑ùrtÌ(Fl|≠˝üõbazr+
" ïôbz¢≥UglàÃ∂€`fl˘d8-Úàʰ”o°É©foo
# like `ipfs object get`
> ipfs dag mount dag/
> ls dag/QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv
bar
baz/
foo
> cat dag/QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv/.ipfs-object
{
"Links": [
{
"Name": "bar",
"Hash": "QmTz3oc4gdpRMKP2sdGUPZTAGRngqjsi99BPoztyP53JMM",
"Size": 12
},
{
"Name": "baz",
"Hash": "QmX1ebVUtfY11ZCpVmqyE5mDoN62SpLd8eLPpg5GGV1ABt",
"Size": 114
},
{
"Name": "foo",
"Hash": "QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6",
"Size": 12
}
],
"Data": "CAE="
}
> cat dag/QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv/.ipfs-data
CAE=
# like `ipfs {cat, ls}` currently work
> ipfs unix mount unix/
> cat unix/QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv
> ls unix/QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv
bar
baz/
foo
#
> ipfs-bitcoin mount bitcoin/
> ls bitcoin/
HEAD
> ls bitcoin/HEAD
parent/
proof-of-work
transactions/
> ls bitcoin/HEAD/transaction/0/inputs
1LaxoTrQy51LnB289VmoSAgN6J6UrJbfL9
> ls bitcoin/HEAD/transaction/0/outputs
1QFbx3bKA8LABAGEaSe7EiP9JCxe2j4fN7
1taxinvBLwDAb1tjyTYzhcyb1fNKfivAB
1FTgzPJCbpCWYfF6VxPdmCMPUDBfygut2h
1DffZcvcQue3gn15G9tTshu2Y9YkzEZE2f
1HCFDzKx94uwtnvjJEXBZP12dseiNDK6if
> cat bitcoin/HEAD/transaction/0/full
input 1LaxoTrQy51LnB289VmoSAgN6J6UrJbfL9
output 1QFbx3bKA8LABAGEaSe7EiP9JCxe2j4fN7
output 1taxinvBLwDAb1tjyTYzhcyb1fNKfivAB
output 1FTgzPJCbpCWYfF6VxPdmCMPUDBfygut2h
output 1DffZcvcQue3gn15G9tTshu2Y9YkzEZE2f
output 1HCFDzKx94uwtnvjJEXBZP12dseiNDK6if
```
Contributor guide
Assessment
This issue has not been assessed yet.