Skip to content

Commit

Permalink
wip: ipip 0417
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed May 30, 2023
1 parent 36571b0 commit b3828f6
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 9 deletions.
54 changes: 54 additions & 0 deletions src/ipips/ipip-0417.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "IPIP-0417: TODO"
date: 2023-05-29
ipip: proposal
editors:
- name: Henrique Dias
github: hacdias
url: https://hacdias.com/
relatedIssues:
- https://github.com/ipfs/specs/pull/410
- https://github.com/ipfs/kubo/pull/9877
order: 417
tags: ['ipips']
---

## Summary

TODO

## Motivation

TODO

## Detailed design

TODO

## Test fixtures

TODO

## Design rationale

TODO

### User benefit

TODO

### Compatibility

TODO

### Security

TODO

### Alternatives

TODO

### Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
73 changes: 64 additions & 9 deletions src/routing/http-routing-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,38 @@ Response limit: 100 providers

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

### `GET /routing/v1/peers/{peer-id}`

#### Path Parameters

- `peer-id` is the [Peer ID](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md) to fetch peer records for.

#### Response Status Codes

- `200` (OK): the response body contains the peer record.
- `404` (Not Found): must be returned if no matching records are found.
- `422` (Unprocessable Entity): request does not conform to schema or semantic constraints.

#### Response Body

A single peer record.

<!-- ```json
{
"Providers": [
{
"Protocol": "<protocol_name>",
"Schema": "<schema>",
...
}
]
}
```
Response limit: 100 providers
Each object in the `Providers` list is a *read provider record*. -->

### `GET /routing/v1/ipns/{name}`

#### Path Parameters
Expand Down Expand Up @@ -148,9 +180,9 @@ with one *read provider record* per line:


```json
{"Protocol": "<protocol_name>", "Schema": "<schema>", ...}
{"Protocol": "<protocol_name>", "Schema": "<schema>", ...}
{"Protocol": "<protocol_name>", "Schema": "<schema>", ...}
{"Schema": "<schema>", ...}
{"Schema": "<schema>", ...}
{"Schema": "<schema>", ...}
...
```

Expand Down Expand Up @@ -183,15 +215,38 @@ Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, OPTIONS
```

## Known Schemas

This section contains a non-exhaustive list of known schemas that MAY be supported by clients and servers.

### Peer

The `peer` schema represents an arbitrary peer.


```json
{
"Schema": "peer",
"ID": "12D3K...",
"Addrs": ["/ip4/..."],
"Protocols": ["transport-bitswap", ...]
}
```

- `ID`: the [Peer ID](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md).
- `Addrs`: a list of known [multiaddrs][multiaddr] for this peer. This list MAY be incomplete.
- `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.


## Known Transfer Protocols

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

### Bitswap

Multicodec name: `transport-bitswap`
Schema: `bitswap`
Specification: [ipfs/specs/BITSWAP.md](https://github.com/ipfs/specs/blob/main/BITSWAP.md)
- Multicodec name: `transport-bitswap`
- Schema: `bitswap`
- Specification: [ipfs/specs/BITSWAP.md](https://github.com/ipfs/specs/blob/main/BITSWAP.md)

#### Bitswap Read Provider Records

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

### Filecoin Graphsync

Multicodec name: `transport-graphsync-filecoinv1`
Schema: `graphsync-filecoinv1`
Specification: [ipfs/go-graphsync/blob/main/docs/architecture.md](https://github.com/ipfs/go-graphsync/blob/main/docs/architecture.md)
- Multicodec name: `transport-graphsync-filecoinv1`
- Schema: `graphsync-filecoinv1`
- Specification: [ipfs/go-graphsync/blob/main/docs/architecture.md](https://github.com/ipfs/go-graphsync/blob/main/docs/architecture.md)

#### Filecoin Graphsync Read Provider Records

Expand Down

0 comments on commit b3828f6

Please sign in to comment.