Skip to content

Commit

Permalink
numassigner: Fix missing api perms
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Aug 22, 2022
1 parent 129eba2 commit 64290b6
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ type FullNode interface {
// StateMinerSectorCount returns the number of sectors in a miner's sector set and proving set
StateMinerSectorCount(context.Context, address.Address, types.TipSetKey) (MinerSectors, error) //perm:read
// StateMinerAllocated returns a bitfield containing all sector numbers marked as allocated in miner state
StateMinerAllocated(context.Context, address.Address, types.TipSetKey) (*bitfield.BitField, error)
StateMinerAllocated(context.Context, address.Address, types.TipSetKey) (*bitfield.BitField, error) //perm:read
// StateCompute is a flexible command that applies the given messages on the given tipset.
// The messages are run as though the VM were at the provided height.
//
Expand Down
8 changes: 4 additions & 4 deletions api/api_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ type StorageMiner interface {
SectorAbortUpgrade(context.Context, abi.SectorNumber) error //perm:admin

// SectorNumAssignerMeta returns sector number assigner metadata - reserved/allocated
SectorNumAssignerMeta(ctx context.Context) (NumAssignerMeta, error)
SectorNumReservations(ctx context.Context) (map[string]bitfield.BitField, error)
SectorNumReserve(ctx context.Context, name string, field bitfield.BitField, force bool) error
SectorNumFree(ctx context.Context, name string) error
SectorNumAssignerMeta(ctx context.Context) (NumAssignerMeta, error) //perm:read
SectorNumReservations(ctx context.Context) (map[string]bitfield.BitField, error) //perm:read
SectorNumReserve(ctx context.Context, name string, field bitfield.BitField, force bool) error //perm:admin
SectorNumFree(ctx context.Context, name string) error //perm:admin

// WorkerConnect tells the node to connect to workers RPC
WorkerConnect(context.Context, string) error //perm:admin retry:true
Expand Down
10 changes: 5 additions & 5 deletions 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/miner.json.gz
Binary file not shown.
14 changes: 7 additions & 7 deletions documentation/en/api-v0-methods-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,7 @@ Response: `{}`
SectorNumAssignerMeta returns sector number assigner metadata - reserved/allocated


Perms:
Perms: read

Inputs: `null`

Expand All @@ -2966,9 +2966,9 @@ Response:
```

### SectorNumFree
There are not yet any comments for this method.

Perms:

Perms: admin

Inputs:
```json
Expand All @@ -2980,9 +2980,9 @@ Inputs:
Response: `{}`

### SectorNumReservations
There are not yet any comments for this method.

Perms:

Perms: read

Inputs: `null`

Expand All @@ -2999,9 +2999,9 @@ Response:
```

### SectorNumReserve
There are not yet any comments for this method.

Perms:

Perms: admin

Inputs:
```json
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/api-v1-unstable-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -6159,7 +6159,7 @@ Response:
StateMinerAllocated returns a bitfield containing all sector numbers marked as allocated in miner state


Perms:
Perms: read

Inputs:
```json
Expand Down
4 changes: 2 additions & 2 deletions testplans/lotus-soup/testkit/role_miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import (
"github.com/filecoin-project/lotus/node"
"github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/paths"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)

Expand Down Expand Up @@ -190,7 +190,7 @@ func PrepareMiner(t *TestEnvironment) (*LotusMiner, error) {
return nil, err
}

nic := storedcounter.New(ds, datastore.NewKey(modules.StorageCounterDSPrefix))
nic := storedcounter.New(ds, datastore.NewKey(sealing.StorageCounterDSPrefix))
for i := 0; i < (sectors + 1); i++ {
_, err = nic.Next()
if err != nil {
Expand Down

0 comments on commit 64290b6

Please sign in to comment.