Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote calc winningpost proof #5884

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/api_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"context"
"time"

"github.com/filecoin-project/lotus/chain/actors/builtin"

"github.com/google/uuid"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
Expand Down Expand Up @@ -165,6 +167,8 @@ type StorageMiner interface {
CreateBackup(ctx context.Context, fpath string) error //perm:admin

CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storage.SectorRef, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin

ComputeProof(ctx context.Context, ssi []builtin.SectorInfo, rand abi.PoStRandomness) ([]builtin.PoStProof, error) //perm:read
}

var _ storiface.WorkerReturn = *new(StorageMiner)
Expand Down
7 changes: 7 additions & 0 deletions api/apistruct/struct.go

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

Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
Binary file modified build/openrpc/worker.json.gz
Binary file not shown.
20 changes: 20 additions & 0 deletions documentation/en/api-methods-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* [AuthVerify](#AuthVerify)
* [Check](#Check)
* [CheckProvable](#CheckProvable)
* [Compute](#Compute)
* [ComputeProof](#ComputeProof)
* [Create](#Create)
* [CreateBackup](#CreateBackup)
* [Deals](#Deals)
Expand Down Expand Up @@ -295,6 +297,24 @@ Response:
}
```

## Compute


### ComputeProof


Perms: read

Inputs:
```json
[
null,
null
]
```

Response: `null`

## Create


Expand Down
10 changes: 9 additions & 1 deletion node/impl/storminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import (
"strconv"
"time"

"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/gen"

"github.com/filecoin-project/lotus/build"
"github.com/google/uuid"
"github.com/ipfs/go-cid"
Expand Down Expand Up @@ -63,7 +66,8 @@ type StorageMinerAPI struct {
AddrSel *storage.AddressSelector
DealPublisher *storageadapter.DealPublisher

DS dtypes.MetadataDS
Epp gen.WinningPoStProver
DS dtypes.MetadataDS

ConsiderOnlineStorageDealsConfigFunc dtypes.ConsiderOnlineStorageDealsConfigFunc
SetConsiderOnlineStorageDealsConfigFunc dtypes.SetConsiderOnlineStorageDealsConfigFunc
Expand Down Expand Up @@ -696,4 +700,8 @@ func (sm *StorageMinerAPI) Discover(ctx context.Context) (apitypes.OpenRPCDocume
return build.OpenRPCDiscoverJSON_Miner(), nil
}

func (sm *StorageMinerAPI) ComputeProof(ctx context.Context, ssi []builtin.SectorInfo, rand abi.PoStRandomness) ([]builtin.PoStProof, error) {
return sm.Epp.ComputeProof(ctx, ssi, rand)
}

var _ api.StorageMiner = &StorageMinerAPI{}