v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
4 changed files with 17 additions and 10 deletions
Showing only changes of commit caf62d9370 - Show all commits

View File

@ -125,7 +125,7 @@ func fromMiner(cctx *cli.Context) (err error) {
return fmt.Errorf("could not read config.toml: %w", err) return fmt.Errorf("could not read config.toml: %w", err)
} }
lpCfg := config.DefaultLotusProvider() lpCfg := config.DefaultLotusProvider()
_, err = deps.LoadConfigWithUpgrades(string(buf), &lpCfg) _, err = deps.LoadConfigWithUpgrades(string(buf), lpCfg)
if err != nil { if err != nil {
return fmt.Errorf("could not decode toml: %w", err) return fmt.Errorf("could not decode toml: %w", err)
} }

View File

@ -86,7 +86,14 @@ var configNewCmd = &cli.Command{
return xerrors.Errorf("Failed to get miner info: %w", err) return xerrors.Errorf("Failed to get miner info: %w", err)
} }
lpCfg.Addresses.MinerAddresses = append(lpCfg.Addresses.MinerAddresses, addr) lpCfg.Addresses = append(lpCfg.Addresses, config.LotusProviderAddresses{
PreCommitControl: nil,
CommitControl: nil,
TerminateControl: nil,
DisableOwnerFallback: false,
DisableWorkerFallback: false,
MinerAddresses: []string{addr},
})
} }
{ {

View File

@ -3,6 +3,7 @@ package lpseal
import ( import (
"bytes" "bytes"
"context" "context"
"github.com/filecoin-project/lotus/provider/multictladdr"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -19,7 +20,6 @@ import (
"github.com/filecoin-project/lotus/lib/harmony/resources" "github.com/filecoin-project/lotus/lib/harmony/resources"
"github.com/filecoin-project/lotus/provider/lpmessage" "github.com/filecoin-project/lotus/provider/lpmessage"
"github.com/filecoin-project/lotus/storage/ctladdr" "github.com/filecoin-project/lotus/storage/ctladdr"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
) )
type SubmitCommitAPI interface { type SubmitCommitAPI interface {
@ -36,12 +36,12 @@ type SubmitCommitTask struct {
api SubmitCommitAPI api SubmitCommitAPI
sender *lpmessage.Sender sender *lpmessage.Sender
as sealing.AddressSelector as *multictladdr.MultiAddressSelector
maxFee types.FIL maxFee types.FIL
} }
func NewSubmitCommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitCommitAPI, sender *lpmessage.Sender, as sealing.AddressSelector, maxFee types.FIL) *SubmitCommitTask { func NewSubmitCommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitCommitAPI, sender *lpmessage.Sender, as *multictladdr.MultiAddressSelector, maxFee types.FIL) *SubmitCommitTask {
return &SubmitCommitTask{ return &SubmitCommitTask{
sp: sp, sp: sp,
db: db, db: db,
@ -118,7 +118,7 @@ func (s *SubmitCommitTask) Do(taskID harmonytask.TaskID, stillOwned func() bool)
collateral = big.Zero() collateral = big.Zero()
} }
a, _, err := s.as.AddressFor(ctx, s.api, mi, api.CommitAddr, collateral, big.Zero()) a, _, err := s.as.AddressFor(ctx, s.api, maddr, mi, api.CommitAddr, collateral, big.Zero())
if err != nil { if err != nil {
return false, xerrors.Errorf("getting address for precommit: %w", err) return false, xerrors.Errorf("getting address for precommit: %w", err)
} }

View File

@ -3,6 +3,7 @@ package lpseal
import ( import (
"bytes" "bytes"
"context" "context"
"github.com/filecoin-project/lotus/provider/multictladdr"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -21,7 +22,6 @@ import (
"github.com/filecoin-project/lotus/lib/harmony/resources" "github.com/filecoin-project/lotus/lib/harmony/resources"
"github.com/filecoin-project/lotus/provider/lpmessage" "github.com/filecoin-project/lotus/provider/lpmessage"
"github.com/filecoin-project/lotus/storage/ctladdr" "github.com/filecoin-project/lotus/storage/ctladdr"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
) )
type SubmitPrecommitTaskApi interface { type SubmitPrecommitTaskApi interface {
@ -35,12 +35,12 @@ type SubmitPrecommitTask struct {
db *harmonydb.DB db *harmonydb.DB
api SubmitPrecommitTaskApi api SubmitPrecommitTaskApi
sender *lpmessage.Sender sender *lpmessage.Sender
as sealing.AddressSelector as *multictladdr.MultiAddressSelector
maxFee types.FIL maxFee types.FIL
} }
func NewSubmitPrecommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitPrecommitTaskApi, sender *lpmessage.Sender, as sealing.AddressSelector, maxFee types.FIL) *SubmitPrecommitTask { func NewSubmitPrecommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitPrecommitTaskApi, sender *lpmessage.Sender, as *multictladdr.MultiAddressSelector, maxFee types.FIL) *SubmitPrecommitTask {
return &SubmitPrecommitTask{ return &SubmitPrecommitTask{
sp: sp, sp: sp,
db: db, db: db,
@ -146,7 +146,7 @@ func (s *SubmitPrecommitTask) Do(taskID harmonytask.TaskID, stillOwned func() bo
return false, xerrors.Errorf("getting miner info: %w", err) return false, xerrors.Errorf("getting miner info: %w", err)
} }
a, _, err := s.as.AddressFor(ctx, s.api, mi, api.PreCommitAddr, collateral, big.Zero()) a, _, err := s.as.AddressFor(ctx, s.api, maddr, mi, api.PreCommitAddr, collateral, big.Zero())
if err != nil { if err != nil {
return false, xerrors.Errorf("getting address for precommit: %w", err) return false, xerrors.Errorf("getting address for precommit: %w", err)
} }