You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/essentials/merkle-dags.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,23 @@ title: Merkle DAGs
4
4
5
5
# Merkle Distributed Acyclic Graphs (DAGs)
6
6
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_.
8
8
9
-
## Merkle-DAGs in brief
9
+
## MerkleDAGs in brief
10
10
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 MerkleDAG 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:
12
12
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
+
- MerkleDAGs 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 MerkleDAG is the root of a (sub)MerkleDAG itself, and this subgraph is _contained_ in the parent DAG.
15
+
- MerkleDAG 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.
16
16
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
+
MerkleDAGs 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.
18
18
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 MerkleDAG 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.
20
20
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 MerkleDAGs. (Note: Hash functions are one-way functions. Creating a cycle should then be impossibly difficult, unless some weakness is discovered and exploited.)
22
22
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
+
MerkleDAGs 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. MerkleDAGs 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.
Copy file name to clipboardExpand all lines: docs/how-tos/address-ipfs-on-web.md
+14-18Lines changed: 14 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@ title: Address IPFS on the Web
4
4
5
5
# Address IPFS on the Web
6
6
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.)
This document is a guide to how to address IPFS content paths on the web.
20
16
21
-
## HTTP Gateways
17
+
## HTTP gateways
22
18
23
19
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.
24
20
25
-
### Centralization Concerns
21
+
### Centralization concerns
26
22
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.
28
24
29
-
### Protocol Upgrade
25
+
### Protocol upgrade
30
26
31
27
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.
32
28
33
-
### Gateway Types
29
+
### Gateway types
34
30
35
-
#### Path Gateway
31
+
#### Path gateway
36
32
37
33
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:
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:
59
55
@@ -68,13 +64,13 @@ Example:
68
64
Right now, this type of gateway requires additional configuration (<ahref="https://github.com/ipfs/infra/issues/81#issuecomment-461045160"target="_blank">example for Nginx <iclass="fas fa-external-link-square-alt fa-sm"></i></a>); however, there is ongoing work to <ahref="https://github.com/ipfs/go-ipfs/issues/5982"target="_blank">add native support in the IPFS daemon <iclass="fas fa-external-link-square-alt fa-sm"></i></a>.
69
65
</aside>
70
66
71
-
#### DNSLink Gateway
67
+
#### DNSLink gateway
72
68
73
69
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).
74
70
If DNSLink is present, the gateway will return content from a path resolved via DNS TXT record.
75
71
This type of gateway provides full [origin isolation](https://en.wikipedia.org/wiki/Same-origin_policy).
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).
115
111
116
-
### Background on Address Scheme Discussions
112
+
### Background on address scheme discussions
117
113
118
114
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 <iclass="fas fa-external-link-square-alt fa-sm"></i></a>](https://github.com/ipfs/specs/pull/152).
119
115
120
-
### Companion Browser Extension
116
+
### IPFS Companion
121
117
122
118
[IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion#ipfs-companion) is a
123
119
browser extension that simplifies access to IPFS resources.
124
120
125
121
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.
126
122
127
-
### Future: Shared Dweb Namespace
123
+
### Future: Shared dweb namespace
128
124
129
125
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:
Copy file name to clipboardExpand all lines: docs/how-tos/browser-tools-frameworks.md
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,9 @@
2
2
title: Use browser tools & frameworks
3
3
---
4
4
5
-
# Browser implementation tools and frameworks
5
+
# Using browser implementation tools and frameworks
6
6
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.
Copy file name to clipboardExpand all lines: docs/how-tos/command-line-quick-start.md
+14-26Lines changed: 14 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,15 @@ title: Command-line quick start
4
4
5
5
# Command-line quick start
6
6
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
7
## Install IPFS
12
8
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).
Download IPFS for your platform <iclass="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/).
18
10
19
-
<asideclass="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! <ahref="https://github.com/ipfs-shipyard/ipfs-desktop">Get started with IPFS Desktop here <iclass="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. <ahref="https://github.com/ipfs-shipyard/ipfs-desktop">Get started with IPFS Desktop here <iclass="fas fa-external-link-square-alt fa-sm"></i></a>
13
+
:::
22
14
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).
24
16
25
17
## Initialize the repository
26
18
@@ -94,7 +86,7 @@ You can explore other objects in the repository. In particular, the `quick-start
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:
100
92
@@ -156,7 +148,7 @@ I <3 IPFS -<your username>
156
148
157
149
By default, your gateway is not exposed to the world, it only works locally.
158
150
159
-
## Web Console
151
+
## Web console
160
152
161
153
We also have a web console you can use to check the state of your node.
162
154
In your favorite web browser, open:
@@ -167,21 +159,17 @@ This should bring up a console like this:
|[](https://addons.mozilla.org/firefox/addon/ipfs-companion/)|[](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch)|
Copy file name to clipboardExpand all lines: docs/how-tos/configure-node.md
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@ title: Configure a node
4
4
5
5
# Configure an IPFS node
6
6
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
7
IPFS is configured through a json formatted text file, located by default at
0 commit comments