Skip to content

Commit

Permalink
refactor: merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Mar 14, 2023
2 parents 60806af + 9c0b02c commit 28881a9
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 144 deletions.
3 changes: 2 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ type Boost interface {
BoostDagstoreRecoverShard(ctx context.Context, key string) error //perm:admin
BoostDagstoreGC(ctx context.Context) ([]DagstoreShardResult, error) //perm:admin
BoostDagstorePiecesContainingMultihash(ctx context.Context, mh multihash.Multihash) ([]cid.Cid, error) //perm:read
BoostDagstoreListShards(ctx context.Context) ([]DagstoreShardInfo, error) //perm:read
BoostDagstoreListShards(ctx context.Context) ([]DagstoreShardInfo, error) //perm:admin
BoostMakeDeal(context.Context, smtypes.DealParams) (*ProviderDealRejectionInfo, error) //perm:write

// MethodGroup: Blockstore
BlockstoreGet(ctx context.Context, c cid.Cid) ([]byte, error) //perm:read
Expand Down
15 changes: 14 additions & 1 deletion api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified build/openrpc/boost.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package build

var CurrentCommit string

const BuildVersion = "1.6.0-rc3"
const BuildVersion = "1.6.0"

func UserVersion() string {
return BuildVersion + CurrentCommit
Expand Down
134 changes: 0 additions & 134 deletions docker/devnet/boost/sample/random.sh

This file was deleted.

58 changes: 57 additions & 1 deletion documentation/en/api-v1-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* [BoostDummyDeal](#boostdummydeal)
* [BoostIndexerAnnounceAllDeals](#boostindexerannouncealldeals)
* [BoostIndexerListMultihashes](#boostindexerlistmultihashes)
* [BoostMakeDeal](#boostmakedeal)
* [BoostOfflineDealWithData](#boostofflinedealwithdata)
* [Deals](#deals)
* [DealsConsiderOfflineRetrievalDeals](#dealsconsiderofflineretrievaldeals)
Expand Down Expand Up @@ -272,7 +273,7 @@ Response: `{}`
### BoostDagstoreListShards


Perms: read
Perms: admin

Inputs: `null`

Expand Down Expand Up @@ -553,6 +554,61 @@ Response:
]
```

### BoostMakeDeal


Perms: write

Inputs:
```json
[
{
"DealUUID": "07070707-0707-0707-0707-070707070707",
"IsOffline": true,
"ClientDealProposal": {
"Proposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"ClientSignature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
},
"DealDataRoot": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Transfer": {
"Type": "string value",
"ClientID": "string value",
"Params": "Ynl0ZSBhcnJheQ==",
"Size": 42
},
"RemoveUnsealedCopy": true,
"SkipIPNIAnnounce": true
}
]
```

Response:
```json
{
"Accepted": true,
"Reason": "string value"
}
```

### BoostOfflineDealWithData


Expand Down
5 changes: 5 additions & 0 deletions node/impl/boost.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ func (sm *BoostAPI) BoostDagstoreDestroyShard(ctx context.Context, key string) e
return nil
}

func (sm *BoostAPI) BoostMakeDeal(ctx context.Context, params types.DealParams) (*api.ProviderDealRejectionInfo, error) {
log.Infow("received json-rpc deal proposal", "id", params.DealUUID)
return sm.StorageProvider.ExecuteDeal(ctx, &params, "json-rpc-deal")
}

func (sm *BoostAPI) BlockstoreGet(ctx context.Context, c cid.Cid) ([]byte, error) {
return sm.Pd.BlockstoreGet(ctx, c)
}
Expand Down
12 changes: 6 additions & 6 deletions react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28881a9

Please sign in to comment.