Skip to content

Commit 6484461

Browse files
author
LexLuthr
committed
Merge branch 'main' into feat/noncar-files
2 parents cf955d6 + 69030f6 commit 6484461

File tree

30 files changed

+721
-267
lines changed

30 files changed

+721
-267
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ docsgen-openrpc-boost: docsgen-openrpc-bin
217217

218218
## DOCKER IMAGES
219219
docker_user?=filecoin
220-
lotus_version?=v1.25.0-rc1
220+
lotus_version?=v1.25.0
221221
ffi_from_source?=0
222222
build_lotus?=0
223223
build_boost?=1

build/openrpc/boost.json.gz

-4 Bytes
Binary file not shown.

build/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func BuildTypeString() string {
3131
}
3232
}
3333

34-
const BuildVersion = "2.1.0-rc3"
34+
const BuildVersion = "2.1.0"
3535

3636
func UserVersion() string {
3737
return BuildVersion + BuildTypeString() + CurrentCommit

cmd/boost/wallet_cmd.go

+31-6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import (
66
"encoding/json"
77
"fmt"
88
"os"
9+
"os/signal"
910
"strings"
11+
"syscall"
1012

13+
"github.com/dustin/go-humanize"
1114
"github.com/filecoin-project/boost/cli/node"
1215
"github.com/filecoin-project/boost/cmd"
1316
"github.com/filecoin-project/go-address"
@@ -17,6 +20,7 @@ import (
1720
lcli "github.com/filecoin-project/lotus/cli"
1821
"github.com/filecoin-project/lotus/lib/tablewriter"
1922
"github.com/urfave/cli/v2"
23+
"golang.org/x/term"
2024
)
2125

2226
var walletCmd = &cli.Command{
@@ -203,6 +207,8 @@ var walletList = &cli.Command{
203207
wallet[dataCapKey] = dcap
204208
if !cctx.Bool("json") && dcap == nil {
205209
wallet[dataCapKey] = "X"
210+
} else if dcap != nil {
211+
wallet[dataCapKey] = humanize.IBytes(dcap.Int.Uint64())
206212
}
207213
} else {
208214
wallet[dataCapKey] = "n/a"
@@ -385,13 +391,32 @@ var walletImport = &cli.Command{
385391

386392
var inpdata []byte
387393
if !cctx.Args().Present() || cctx.Args().First() == "-" {
388-
reader := bufio.NewReader(os.Stdin)
389-
fmt.Print("Enter private key: ")
390-
indata, err := reader.ReadBytes('\n')
391-
if err != nil {
392-
return err
394+
if term.IsTerminal(int(os.Stdin.Fd())) {
395+
fmt.Print("Enter private key(not display in the terminal): ")
396+
397+
sigCh := make(chan os.Signal, 1)
398+
// Notify the channel when SIGINT is received
399+
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
400+
401+
go func() {
402+
<-sigCh
403+
fmt.Println("\nInterrupt signal received. Exiting...")
404+
os.Exit(1)
405+
}()
406+
407+
inpdata, err = term.ReadPassword(int(os.Stdin.Fd()))
408+
if err != nil {
409+
return err
410+
}
411+
fmt.Println()
412+
} else {
413+
reader := bufio.NewReader(os.Stdin)
414+
indata, err := reader.ReadBytes('\n')
415+
if err != nil {
416+
return err
417+
}
418+
inpdata = indata
393419
}
394-
inpdata = indata
395420

396421
} else {
397422
fdata, err := os.ReadFile(cctx.Args().First())

cmd/boostd/recover.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/filecoin-project/boost/db"
1919
bdclient "github.com/filecoin-project/boost/extern/boostd-data/client"
2020
"github.com/filecoin-project/boost/extern/boostd-data/model"
21+
"github.com/filecoin-project/boost/node/config"
2122
"github.com/filecoin-project/boost/piecedirectory"
2223
"github.com/filecoin-project/dagstore/mount"
2324
"github.com/filecoin-project/go-address"
@@ -103,6 +104,11 @@ var lidCmd = &cli.Command{
103104
Usage: "",
104105
Value: 4,
105106
},
107+
&cli.IntFlag{
108+
Name: "add-index-concurrency",
109+
Usage: "the maximum number of parallel tasks that a single add index operation can be split into",
110+
Value: config.DefaultAddIndexConcurrency,
111+
},
106112
&cli.BoolFlag{
107113
Name: "ignore-commp",
108114
Usage: "whether we should ignore sanity check of local data vs chain data",
@@ -203,7 +209,7 @@ func action(cctx *cli.Context) error {
203209
return fmt.Errorf("connecting to local index directory service: %w", err)
204210
}
205211
pr := &piecedirectory.SectorAccessorAsPieceReader{SectorAccessor: sa}
206-
pd = piecedirectory.NewPieceDirectory(cl, pr, cctx.Int("add-index-throttle"))
212+
pd = piecedirectory.NewPieceDirectory(cl, pr, cctx.Int("add-index-throttle"), piecedirectory.WithAddIndexConcurrency(cctx.Int("add-index-concurrency")))
207213
pd.Start(ctx)
208214
}
209215

cmd/booster-bitswap/run.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
bdclient "github.com/filecoin-project/boost/extern/boostd-data/client"
1414
"github.com/filecoin-project/boost/extern/boostd-data/shared/tracing"
1515
"github.com/filecoin-project/boost/metrics"
16+
"github.com/filecoin-project/boost/node/config"
1617
"github.com/filecoin-project/boost/piecedirectory"
1718
lcli "github.com/filecoin-project/lotus/cli"
1819
"github.com/libp2p/go-libp2p/core/peer"
@@ -67,6 +68,11 @@ var runCmd = &cli.Command{
6768
Usage: "the maximum number of add index operations that can run in parallel",
6869
Value: 4,
6970
},
71+
&cli.IntFlag{
72+
Name: "add-index-concurrency",
73+
Usage: "the maximum number of parallel tasks that a single add index operation can be split into",
74+
Value: config.DefaultAddIndexConcurrency,
75+
},
7076
&cli.StringFlag{
7177
Name: "proxy",
7278
Usage: "the multiaddr of the libp2p proxy that this node connects through",
@@ -234,7 +240,8 @@ var runCmd = &cli.Command{
234240
if err != nil {
235241
return fmt.Errorf("starting block filter: %w", err)
236242
}
237-
pd := piecedirectory.NewPieceDirectory(cl, sa, cctx.Int("add-index-throttle"))
243+
pd := piecedirectory.NewPieceDirectory(cl, sa, cctx.Int("add-index-throttle"),
244+
piecedirectory.WithAddIndexConcurrency(cctx.Int("add-index-concurrency")))
238245
remoteStore := remoteblockstore.NewRemoteBlockstore(pd, &bitswapBlockMetrics)
239246
server := NewBitswapServer(remoteStore, host, multiFilter)
240247

cmd/booster-http/run.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/filecoin-project/boost/extern/boostd-data/model"
1919
"github.com/filecoin-project/boost/extern/boostd-data/shared/tracing"
2020
"github.com/filecoin-project/boost/metrics"
21+
"github.com/filecoin-project/boost/node/config"
2122
"github.com/filecoin-project/boost/piecedirectory"
2223
"github.com/filecoin-project/dagstore/mount"
2324
"github.com/filecoin-project/go-address"
@@ -75,6 +76,11 @@ var runCmd = &cli.Command{
7576
Usage: "the maximum number of add index operations that can run in parallel",
7677
Value: 4,
7778
},
79+
&cli.IntFlag{
80+
Name: "add-index-concurrency",
81+
Usage: "the maximum number of parallel tasks that a single add index operation can be split into",
82+
Value: config.DefaultAddIndexConcurrency,
83+
},
7884
&cli.StringFlag{
7985
Name: "api-fullnode",
8086
Usage: "the endpoint for the full node API",
@@ -242,7 +248,8 @@ var runCmd = &cli.Command{
242248
defer sa.Close()
243249

244250
// Create the server API
245-
pd := piecedirectory.NewPieceDirectory(cl, sa, cctx.Int("add-index-throttle"))
251+
pd := piecedirectory.NewPieceDirectory(cl, sa, cctx.Int("add-index-throttle"),
252+
piecedirectory.WithAddIndexConcurrency(cctx.Int("add-index-concurrency")))
246253

247254
opts := &HttpServerOptions{
248255
ServePieces: servePieces,

db/deals.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ func withSearchFilter(filter FilterOptions) (string, []interface{}) {
364364
return where, whereArgs
365365
}
366366

367-
var searchFields = []string{"ID", "PieceCID", "ClientAddress", "ProviderAddress", "ClientPeerID", "DealDataRoot", "PublishCID", "SignedProposalCID"}
367+
var searchFields = []string{"ID", "PieceCID", "ChainDealID", "ClientAddress", "ProviderAddress", "ClientPeerID", "DealDataRoot", "PublishCID", "SignedProposalCID"}
368368

369369
func withSearchQuery(fields []string, query string, searchLabel bool) (string, []interface{}) {
370370
query = strings.Trim(query, " \t\n")

docker/monitoring/prometheus.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ scrape_configs:
3232
static_configs:
3333
- targets: [ 'boostd-data:8042' ]
3434
labels:
35-
host: 'local'
35+
host: 'local'

extern/boostd-data/Dockerfile.test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18-alpine
1+
FROM golang:1.21-alpine
22

33
WORKDIR /go/src/
44

extern/boostd-data/build/build.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func BuildTypeString() string {
4040
}
4141
}
4242

43-
const BuildVersion = "1.5.0"
43+
const BuildVersion = "1.5.1"
4444

4545
func UserVersion() string {
4646
return BuildVersion + BuildTypeString() + CurrentCommit

extern/boostd-data/cmd/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func main() {
3737

3838
func before(cctx *cli.Context) error {
3939
_ = logging.SetLogLevel("boostd-data", "INFO")
40+
_ = logging.SetLogLevel("boostd-data-yb", "INFO")
4041

4142
if cliutil.IsVeryVerbose {
4243
_ = logging.SetLogLevel("boostd-data", "DEBUG")

0 commit comments

Comments
 (0)