Skip to content

Commit

Permalink
w3-rate-limit wip -> reliable (#89)
Browse files Browse the repository at this point in the history
Motivation:
* link to implementations
* change status from wip to reliable since it's implemented and
operating
  • Loading branch information
gobengo authored Jan 17, 2024
1 parent 480cdf9 commit 98630cb
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions w3-rate-limit.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Rate Limit Protocol

![status:wip](https://img.shields.io/badge/status-wip-orange.svg?style=flat-square)

## Editors

- [Travis Vachon](https://github.com/travis), [Protocol Labs](https://protocol.ai/)
Expand All @@ -10,7 +8,14 @@

- [Travis Vachon](https://github.com/travis), [Protocol Labs](https://protocol.ai/)

# Abstract
## Status

![reliable badge](https://img.shields.io/badge/status-reliable-green.svg?style=flat-square):

Reliable:
a spec that has been implemented ([in @web3-storage/upload-api](https://github.com/web3-storage/w3up/blob/main/packages/upload-api/src/rate-limit.js)). It will change as we learn how it works in practice.

## Abstract

Storage providers in the w3 family of protocols need to be able to rate limit (and in many cases, fully block) abusive users
from using their service. We describe a set of capabilities for tracking and administering such rate limits.
Expand Down Expand Up @@ -85,6 +90,11 @@ export const add = capability({
})
```

##### Implementations

- @web3-storage/capabilities [defines `rate-limit/add` capability](https://github.com/web3-storage/w3up/blob/3244a26ac10fb76858903f5271111d350cca05e8/packages/capabilities/src/rate-limit.js#L20)
- @web3-storage/upload-api [handles `rate-limit/add` invocations](https://github.com/web3-storage/w3up/blob/3244a26ac10fb76858903f5271111d350cca05e8/packages/upload-api/src/rate-limit.js#L10)

#### rate-limit/list

Given a subject ID (e.g., a`did:mailto`, a URL, a domain name, etc), list all rate limits that apply to the given subject.
Expand Down Expand Up @@ -131,6 +141,11 @@ export const remove = capability({
})
```

##### Implementations

- @web3-storage/capabilities [defines `rate-limit/list` capability](https://github.com/web3-storage/w3up/blob/3244a26ac10fb76858903f5271111d350cca05e8/packages/capabilities/src/rate-limit.js#L58)
- @web3-storage/upload-api [handles `rate-limit/list` invocations](https://github.com/web3-storage/w3up/blob/3244a26ac10fb76858903f5271111d350cca05e8/packages/upload-api/src/rate-limit.js#L12)

#### rate-limit/remove

Given a rate limit ID (returned from `rate-limit/add` or `rate-limit/list`), remove the identified rate limit.
Expand Down Expand Up @@ -167,3 +182,8 @@ export const remove = capability({
},
})
```

##### Implementations

- @web3-storage/capabilities [defines `rate-limit/remove` capability](https://github.com/web3-storage/w3up/blob/3244a26ac10fb76858903f5271111d350cca05e8/packages/capabilities/src/rate-limit.js#L40)
- @web3-storage/upload-api [handles `rate-limit/remove` invocations](https://github.com/web3-storage/w3up/blob/3244a26ac10fb76858903f5271111d350cca05e8/packages/upload-api/src/rate-limit.js#L11)

0 comments on commit 98630cb

Please sign in to comment.