feat: w3 aggregate protocol client and api implementation - #787
Conversation
6b78e8d to
319bf4b
Compare
Upgrades ucanto to 8. There are no breaking changes that affect normal functionality as expected
269f9fc to
83b0ed3
Compare
5bfcb09 to
372c2f3
Compare
b0dcbb1 to
30d6d60
Compare
|
While writing this and getting to know more about
|
| }, | ||
| "rules": { | ||
| "unicorn/prefer-number-properties": "off", | ||
| "unicorn/expiring-todo-comments": "off", |
There was a problem hiding this comment.
lint fails with TODO: ... comments now ...
|
A few follow ups will be worked on:
|
alanshaw
left a comment
There was a problem hiding this comment.
LGTM, just a minor non blocking consistency thing on the failures...
|
|
||
| class AggregateNotFound extends Server.Failure { | ||
| get name() { | ||
| return /** @type {const} */ ('AggregateGetFailure') |
There was a problem hiding this comment.
| return /** @type {const} */ ('AggregateGetFailure') | |
| return /** @type {const} */ ('AggregateNotFoundFailure') |
| get name() { | ||
| return /** @type {const} */ ('AggregateOfferInvalidUrlFailure') | ||
| } | ||
| } |
There was a problem hiding this comment.
As far as I can tell most of the time we don't suffix with Error or Failure, e.g.
https://github.com/web3-storage/w3up/blob/57182b1d193924a6c5eefa3e01ef56719303c42e/packages/capabilities/src/types.ts#L47-L49
https://github.com/web3-storage/w3up/blob/57182b1d193924a6c5eefa3e01ef56719303c42e/packages/upload-api/src/types.ts#L236C14-L238
Perhaps be consistent with this?
🤖 I have created a release *beep* *boop* --- ## [6.0.0](capabilities-v5.0.1...capabilities-v6.0.0) (2023-06-07) ### ⚠ BREAKING CHANGES * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](#790)) ### Features * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](#790)) ([4f6ddb6](4f6ddb6)) * w3 aggregate protocol client and api implementation ([#787](#787)) ([b58069d](b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [14.0.0](access-v13.0.2...access-v14.0.0) (2023-06-07) ### ⚠ BREAKING CHANGES * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](#790)) ### Features * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](#790)) ([4f6ddb6](4f6ddb6)) * w3 aggregate protocol client and api implementation ([#787](#787)) ([b58069d](b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
🤖 I have created a release *beep* *boop* --- ## [7.0.0](w3up-client-v6.0.1...w3up-client-v7.0.0) (2023-06-08) ### ⚠ BREAKING CHANGES * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](#790)) ### Features * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](#790)) ([4f6ddb6](4f6ddb6)) * w3 aggregate protocol client and api implementation ([#787](#787)) ([b58069d](b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Previous PR went out without workflows commited #787 🤦🏼♂️ --------- Co-authored-by: Travis Vachon <travis.vachon@protocol.ai> Co-authored-by: Travis Vachon <travis.vachon@gmail.com>
🤖 I have created a release *beep* *boop* --- ## [9.1.0](upload-client-v9.0.1...upload-client-v9.1.0) (2023-06-20) ### Features * w3 aggregate protocol client and api implementation ([#787](#787)) ([b58069d](b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Context storacha/w3up#787 (comment) --------- Co-authored-by: Irakli Gozalishvili <contact@gozala.io>
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2023-07-11) ### ⚠ BREAKING CHANGES * aggregate capabilities now have different nb properties and aggregate client api was simplified ### Features * w3 aggregate protocol client and api implementation ([#787](#787)) ([b58069d](b58069d)) ### Bug Fixes * update aggregate spec in client and api ([#824](#824)) ([ebefd88](ebefd88)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2023-07-11) ### ⚠ BREAKING CHANGES * aggregate capabilities now have different nb properties and aggregate client api was simplified ### Features * w3 aggregate protocol client and api implementation ([#787](#787)) ([b58069d](b58069d)) ### Bug Fixes * aggregate api test link comparison type ([#816](#816)) ([81bdf1c](81bdf1c)) * update aggregate spec in client and api ([#824](#824)) ([ebefd88](ebefd88)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Vasco Santos <santos.vasco10@gmail.com>
🤖 I have created a release *beep* *boop* --- ## [6.0.0](storacha/w3up@capabilities-v5.0.1...capabilities-v6.0.0) (2023-06-07) ### ⚠ BREAKING CHANGES * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](storacha/w3up#790)) ### Features * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](storacha/w3up#790)) ([4f6ddb6](storacha/w3up@4f6ddb6)) * w3 aggregate protocol client and api implementation ([#787](storacha/w3up#787)) ([b58069d](storacha/w3up@b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [14.0.0](storacha/w3up@access-v13.0.2...access-v14.0.0) (2023-06-07) ### ⚠ BREAKING CHANGES * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](storacha/w3up#790)) ### Features * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](storacha/w3up#790)) ([4f6ddb6](storacha/w3up@4f6ddb6)) * w3 aggregate protocol client and api implementation ([#787](storacha/w3up#787)) ([b58069d](storacha/w3up@b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
🤖 I have created a release *beep* *boop* --- ## [7.0.0](storacha/w3up@w3up-client-v6.0.1...w3up-client-v7.0.0) (2023-06-08) ### ⚠ BREAKING CHANGES * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](storacha/w3up#790)) ### Features * merge `@web3-storage/access-api` into `@web3-storage/upload-api` ([#790](storacha/w3up#790)) ([4f6ddb6](storacha/w3up@4f6ddb6)) * w3 aggregate protocol client and api implementation ([#787](storacha/w3up#787)) ([b58069d](storacha/w3up@b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Previous PR went out without workflows commited storacha/w3up#787 🤦🏼♂️ --------- Co-authored-by: Travis Vachon <travis.vachon@protocol.ai> Co-authored-by: Travis Vachon <travis.vachon@gmail.com>
🤖 I have created a release *beep* *boop* --- ## [9.1.0](storacha/w3up@upload-client-v9.0.1...upload-client-v9.1.0) (2023-06-20) ### Features * w3 aggregate protocol client and api implementation ([#787](storacha/w3up#787)) ([b58069d](storacha/w3up@b58069d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2023-07-11) ### ⚠ BREAKING CHANGES * aggregate capabilities now have different nb properties and aggregate client api was simplified ### Features * w3 aggregate protocol client and api implementation ([#787](storacha/w3up#787)) ([b58069d](storacha/w3up@b58069d)) ### Bug Fixes * update aggregate spec in client and api ([#824](storacha/w3up#824)) ([ebefd88](storacha/w3up@ebefd88)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2023-07-11) ### ⚠ BREAKING CHANGES * aggregate capabilities now have different nb properties and aggregate client api was simplified ### Features * w3 aggregate protocol client and api implementation ([#787](storacha/w3up#787)) ([b58069d](storacha/w3up@b58069d)) ### Bug Fixes * aggregate api test link comparison type ([#816](storacha/w3up#816)) ([81bdf1c](storacha/w3up@81bdf1c)) * update aggregate spec in client and api ([#824](storacha/w3up#824)) ([ebefd88](storacha/w3up@ebefd88)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Vasco Santos <santos.vasco10@gmail.com>
This PR is a first iteration for w3 aggregate client and API implementations. It follows same patterns we identified while working on
upload-apiandupload-clientand is agnostic from the deployment service.aggregate-apiexposes a lib and a set of tests that implementers with infra should follow, as well as the needed interfaces that must be fulfilled. It also includesfxusage foraggregate/offerreturn valueIt follows spec https://github.com/web3-storage/specs/blob/feat/filecoin-spec/w3-aggregation.md
There are two interfaces defined in this service:
offerStore- responsible for receiving offers to be queued. Implementer receivescommDof aggregate together with Offer content. These will be used to give SPs. Note that implementer should keep track of the offer'scommDso that it can query over time when a deal is done (or failures), so that thefxinvocation can be executed and a receipt generatedaggregateStore- store of aggregates already places with SPs (implementor likespade-proxywill have this store hooked with spade DB)It is worth noting that this is a first iteration and not the complete thing at this moment. More specifically, in follow up iterations we need to:
commitmentProofaggregate-api should validate commD #805aggregateGettypes are still unknown at this moment aggregate-apiaggregate/getset types #807New detailed issues for above will be created before this PR gets merged.
Part of storacha/w3filecoin-infra#19
Still to do:
Usage:
aggregate-api- feat: add ucanto aggregation api service web3-storage/dealer#2aggregate-client- feat: integrate aggregation client w3filecoin-infra#22Closes #772 and #773