Skip to content

Commit a7ce641

Browse files
committed
Merge branch 'main' into ipip-0518-https-urls-in-routing-v1
2 parents e74d686 + d8fff17 commit a7ce641

File tree

12 files changed

+1418
-67
lines changed

12 files changed

+1418
-67
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name: Deploy
88

99
# Explicitly declare permissions
1010
permissions:
11+
actions: read
1112
contents: read
1213
pull-requests: write
1314
statuses: write
@@ -26,6 +27,8 @@ jobs:
2627
runs-on: ubuntu-latest
2728
outputs:
2829
cid: ${{ steps.deploy.outputs.cid }}
30+
environment:
31+
name: 'ipfs-publish'
2932
steps:
3033
- name: Download build artifact
3134
uses: actions/download-artifact@v4
@@ -48,18 +51,23 @@ jobs:
4851
#TODO pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }}
4952
github-token: ${{ github.token }}
5053

51-
# TODO: right now, DNSLink is controlled by Fleek, and we use ipfs/ipfs-deploy-action for PR previews
52-
#- name: Update DNSLink
53-
# if: github.event.workflow_run.head_branch == 'main'
54-
# uses: ipfs/dnslink-action@v0.1
55-
# with:
56-
# cid: ${{ steps.deploy.outputs.cid }}
57-
# dnslink_domain: 'specs.ipfs.tech'
58-
# cf_record_id: ${{ secrets.CF_RECORD_ID }}
59-
# cf_zone_id: ${{ secrets.CF_ZONE_ID }}
60-
# cf_auth_token: ${{ secrets.CF_AUTH_TOKEN }}
61-
# github_token: ${{ github.token }}
62-
# set_github_status: true
54+
dnslink-update:
55+
runs-on: ubuntu-latest
56+
needs: deploy-ipfs
57+
if: github.event.workflow_run.head_branch == 'main'
58+
environment:
59+
name: 'cf-dnslink'
60+
url: "https://specs-ipfs-tech.ipns.inbrowser.link/"
61+
steps:
62+
- name: Update DNSLink
63+
uses: ipshipyard/dnslink-action@v1
64+
with:
65+
cid: ${{ needs.deploy-ipfs.outputs.cid }}
66+
dnslink_domain: 'specs-ipfs-tech.dnslinks.ipshipyard.tech'
67+
cf_zone_id: ${{ secrets.CF_DNS_ZONE_ID }}
68+
cf_auth_token: ${{ secrets.CF_DNS_AUTH_TOKEN }}
69+
github_token: ${{ github.token }}
70+
set_github_status: true
6371

6472
deploy-gh-pages:
6573
if: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
out/
22
node_modules/
33
super-linter.log
4+
node_modules/

ARCHITECTURE.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# ![](https://img.shields.io/badge/status-wip-orange.svg?style=flat-square) IPFS Architecture Overview
1+
# ![status: deprecated](https://img.shields.io/badge/status-deprecated-red.svg?style=flat-square) IPFS Architecture Overview
22

33
> [!NOTE]
44
> This document contains historical notes about IPFS architecture from ~2015. For current specifications, please refer to https://specs.ipfs.tech/
55
6-
**Authors(s)**:
6+
**Author(s)**:
77
- [Juan Benet](https://github.com/jbenet)
88
- [David Dias](https://github.com/daviddias)
99

@@ -12,20 +12,20 @@
1212

1313
* * *
1414

15-
**Abstract**
15+
## Abstract
1616

1717
This spec document defines the IPFS protocol stack, the subsystems, the interfaces, and how it all fits together. It delegates non-interface details to other specs as much as possible. This is meant as a top-level view of the protocol and how the system fits together.
1818

1919
Note, this document is not meant to be an introduction of the concepts in IPFS and is not recommended as a first pass to understanding how IPFS works. For that, please refer to the [IPFS paper](https://github.com/ipfs/papers/raw/master/ipfs-cap2pfs/ipfs-p2p-file-system.pdf).
2020

2121
# Table of Contents
2222

23-
- 1. IPFS and the Merkle DAG
24-
- 2. Nodes and Network Model
25-
- 3. The Stack
26-
- 4. Applications and data structures -- on top of IPFS
27-
- 5. Lifetime of fetching an object
28-
- 6. IPFS User Interfaces
23+
1. IPFS and the Merkle DAG
24+
1. Nodes and Network Model
25+
1. The Stack
26+
1. Applications and data structures -- on top of IPFS
27+
1. Lifetime of fetching an object
28+
1. IPFS User Interfaces
2929

3030
# 1. IPFS and the Merkle DAG
3131

@@ -48,7 +48,6 @@ In turn, these yield properties for the system as a whole:
4848

4949
IPFS is a stack of network protocols that organize agent networks to create, publish, distribute, serve, and download merkledags. It is the authenticated, decentralized, permanent web.
5050

51-
5251
# 2. Nodes and Network Model
5352

5453
The IPFS network uses PKI based identity. An "ipfs node" is a program that can find, publish, and replicate merkledag objects. Its identity is defined by a private key. Specifically:
@@ -72,7 +71,6 @@ sha2-512
7271
sha3
7372
```
7473

75-
7674
# 3. The Stack
7775

7876
IPFS has a stack of modular protocols. Each layer may have multiple implementations, all in different modules. This spec will only address the interfaces between the layers, and briefly mention possible implementations. Details are left to the other specs.
@@ -85,7 +83,7 @@ IPFS has five layers:
8583
- **routing** - locating peers and objects
8684
- **network** - establishing connections between peers
8785

88-
![](img/ipfs-stack.png)
86+
![IPFS protocol stack](img/ipfs-stack.png)
8987

9088
These are briefly described bottom-up.
9189

@@ -165,7 +163,7 @@ The merkledag is enough to resolve paths:
165163

166164
See more in the [path resolution spec](https://github.com/ipld/specs/blob/master/data-model-layer/paths.md).
167165

168-
![](img/ipfs-resolve/ipfs-resolve.gif)
166+
![IPFS path resolution](img/ipfs-resolve/ipfs-resolve.gif)
169167

170168
## 3.5 Naming -- PKI namespace and mutable pointers
171169

@@ -196,7 +194,7 @@ The unix filesystem abstractions -- files and directories -- are the main way pe
196194

197195
See more in the [unixfs spec](https://github.com/ipfs/specs/blob/master/UNIXFS.md).
198196

199-
## 5. Lifetime of fetching an object.
197+
## 5. Lifetime of fetching an object
200198

201199
Suppose we ask an IPFS node to retrieve
202200

@@ -225,7 +223,7 @@ IPFS is not just a protocol. It is also a toolset. IPFS implementations include
225223

226224
* * *
227225

228-
# WIP Stack Dump:
226+
# WIP Stack Dump
229227

230228
- How the layers fit together
231229
- How they call on each other

src/bitswap-protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ editors:
2929
name: Protocol Labs
3030
url: https://protocol.ai/
3131
tags: ['exchange', 'routing']
32-
order: 1
32+
order: 2
3333
---
3434

3535
Bitswap is a libp2p data exchange protocol for sending and receiving content

src/http-gateways/dnslink-gateway.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ Implementations MUST ensure DNSLink resolution is safe and correct:
6969
recursion limit (e.g. 32) and HTTP 400 Bad Request error MUST be returned
7070
when the limit is reached.
7171

72-
**Example: resolving an advanced DNSLink chain**
72+
:::note
73+
74+
Example: resolving an advanced DNSLink chain
7375

7476
To illustrate, given DNSLink records:
7577

@@ -85,6 +87,8 @@ content path:
8587
3. Resolving DNSlink at `b.example.net` replaces `/ipns/b.example.net` with `/ipfs/bafy…qy3k/path-c`
8688
4. The immutable content path is `/ipfs/bafy…qy3k/path-c/path-b/path-a`
8789

90+
:::
91+
8892
# HTTP Response
8993

9094
Same as "HTTP Response" of :cite[path-gateway].

src/http-gateways/path-gateway.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ description: >
44
The comprehensive low-level HTTP Gateway enables the integration of IPFS
55
resources into the HTTP stack through /ipfs and /ipns namespaces, supporting
66
both deserialized and verifiable response types.
7-
date: 2024-04-17
7+
date: 2025-10-13
88
maturity: reliable
99
editors:
1010
- name: Marcin Rataj
1111
github: lidel
1212
url: https://lidel.org/
1313
affiliation:
14-
name: Protocol Labs
15-
url: https://protocol.ai/
14+
name: Shipyard
15+
url: https://ipshipyard.com
16+
former_editors:
17+
- name: Henrique Dias
18+
github: hacdias
19+
url: https://hacdias.com/
20+
affiliation:
21+
name: Shipyard
22+
url: https://ipshipyard.com
23+
thanks:
1624
- name: Adrian Lanzafame
1725
github: lanzafame
1826
affiliation:
@@ -28,12 +36,6 @@ editors:
2836
affiliation:
2937
name: Protocol Labs
3038
url: https://protocol.ai/
31-
- name: Henrique Dias
32-
github: hacdias
33-
url: https://hacdias.com/
34-
affiliation:
35-
name: Protocol Labs
36-
url: https://protocol.ai/
3739
xref:
3840
- rfc3986
3941
- trustless-gateway
@@ -332,6 +334,11 @@ Gateways MUST use 404 to signal that content is not available, particularly
332334
when the gateway is [non recursive](#recursive-vs-non-recursive-gateways), and only provides access to a known
333335
dataset, so that it can assess that the requested content is not part of it.
334336

337+
NOTE: Gateways MUST return 404 for missing root blocks. However, for streaming
338+
responses (such as CAR), once HTTP 200 OK status is sent, gateways cannot
339+
change it. If a child block is missing during streaming, the gateway SHOULD
340+
terminate the stream. Clients MUST verify response completeness.
341+
335342
### `410` Gone
336343

337344
Error to indicate that request was formally correct, but this specific Gateway
@@ -639,6 +646,10 @@ Indicates the original, requested content path before any path resolution and tr
639646

640647
Example: `X-Ipfs-Path: /ipns/k2..ul6/subdir/file.txt`
641648

649+
This header SHOULD be returned with deserialized responses.
650+
Implementations MAY omit it with trustless response types
651+
(`application/vnd.ipld.raw` and `application/vnd.ipld.car`).
652+
642653
### `X-Ipfs-Roots` (response header)
643654

644655
Used for HTTP caching.
@@ -668,6 +679,15 @@ NOTE: while the first CID will change every time any article is changed,
668679
the last root (responsible for specific article or a subdirectory) may not
669680
change at all, allowing for smarter caching beyond what standard Etag offers.
670681

682+
This header SHOULD be returned with deserialized responses.
683+
Implementations MAY omit it with trustless response types
684+
(`application/vnd.ipld.raw` and `application/vnd.ipld.car`).
685+
686+
NOTE: Gateways that stream responses (e.g., CAR) without pre-resolving the
687+
entire path MAY only include the root CID for simple `/ipfs/{cid}` requests, or
688+
MAY omit this header for path requests where intermediate CIDs are not known
689+
when headers are sent.
690+
671691
### `X-Content-Type-Options` (response header)
672692

673693
Optional, present in certain response types:

0 commit comments

Comments
 (0)