Skip to content

Commit b3828f6

Browse files
committed
wip: ipip 0417
1 parent 36571b0 commit b3828f6

File tree

2 files changed

+118
-9
lines changed

2 files changed

+118
-9
lines changed

src/ipips/ipip-0417.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "IPIP-0417: TODO"
3+
date: 2023-05-29
4+
ipip: proposal
5+
editors:
6+
- name: Henrique Dias
7+
github: hacdias
8+
url: https://hacdias.com/
9+
relatedIssues:
10+
- https://github.com/ipfs/specs/pull/410
11+
- https://github.com/ipfs/kubo/pull/9877
12+
order: 417
13+
tags: ['ipips']
14+
---
15+
16+
## Summary
17+
18+
TODO
19+
20+
## Motivation
21+
22+
TODO
23+
24+
## Detailed design
25+
26+
TODO
27+
28+
## Test fixtures
29+
30+
TODO
31+
32+
## Design rationale
33+
34+
TODO
35+
36+
### User benefit
37+
38+
TODO
39+
40+
### Compatibility
41+
42+
TODO
43+
44+
### Security
45+
46+
TODO
47+
48+
### Alternatives
49+
50+
TODO
51+
52+
### Copyright
53+
54+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

src/routing/http-routing-v1.md

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,38 @@ Response limit: 100 providers
106106

107107
Each object in the `Providers` list is a *read provider record*.
108108

109+
### `GET /routing/v1/peers/{peer-id}`
110+
111+
#### Path Parameters
112+
113+
- `peer-id` is the [Peer ID](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md) to fetch peer records for.
114+
115+
#### Response Status Codes
116+
117+
- `200` (OK): the response body contains the peer record.
118+
- `404` (Not Found): must be returned if no matching records are found.
119+
- `422` (Unprocessable Entity): request does not conform to schema or semantic constraints.
120+
121+
#### Response Body
122+
123+
A single peer record.
124+
125+
<!-- ```json
126+
{
127+
"Providers": [
128+
{
129+
"Protocol": "<protocol_name>",
130+
"Schema": "<schema>",
131+
...
132+
}
133+
]
134+
}
135+
```
136+
137+
Response limit: 100 providers
138+
139+
Each object in the `Providers` list is a *read provider record*. -->
140+
109141
### `GET /routing/v1/ipns/{name}`
110142

111143
#### Path Parameters
@@ -148,9 +180,9 @@ with one *read provider record* per line:
148180

149181

150182
```json
151-
{"Protocol": "<protocol_name>", "Schema": "<schema>", ...}
152-
{"Protocol": "<protocol_name>", "Schema": "<schema>", ...}
153-
{"Protocol": "<protocol_name>", "Schema": "<schema>", ...}
183+
{"Schema": "<schema>", ...}
184+
{"Schema": "<schema>", ...}
185+
{"Schema": "<schema>", ...}
154186
...
155187
```
156188

@@ -183,15 +215,38 @@ Access-Control-Allow-Origin: *
183215
Access-Control-Allow-Methods: GET, OPTIONS
184216
```
185217

218+
## Known Schemas
219+
220+
This section contains a non-exhaustive list of known schemas that MAY be supported by clients and servers.
221+
222+
### Peer
223+
224+
The `peer` schema represents an arbitrary peer.
225+
226+
227+
```json
228+
{
229+
"Schema": "peer",
230+
"ID": "12D3K...",
231+
"Addrs": ["/ip4/..."],
232+
"Protocols": ["transport-bitswap", ...]
233+
}
234+
```
235+
236+
- `ID`: the [Peer ID](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md).
237+
- `Addrs`: a list of known [multiaddrs][multiaddr] for this peer. This list MAY be incomplete.
238+
- `Protocols`: an OPTIONAL field with the transports known to be used by this peer. If empty, it means the server does not know and the client can use the `identify` protocol to learn more.
239+
240+
186241
## Known Transfer Protocols
187242

188243
This section contains a non-exhaustive list of known transfer protocols (by name) that may be supported by clients and servers.
189244

190245
### Bitswap
191246

192-
Multicodec name: `transport-bitswap`
193-
Schema: `bitswap`
194-
Specification: [ipfs/specs/BITSWAP.md](https://github.com/ipfs/specs/blob/main/BITSWAP.md)
247+
- Multicodec name: `transport-bitswap`
248+
- Schema: `bitswap`
249+
- Specification: [ipfs/specs/BITSWAP.md](https://github.com/ipfs/specs/blob/main/BITSWAP.md)
195250

196251
#### Bitswap Read Provider Records
197252

@@ -212,9 +267,9 @@ The server should respect a passed `transport` query parameter by filtering agai
212267

213268
### Filecoin Graphsync
214269

215-
Multicodec name: `transport-graphsync-filecoinv1`
216-
Schema: `graphsync-filecoinv1`
217-
Specification: [ipfs/go-graphsync/blob/main/docs/architecture.md](https://github.com/ipfs/go-graphsync/blob/main/docs/architecture.md)
270+
- Multicodec name: `transport-graphsync-filecoinv1`
271+
- Schema: `graphsync-filecoinv1`
272+
- Specification: [ipfs/go-graphsync/blob/main/docs/architecture.md](https://github.com/ipfs/go-graphsync/blob/main/docs/architecture.md)
218273

219274
#### Filecoin Graphsync Read Provider Records
220275

0 commit comments

Comments
 (0)