Skip to content

Commit 113f6c2

Browse files
Merge pull request #8 from ipfs/feat-migration-tweaks-2
Second round of migration tweaks
2 parents 3334b65 + e6fa3f5 commit 113f6c2

13 files changed

+1036
-1666
lines changed

docs/essentials/merkle-dags.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ title: Merkle DAGs
44

55
# Merkle Distributed Acyclic Graphs (DAGs)
66

7-
A _Direct Acyclic Graph_ (DAG)is a type of graph in which edges have direction and cycles are not allowed. For example, a linked list like _A→B→C_ is an instance of a DAG where _A_ references _B_ and so on. We say that _B_ is _a child_ or _a descendant of A_, and that _node A has a link to B_. Conversely _A_ is a _parent of B_. We call nodes that are not children to any other node in the DAG _root nodes_.
7+
A _Direct Acyclic Graph_ (DAG) is a type of graph in which edges have direction and cycles are not allowed. For example, a linked list like _A→B→C_ is an instance of a DAG where _A_ references _B_ and so on. We say that _B_ is _a child_ or _a descendant of A_, and that _node A has a link to B_. Conversely _A_ is a _parent of B_. We call nodes that are not children to any other node in the DAG _root nodes_.
88

9-
## Merkle-DAGs in brief
9+
## Merkle DAGs in brief
1010

11-
A Merkle-DAG is a DAG where each node has an identifier and this is the result of hashing the node’s contents — any opaque payload carried by the node and the list of identifiers of its children — using a cryptographic hash function like SHA256. This brings some important considerations:
11+
A Merkle DAG is a DAG where each node has an identifier and this is the result of hashing the node’s contents — any opaque payload carried by the node and the list of identifiers of its children — using a cryptographic hash function like SHA256. This brings some important considerations:
1212

13-
- Merkle-DAGs can only be constructed from the leaves, that is, from nodes without children. Parents are added after children because the children’s identifiers must be computed in advance to be able to link them.
14-
- every node in a Merkle-DAG is the root of a (sub)Merkle-DAG itself, and this subgraph is _contained_ in the parent DAG.
15-
- Merkle-DAG nodes are _immutable_. Any change in a node would alter its identifier and thus affect all the ascendants in the DAG, essentially creating a different DAG. Take a look at [this helpful illustration using bananas](https://media.consensys.net/ever-wonder-how-merkle-trees-work-c2f8b7100ed3) from our friends at Consensys.
13+
- Merkle DAGs can only be constructed from the leaves, that is, from nodes without children. Parents are added after children because the children’s identifiers must be computed in advance to be able to link them.
14+
- every node in a Merkle DAG is the root of a (sub)Merkle DAG itself, and this subgraph is _contained_ in the parent DAG.
15+
- Merkle DAG nodes are _immutable_. Any change in a node would alter its identifier and thus affect all the ascendants in the DAG, essentially creating a different DAG. Take a look at [this helpful illustration using bananas](https://media.consensys.net/ever-wonder-how-merkle-trees-work-c2f8b7100ed3) from our friends at Consensys.
1616

17-
Merkle-DAGs are similar to Merkle trees, but there are no balance requirements and every node can carry a payload. In DAGs, several branches can re-converge or, in other words, a node can have several parents.
17+
Merkle DAGs are similar to Merkle trees, but there are no balance requirements and every node can carry a payload. In DAGs, several branches can re-converge or, in other words, a node can have several parents.
1818

19-
Identifying a data object (like a Merkle-DAG node) by the value of its hash is referred to as _content addressing_. Thus, we name the node identifier as [_Content Identifier_](/essentials/content-addressing/), or CID.
19+
Identifying a data object (like a Merkle DAG node) by the value of its hash is referred to as _content addressing_. Thus, we name the node identifier as [_Content Identifier_](/essentials/content-addressing/), or CID.
2020

21-
For example, the previous linked list, assuming that the payload of each node is just the CID of its descendant, would be: _A=Hash(B)→B=Hash(C)→C=Hash(∅)_. The properties of the hash function ensure that no cycles can exist when creating Merkle-DAGs. (Note: Hash functions are one-way functions. Creating a cycle should then be impossibly difficult, unless some weakness is discovered and exploited.)
21+
For example, the previous linked list, assuming that the payload of each node is just the CID of its descendant, would be: _A=Hash(B)→B=Hash(C)→C=Hash(∅)_. The properties of the hash function ensure that no cycles can exist when creating Merkle DAGs. (Note: Hash functions are one-way functions. Creating a cycle should then be impossibly difficult, unless some weakness is discovered and exploited.)
2222

23-
Merkle-DAGs are _self-verified_ structures. The CID of a node is univocally linked to the contents of its payload and those of all its descendants. Thus two nodes with the same CID univocally represent exactly the same DAG. This will be a key property to efficiently sync Merkle-CRDTs without having to copy the full DAG, as exploited by systems like IPFS. Merkle-DAGs are very widely used. Source control systems like git and others use them to efficiently store the repository history, in away that enables de-duplicating the objects and detecting conflicts between branches.
23+
Merkle DAGs are _self-verified_ structures. The CID of a node is univocally linked to the contents of its payload and those of all its descendants. Thus two nodes with the same CID univocally represent exactly the same DAG. This will be a key property to efficiently sync Merkle-CRDTs without having to copy the full DAG, as exploited by systems like IPFS. Merkle DAGs are very widely used. Source control systems like git and others use them to efficiently store the repository history, in away that enables de-duplicating the objects and detecting conflicts between branches.
2424

2525
## Further resources
2626

docs/how-tos/address-ipfs-on-web.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ title: Address IPFS on the Web
44

55
# Address IPFS on the Web
66

7-
::: warning
8-
This draft content ported from the legacy docs site may contain broken links and other errors. (Please remove this alert once content has been reviewed.)
9-
:::
10-
117
<!--
128
Based on the existing spec at:
139
https://github.com/ipfs/in-web-browsers/blob/2896b7a642011bc92493971232b146e04c9a889c/ADDRESSING.md
@@ -18,21 +14,21 @@ https://github.com/ipfs/in-web-browsers/issues/147
1814

1915
This document is a guide to how to address IPFS content paths on the web.
2016

21-
## HTTP Gateways
17+
## HTTP gateways
2218

2319
Gateways are provided strictly for convenience: in other words, they help tools that speak HTTP but do not speak distributed protocols such as IPFS. They are the first stage of the upgrade path for the web.
2420

25-
### Centralization Concerns
21+
### Centralization concerns
2622

27-
HTTP gateways have worked well since 2015, but they come with a significant set of limitations related both to the centralized nature of HTTP and some of HTTP's semantics. Location-based addressing of a gateway depends on both DNS and HTTPS/TLS, which relies on a trust in [certificate authorities](https://en.wikipedia.org/wiki/Certificate_authority) (CA) and [public key infrastructure](https://en.wikipedia.org/wiki/Public_key_infrastructure) (PKI). In the long term, these issues should be mitigated by use of opportunistic protocol upgrade schemes.
23+
HTTP gateways have worked well since 2015, but they come with a significant set of limitations related both to the centralized nature of HTTP and some of HTTP's semantics. Location-based addressing of a gateway depends on both DNS and HTTPS/TLS, which relies on a trust in [certificate authorities](https://en.wikipedia.org/wiki/Certificate_authority) (CAs) and [public key infrastructure](https://en.wikipedia.org/wiki/Public_key_infrastructure) (PKI). In the long term, these issues should be mitigated by use of opportunistic protocol upgrade schemes.
2824

29-
### Protocol Upgrade
25+
### Protocol upgrade
3026

3127
Tools and browser extensions should detect IPFS content paths and resolve them directly over IPFS protocol. They should use HTTP gateway only as a fallback when no native implementation is available in order to ensure a smooth, backward-compatible transition.
3228

33-
### Gateway Types
29+
### Gateway types
3430

35-
#### Path Gateway
31+
#### Path gateway
3632

3733
In the most basic scheme, a URL path used for content addressing is effectively a resource name without a canonical location. The HTTP server provides the location part, which makes it possible for browsers to interpret an IPFS content path as relative to the current server and just work without a need for any conversion:
3834

@@ -53,7 +49,7 @@ https://ipfs.io/ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.ht
5349
https://ipfs.io/ipns/tr.wikipedia-on-ipfs.org/wiki/Anasayfa.html
5450
```
5551

56-
#### Subdomain Gateway
52+
#### Subdomain gateway
5753

5854
When [origin-based security](https://en.wikipedia.org/wiki/Same-origin_policy) perimeter is needed, [CIDv1](https://github.com/ipld/cid#cidv1) in Base32 ([RFC4648](https://tools.ietf.org/html/rfc4648#section-6), no padding) should be used in the subdomain:
5955

@@ -68,13 +64,13 @@ Example:
6864
Right now, this type of gateway requires additional configuration (<a href="https://github.com/ipfs/infra/issues/81#issuecomment-461045160" target="_blank">example for Nginx&nbsp;<i class="fas fa-external-link-square-alt fa-sm"></i></a>); however, there is ongoing work to <a href="https://github.com/ipfs/go-ipfs/issues/5982" target="_blank">add native support in the IPFS daemon&nbsp;<i class="fas fa-external-link-square-alt fa-sm"></i></a>.
6965
</aside>
7066

71-
#### DNSLink Gateway
67+
#### DNSLink gateway
7268

7369
The gateway provided by the IPFS daemon understands the `Host` header present in HTTP requests, and will check if [DNSLink](/guides/concepts/dnslink) exists for a specified [domain name](https://en.wikipedia.org/wiki/Fully_qualified_domain_name).
7470
If DNSLink is present, the gateway will return content from a path resolved via DNS TXT record.
7571
This type of gateway provides full [origin isolation](https://en.wikipedia.org/wiki/Same-origin_policy).
7672

77-
Example: https://docs.ipfs.io (this website)
73+
Example: [https://docs.ipfs.io](https://docs.ipfs.io) (this website)
7874

7975
For a more complete DNSLink guide, including tutorials, usage examples and FAQs, check out [dnslink.io](https://dnslink.io).
8076

@@ -107,24 +103,24 @@ ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_
107103

108104
---
109105

110-
## References
106+
## Further resources
111107

112-
### Technical Specification for Implementers
108+
### Technical specification for implementers
113109

114110
The best and most up-to-date source of truth about IPFS addressing can be found in [the IPFS in-web-browsers repo](https://github.com/ipfs/in-web-browsers/blob/master/ADDRESSING.md).
115111

116-
### Background on Address Scheme Discussions
112+
### Background on address scheme discussions
117113

118114
Discussions around IPFS addressing have been going on since @jbenet published the [IPFS whitepaper](https://ipfs.io/ipfs/QmR7GSQM93Cx5eAg6a6yRzNde1FQv7uL6X1o4k7zrJa3LX/ipfs.draft3.pdf), with a number of other approaches being proposed. This long-standing design discussion includes many lengthy GitHub issue threads, but a good summary can be found in [this PR&nbsp;<i class="fas fa-external-link-square-alt fa-sm"></i></a>](https://github.com/ipfs/specs/pull/152).
119115

120-
### Companion Browser Extension
116+
### IPFS Companion
121117

122118
[IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion#ipfs-companion) is a
123119
browser extension that simplifies access to IPFS resources.
124120

125121
It provides support for native URLs and will automatically redirect IPFS gateway requests to your local daemon so that you are not relying on, or trusting, remote gateways.
126122

127-
### Future: Shared Dweb Namespace
123+
### Future: Shared dweb namespace
128124

129125
The distributed web community is exploring the idea of a shared `dweb` namespace to remove the complexity of addressing IPFS and other content-addressed protocols. Currently investigated approaches include:
130126

docs/how-tos/browser-tools-frameworks.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
title: Use browser tools & frameworks
33
---
44

5-
# Browser implementation tools and frameworks
5+
# Using browser implementation tools and frameworks
66

7-
::: warning
8-
This draft content ported from the legacy docs site may contain broken links and other errors. (Please remove this alert once content has been reviewed.)
9-
:::
10-
11-
Want to learn how to use IPFS combination with your favorite framework or browser implementation tool? See below for some common examples, including hints and boilerplate code. Don't see your framework or tool of choice here? Let us know by [filing an issue](https://github.com/ipfs/docs/issues/new?assignees=&labels=OKR+3%3A+Content+Improvement%2C+docs-ipfs&template=content-request.md&title=%5BCONTENT+REQUEST%5D+%20Browser%20Implementation%20Tools%20and%20Frameworks) in the IPFS docs GitHub repo.
7+
Want to learn how to use IPFS in combination with your favorite framework or browser implementation tool? See below for some common examples, including hints and boilerplate code. Don't see your framework or tool of choice here? Let us know by [filing an issue](https://github.com/ipfs/docs/issues/new?assignees=&labels=OKR+3%3A+Content+Improvement%2C+docs-ipfs&template=content-request.md&title=%5BCONTENT+REQUEST%5D+%20Browser%20Implementation%20Tools%20and%20Frameworks) in the IPFS docs GitHub repo.
128

139
## Browserify
1410

docs/how-tos/command-line-quick-start.md

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,15 @@ title: Command-line quick start
44

55
# Command-line quick start
66

7-
::: warning
8-
This draft content ported from the legacy docs site may contain broken links and other errors. (Please remove this alert once content has been reviewed.)
9-
:::
10-
117
## Install IPFS
128

13-
If you haven’t done so already, your first step is to **install IPFS**! Most people prefer to install a prebuilt package, which you can do on the [IPFS distributions page](https://dist.ipfs.io/#go-ipfs) by clicking “Install go-ipfs” (our reference implementation written in Go) and then following the instructions for [installing from a prebuilt package](../install/#installing-from-a-prebuilt-package).
14-
15-
<a class="button button-primary" href="https://dist.ipfs.io/#go-ipfs" role="button">
16-
Download IPFS for your platform &nbsp;&nbsp;<i class="fa fa-download" aria-hidden="true"></i>
17-
</a>
9+
If you haven’t done so already, your first step is to **install IPFS**! Most people prefer to install a prebuilt package, which you can do on the [IPFS distributions page](https://dist.ipfs.io/#go-ipfs) by clicking “Install go-ipfs” (our reference implementation written in Go) and then following the instructions for [installing from a prebuilt package](/install/).
1810

19-
<aside class="alert alert-info">
20-
Don’t want to use the command line right now? You can give the desktop-app implementation of IPFS a go! <a href="https://github.com/ipfs-shipyard/ipfs-desktop">Get started with IPFS Desktop here <i class="fas fa-external-link-square-alt fa-sm"></i></a>
21-
</aside>
11+
::: tip
12+
Don’t want to use the command line right now? Give the desktop-app implementation of IPFS a try. <a href="https://github.com/ipfs-shipyard/ipfs-desktop">Get started with IPFS Desktop here <i class="fas fa-external-link-square-alt fa-sm"></i></a>
13+
:::
2214

23-
For more install options, such as building from source, and toubleshooting tips, visit our [install guide]{guides/guides/install.md). If you have any questions or get stuck, feel free to ask for help in [the Help section of the IPFS forums](https://discuss.ipfs.io/c/help) or in [#ipfs on chat.freenode.net](irc://chat.freenode.net/%23ipfs).
15+
For more install options, such as building from source, and toubleshooting tips, visit our [install guide](/install). If you have any questions or get stuck, feel free to ask for help in [the Help section of the IPFS forums](https://discuss.ipfs.io/c/help) or in [#ipfs on chat.freenode.net](irc://chat.freenode.net/%23ipfs).
2416

2517
## Initialize the repository
2618

@@ -94,7 +86,7 @@ You can explore other objects in the repository. In particular, the `quick-start
9486
ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/quick-start
9587
```
9688

97-
## Taking your Node Online
89+
## Take your node online
9890

9991
Once you're ready to join your node to the public network, run the ipfs daemon in another terminal and wait for all three lines below to appear to know that your node is ready:
10092

@@ -156,7 +148,7 @@ I <3 IPFS -<your username>
156148

157149
By default, your gateway is not exposed to the world, it only works locally.
158150

159-
## Web Console
151+
## Web console
160152

161153
We also have a web console you can use to check the state of your node.
162154
In your favorite web browser, open:
@@ -167,21 +159,17 @@ This should bring up a console like this:
167159

168160
![Web console connection view](https://docs.ipfs.io/introduction/assets/webui-connection.png)
169161

170-
## Companion Browser Extension
162+
## IPFS Companion
171163

172164
While we are at it, [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion#ipfs-companion) is a
173165
browser extension that simplifies access to IPFS resources and adds support for
174166
the IPFS protocol.
175167

176-
<div class="alert alert-info">
177-
It will automatically redirect IPFS gateway requests to
178-
your local daemon so that you are not relying on, or trusting, remote gateways.
179-
</div>
168+
It will automatically redirect IPFS gateway requests to your local daemon so that you are not relying on, or trusting, remote gateways.
180169

181-
It runs in Firefox (Desktop and Android)
182-
and various Chromium-based browsers such as Google Chrome or Brave.
183-
Check [its features](https://github.com/ipfs-shipyard/ipfs-companion#features) and [**install it**](https://github.com/ipfs-shipyard/ipfs-companion#install) today!
170+
It runs in Firefox (desktop and Android) and various Chromium-based browsers such as Google Chrome or [Brave](https://brave.com).
171+
[Check out its features](https://github.com/ipfs-shipyard/ipfs-companion#features) and install it today!
184172

185-
| [Firefox](https://www.mozilla.org/firefox/new/) / [Firefox for Android](https://play.google.com/store/apps/details?id=org.mozilla.firefox) | [Chrome](https://www.google.com/chrome/) / [Brave](https://brave.com/) |
186-
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
187-
| [![Install From Firefox Add-ons](https://docs.ipfs.io/introduction/assets/get-the-firefox-add-on.png)](https://addons.mozilla.org/firefox/addon/ipfs-companion/) | [![Install from Chrome Store](https://docs.ipfs.io/introduction/assets/chrome-web-store.png)](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch) |
173+
- [Direct download](https://github.com/ipfs-shipyard/ipfs-companion#install)
174+
- [Install from Firefox Add-ons](https://addons.mozilla.org/firefox/addon/ipfs-companion/)
175+
- [Install from Chrome Store](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch)

docs/how-tos/configure-node.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ title: Configure a node
44

55
# Configure an IPFS node
66

7-
::: warning
8-
This draft content ported from the legacy docs site may contain broken links and other errors. (Please remove this alert once content has been reviewed.)
9-
:::
10-
117
IPFS is configured through a json formatted text file, located by default at
128
`~/.ipfs/config`.
139

0 commit comments

Comments
 (0)