Merge branch 'master' into feat/testnet2
This commit is contained in:
commit
50bac00329
@ -100,7 +100,7 @@ jobs:
|
|||||||
description: gotestsum format. https://github.com/gotestyourself/gotestsum#format
|
description: gotestsum format. https://github.com/gotestyourself/gotestsum#format
|
||||||
coverage:
|
coverage:
|
||||||
type: string
|
type: string
|
||||||
default: -coverprofile=coverage.txt
|
default: -coverprofile=coverage.txt -coverpkg=github.com/filecoin-project/lotus/...
|
||||||
description: Coverage flag. Set to the empty string to disable.
|
description: Coverage flag. Set to the empty string to disable.
|
||||||
codecov-upload:
|
codecov-upload:
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -190,7 +190,7 @@ jobs:
|
|||||||
- install-deps
|
- install-deps
|
||||||
- go/mod-download
|
- go/mod-download
|
||||||
- run:
|
- run:
|
||||||
command: make buildall
|
command: make build
|
||||||
no_output_timeout: 30m
|
no_output_timeout: 30m
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: lotus
|
path: lotus
|
||||||
@ -253,7 +253,8 @@ workflows:
|
|||||||
jobs:
|
jobs:
|
||||||
- lint-changes:
|
- lint-changes:
|
||||||
args: "--new-from-rev origin/master"
|
args: "--new-from-rev origin/master"
|
||||||
- test
|
- test:
|
||||||
|
codecov-upload: true
|
||||||
- test-short:
|
- test-short:
|
||||||
go-test-flags: "--timeout 10m --short"
|
go-test-flags: "--timeout 10m --short"
|
||||||
- mod-tidy-check
|
- mod-tidy-check
|
||||||
|
@ -1 +1,3 @@
|
|||||||
comment: off
|
comment: off
|
||||||
|
ignore:
|
||||||
|
- "cbor_gen.go"
|
||||||
|
@ -8,6 +8,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
||||||
|
"github.com/ipfs/go-datastore"
|
||||||
|
"github.com/ipfs/go-datastore/namespace"
|
||||||
badger "github.com/ipfs/go-ds-badger2"
|
badger "github.com/ipfs/go-ds-badger2"
|
||||||
logging "github.com/ipfs/go-log/v2"
|
logging "github.com/ipfs/go-log/v2"
|
||||||
"github.com/mitchellh/go-homedir"
|
"github.com/mitchellh/go-homedir"
|
||||||
@ -196,7 +198,7 @@ var aggregateSectorDirsCmd = &cli.Command{
|
|||||||
SectorSize: ssize,
|
SectorSize: ssize,
|
||||||
Dir: destdir,
|
Dir: destdir,
|
||||||
WorkerThreads: 2,
|
WorkerThreads: 2,
|
||||||
}, agmds)
|
}, namespace.Wrap(agmds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -257,7 +259,7 @@ var aggregateSectorDirsCmd = &cli.Command{
|
|||||||
SectorSize: genm.SectorSize,
|
SectorSize: genm.SectorSize,
|
||||||
Dir: dir,
|
Dir: dir,
|
||||||
WorkerThreads: 2,
|
WorkerThreads: 2,
|
||||||
}, mds)
|
}, namespace.Wrap(mds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
||||||
|
"github.com/ipfs/go-datastore"
|
||||||
|
"github.com/ipfs/go-datastore/namespace"
|
||||||
badger "github.com/ipfs/go-ds-badger2"
|
badger "github.com/ipfs/go-ds-badger2"
|
||||||
logging "github.com/ipfs/go-log/v2"
|
logging "github.com/ipfs/go-log/v2"
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
@ -43,7 +45,7 @@ func PreSeal(maddr address.Address, ssize uint64, offset uint64, sectors int, sb
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
sb, err := sectorbuilder.New(cfg, mds)
|
sb, err := sectorbuilder.New(cfg, namespace.Wrap(mds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
|
|
||||||
paramfetch "github.com/filecoin-project/go-paramfetch"
|
paramfetch "github.com/filecoin-project/go-paramfetch"
|
||||||
"github.com/ipfs/go-datastore"
|
"github.com/ipfs/go-datastore"
|
||||||
|
"github.com/ipfs/go-datastore/namespace"
|
||||||
badger "github.com/ipfs/go-ds-badger2"
|
badger "github.com/ipfs/go-ds-badger2"
|
||||||
"github.com/libp2p/go-libp2p-core/crypto"
|
"github.com/libp2p/go-libp2p-core/crypto"
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
@ -176,7 +177,7 @@ var initCmd = &cli.Command{
|
|||||||
SectorSize: ssize,
|
SectorSize: ssize,
|
||||||
WorkerThreads: 2,
|
WorkerThreads: 2,
|
||||||
Dir: pssb,
|
Dir: pssb,
|
||||||
}, oldmds)
|
}, namespace.Wrap(oldmds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("failed to open up preseal sectorbuilder: %w", err)
|
return xerrors.Errorf("failed to open up preseal sectorbuilder: %w", err)
|
||||||
}
|
}
|
||||||
@ -185,7 +186,7 @@ var initCmd = &cli.Command{
|
|||||||
SectorSize: ssize,
|
SectorSize: ssize,
|
||||||
WorkerThreads: 2,
|
WorkerThreads: 2,
|
||||||
Dir: lr.Path(),
|
Dir: lr.Path(),
|
||||||
}, mds)
|
}, namespace.Wrap(mds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("failed to open up sectorbuilder: %w", err)
|
return xerrors.Errorf("failed to open up sectorbuilder: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ func SetupBlockProducer(lc fx.Lifecycle, ds dtypes.MetadataDS, api api.FullNode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func SectorBuilder(cfg *sectorbuilder.Config, ds dtypes.MetadataDS) (*sectorbuilder.SectorBuilder, error) {
|
func SectorBuilder(cfg *sectorbuilder.Config, ds dtypes.MetadataDS) (*sectorbuilder.SectorBuilder, error) {
|
||||||
sb, err := sectorbuilder.New(cfg, ds)
|
sb, err := sectorbuilder.New(cfg, namespace.Wrap(ds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -9,20 +9,18 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/build"
|
"github.com/filecoin-project/go-address"
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p-core/crypto"
|
|
||||||
|
|
||||||
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
||||||
|
"github.com/filecoin-project/lotus/build"
|
||||||
"github.com/ipfs/go-datastore"
|
"github.com/ipfs/go-datastore"
|
||||||
|
"github.com/ipfs/go-datastore/namespace"
|
||||||
badger "github.com/ipfs/go-ds-badger2"
|
badger "github.com/ipfs/go-ds-badger2"
|
||||||
logging "github.com/ipfs/go-log/v2"
|
logging "github.com/ipfs/go-log/v2"
|
||||||
|
"github.com/libp2p/go-libp2p-core/crypto"
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
|
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/api"
|
"github.com/filecoin-project/lotus/api"
|
||||||
"github.com/filecoin-project/lotus/api/client"
|
"github.com/filecoin-project/lotus/api/client"
|
||||||
"github.com/filecoin-project/lotus/api/test"
|
"github.com/filecoin-project/lotus/api/test"
|
||||||
@ -231,7 +229,7 @@ func builder(t *testing.T, nFull int, storage []int) ([]test.TestNode, []test.Te
|
|||||||
WorkerThreads: 2,
|
WorkerThreads: 2,
|
||||||
Miner: genMiner,
|
Miner: genMiner,
|
||||||
Dir: psd,
|
Dir: psd,
|
||||||
}, mds)
|
}, namespace.Wrap(mds, datastore.NewKey("/sectorbuilder")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user