Merge branch 'master' into slashfilter
This commit is contained in:
commit
e3c796c848
2
Makefile
2
Makefile
@ -355,7 +355,7 @@ fiximports:
|
||||
./scripts/fiximports
|
||||
|
||||
gen: actors-code-gen type-gen cfgdoc-gen docsgen api-gen circleci fiximports
|
||||
@echo ">>> IF YOU'VE MODIFIED THE CLI OR CONFIG, REMEMBER TO ALSO MAKE docsgen-cli"
|
||||
@echo ">>> IF YOU'VE MODIFIED THE CLI OR CONFIG, REMEMBER TO ALSO RUN 'make docsgen-cli'"
|
||||
.PHONY: gen
|
||||
|
||||
jen: gen
|
||||
|
@ -37,7 +37,17 @@ var dbDefs = []string{
|
||||
)`,
|
||||
`INSERT OR IGNORE INTO _meta (version) VALUES (1)`,
|
||||
}
|
||||
var dbPragmas = []string{}
|
||||
|
||||
var dbPragmas = []string{
|
||||
"PRAGMA synchronous = normal",
|
||||
"PRAGMA temp_store = memory",
|
||||
"PRAGMA mmap_size = 30000000000",
|
||||
"PRAGMA page_size = 32768",
|
||||
"PRAGMA auto_vacuum = NONE",
|
||||
"PRAGMA automatic_index = OFF",
|
||||
"PRAGMA journal_mode = WAL",
|
||||
"PRAGMA read_uncommitted = ON",
|
||||
}
|
||||
|
||||
const (
|
||||
// prepared stmts
|
||||
|
@ -101,6 +101,7 @@ func main() {
|
||||
Name: "lotus-bench",
|
||||
Usage: "Benchmark performance of lotus on your hardware",
|
||||
Version: build.UserVersion(),
|
||||
DisableSliceFlagSeparator: true,
|
||||
Commands: []*cli.Command{
|
||||
proveCmd,
|
||||
sealBenchCmd,
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/chain/types/ethtypes"
|
||||
lcli "github.com/filecoin-project/lotus/cli"
|
||||
)
|
||||
|
||||
@ -23,6 +24,7 @@ var ethCmd = &cli.Command{
|
||||
},
|
||||
Subcommands: []*cli.Command{
|
||||
checkTipsetsCmd,
|
||||
computeEthHashCmd,
|
||||
},
|
||||
}
|
||||
|
||||
@ -70,3 +72,36 @@ var checkTipsetsCmd = &cli.Command{
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var computeEthHashCmd = &cli.Command{
|
||||
Name: "compute-eth-hash",
|
||||
Usage: "Compute the eth hash for a given message CID",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
if cctx.NArg() != 1 {
|
||||
return lcli.IncorrectNumArgs(cctx)
|
||||
}
|
||||
|
||||
msg, err := messageFromString(cctx, cctx.Args().First())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch msg := msg.(type) {
|
||||
case *types.SignedMessage:
|
||||
tx, err := ethtypes.EthTxFromSignedEthMessage(msg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to convert from signed message: %w", err)
|
||||
}
|
||||
|
||||
tx.Hash, err = tx.TxHash()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to call TxHash: %w", err)
|
||||
}
|
||||
fmt.Println(tx.Hash)
|
||||
default:
|
||||
return fmt.Errorf("not a signed message")
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
337
cmd/lotus-shed/indexes.go
Normal file
337
cmd/lotus-shed/indexes.go
Normal file
@ -0,0 +1,337 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
"github.com/filecoin-project/go-state-types/crypto"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/types/ethtypes"
|
||||
lcli "github.com/filecoin-project/lotus/cli"
|
||||
)
|
||||
|
||||
func withCategory(cat string, cmd *cli.Command) *cli.Command {
|
||||
cmd.Category = strings.ToUpper(cat)
|
||||
return cmd
|
||||
}
|
||||
|
||||
var indexesCmd = &cli.Command{
|
||||
Name: "indexes",
|
||||
Usage: "Commands related to managing sqlite indexes",
|
||||
HideHelpCommand: true,
|
||||
Subcommands: []*cli.Command{
|
||||
withCategory("msgindex", backfillMsgIndexCmd),
|
||||
withCategory("msgindex", pruneMsgIndexCmd),
|
||||
withCategory("txhash", backfillTxHashCmd),
|
||||
},
|
||||
}
|
||||
|
||||
var backfillMsgIndexCmd = &cli.Command{
|
||||
Name: "backfill-msgindex",
|
||||
Usage: "Backfill the msgindex.db for a number of epochs starting from a specified height",
|
||||
Flags: []cli.Flag{
|
||||
&cli.IntFlag{
|
||||
Name: "from",
|
||||
Value: 0,
|
||||
Usage: "height to start the backfill; uses the current head if omitted",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "epochs",
|
||||
Value: 1800,
|
||||
Usage: "number of epochs to backfill; defaults to 1800 (2 finalities)",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
api, closer, err := lcli.GetFullNodeAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer closer()
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
|
||||
curTs, err := api.ChainHead(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
startHeight := int64(cctx.Int("from"))
|
||||
if startHeight == 0 {
|
||||
startHeight = int64(curTs.Height()) - 1
|
||||
}
|
||||
epochs := cctx.Int("epochs")
|
||||
|
||||
basePath, err := homedir.Expand(cctx.String("repo"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dbPath := path.Join(basePath, "sqlite", "msgindex.db")
|
||||
db, err := sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err := db.Close()
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: closing db: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
insertStmt, err := db.Prepare("INSERT OR IGNORE INTO messages (cid, tipset_cid, epoch) VALUES (?, ?, ?)")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var nrRowsAffected int64
|
||||
for i := 0; i < epochs; i++ {
|
||||
epoch := abi.ChainEpoch(startHeight - int64(i))
|
||||
|
||||
if i%100 == 0 {
|
||||
log.Infof("%d/%d processing epoch:%d, nrRowsAffected:%d", i, epochs, epoch, nrRowsAffected)
|
||||
}
|
||||
|
||||
ts, err := api.ChainGetTipSetByHeight(ctx, epoch, curTs.Key())
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get tipset at epoch %d: %w", epoch, err)
|
||||
}
|
||||
|
||||
tsCid, err := ts.Key().Cid()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get tipset cid at epoch %d: %w", epoch, err)
|
||||
}
|
||||
|
||||
msgs, err := api.ChainGetMessagesInTipset(ctx, ts.Key())
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get messages in tipset at epoch %d: %w", epoch, err)
|
||||
}
|
||||
|
||||
for _, msg := range msgs {
|
||||
key := msg.Cid.String()
|
||||
tskey := tsCid.String()
|
||||
res, err := insertStmt.Exec(key, tskey, int64(epoch))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to insert message cid %s in tipset %s at epoch %d: %w", key, tskey, epoch, err)
|
||||
}
|
||||
rowsAffected, err := res.RowsAffected()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get rows affected for message cid %s in tipset %s at epoch %d: %w", key, tskey, epoch, err)
|
||||
}
|
||||
nrRowsAffected += rowsAffected
|
||||
}
|
||||
}
|
||||
|
||||
log.Infof("Done backfilling, nrRowsAffected:%d", nrRowsAffected)
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var pruneMsgIndexCmd = &cli.Command{
|
||||
Name: "prune-msgindex",
|
||||
Usage: "Prune the msgindex.db for messages included before a given epoch",
|
||||
Flags: []cli.Flag{
|
||||
&cli.IntFlag{
|
||||
Name: "from",
|
||||
Usage: "height to start the prune; if negative it indicates epochs from current head",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
api, closer, err := lcli.GetFullNodeAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer closer()
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
|
||||
startHeight := int64(cctx.Int("from"))
|
||||
if startHeight < 0 {
|
||||
curTs, err := api.ChainHead(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
startHeight += int64(curTs.Height())
|
||||
|
||||
if startHeight < 0 {
|
||||
return xerrors.Errorf("bogus start height %d", startHeight)
|
||||
}
|
||||
}
|
||||
|
||||
basePath, err := homedir.Expand(cctx.String("repo"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dbPath := path.Join(basePath, "sqlite", "msgindex.db")
|
||||
db, err := sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err := db.Close()
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: closing db: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
tx, err := db.Begin()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := tx.Exec("DELETE FROM messages WHERE epoch < ?", startHeight); err != nil {
|
||||
if err := tx.Rollback(); err != nil {
|
||||
fmt.Printf("ERROR: rollback: %s", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var backfillTxHashCmd = &cli.Command{
|
||||
Name: "backfill-txhash",
|
||||
Usage: "Backfills the txhash.db for a number of epochs starting from a specified height",
|
||||
Flags: []cli.Flag{
|
||||
&cli.UintFlag{
|
||||
Name: "from",
|
||||
Value: 0,
|
||||
Usage: "the tipset height to start backfilling from (0 is head of chain)",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "epochs",
|
||||
Value: 2000,
|
||||
Usage: "the number of epochs to backfill",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
api, closer, err := lcli.GetFullNodeAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer closer()
|
||||
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
|
||||
curTs, err := api.ChainHead(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
startHeight := int64(cctx.Int("from"))
|
||||
if startHeight == 0 {
|
||||
startHeight = int64(curTs.Height()) - 1
|
||||
}
|
||||
|
||||
epochs := cctx.Int("epochs")
|
||||
|
||||
basePath, err := homedir.Expand(cctx.String("repo"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dbPath := filepath.Join(basePath, "sqlite", "txhash.db")
|
||||
db, err := sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err := db.Close()
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: closing db: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
insertStmt, err := db.Prepare("INSERT OR IGNORE INTO eth_tx_hashes(hash, cid) VALUES(?, ?)")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var totalRowsAffected int64 = 0
|
||||
for i := 0; i < epochs; i++ {
|
||||
epoch := abi.ChainEpoch(startHeight - int64(i))
|
||||
|
||||
select {
|
||||
case <-cctx.Done():
|
||||
fmt.Println("request cancelled")
|
||||
return nil
|
||||
default:
|
||||
}
|
||||
|
||||
curTsk := curTs.Parents()
|
||||
execTs, err := api.ChainGetTipSet(ctx, curTsk)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to call ChainGetTipSet for %s: %w", curTsk, err)
|
||||
}
|
||||
|
||||
if i%100 == 0 {
|
||||
log.Infof("%d/%d processing epoch:%d", i, epochs, epoch)
|
||||
}
|
||||
|
||||
for _, blockheader := range execTs.Blocks() {
|
||||
blkMsgs, err := api.ChainGetBlockMessages(ctx, blockheader.Cid())
|
||||
if err != nil {
|
||||
log.Infof("Could not get block messages at epoch: %d, stopping walking up the chain", epoch)
|
||||
epochs = i
|
||||
break
|
||||
}
|
||||
|
||||
for _, smsg := range blkMsgs.SecpkMessages {
|
||||
if smsg.Signature.Type != crypto.SigTypeDelegated {
|
||||
continue
|
||||
}
|
||||
|
||||
tx, err := ethtypes.EthTxFromSignedEthMessage(smsg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to convert from signed message: %w at epoch: %d", err, epoch)
|
||||
}
|
||||
|
||||
tx.Hash, err = tx.TxHash()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to calculate hash for ethTx: %w at epoch: %d", err, epoch)
|
||||
}
|
||||
|
||||
res, err := insertStmt.Exec(tx.Hash.String(), smsg.Cid().String())
|
||||
if err != nil {
|
||||
return fmt.Errorf("error inserting tx mapping to db: %s at epoch: %d", err, epoch)
|
||||
}
|
||||
|
||||
rowsAffected, err := res.RowsAffected()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error getting rows affected: %s at epoch: %d", err, epoch)
|
||||
}
|
||||
|
||||
if rowsAffected > 0 {
|
||||
log.Debugf("Inserted txhash %s, cid: %s at epoch: %d", tx.Hash.String(), smsg.Cid().String(), epoch)
|
||||
}
|
||||
|
||||
totalRowsAffected += rowsAffected
|
||||
}
|
||||
}
|
||||
|
||||
curTs = execTs
|
||||
}
|
||||
|
||||
log.Infof("Done, inserted %d missing txhashes", totalRowsAffected)
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
@ -86,7 +86,7 @@ func main() {
|
||||
invariantsCmd,
|
||||
gasTraceCmd,
|
||||
replayOfflineCmd,
|
||||
msgindexCmd,
|
||||
indexesCmd,
|
||||
FevmAnalyticsCmd,
|
||||
mismatchesCmd,
|
||||
}
|
||||
|
@ -1,221 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"github.com/ipfs/go-cid"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
|
||||
lcli "github.com/filecoin-project/lotus/cli"
|
||||
)
|
||||
|
||||
var msgindexCmd = &cli.Command{
|
||||
Name: "msgindex",
|
||||
Usage: "Tools for managing the message index",
|
||||
Subcommands: []*cli.Command{
|
||||
msgindexBackfillCmd,
|
||||
msgindexPruneCmd,
|
||||
},
|
||||
}
|
||||
|
||||
var msgindexBackfillCmd = &cli.Command{
|
||||
Name: "backfill",
|
||||
Usage: "Backfill the message index for a number of epochs starting from a specified height",
|
||||
Flags: []cli.Flag{
|
||||
&cli.IntFlag{
|
||||
Name: "from",
|
||||
Value: 0,
|
||||
Usage: "height to start the backfill; uses the current head if omitted",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "epochs",
|
||||
Value: 1800,
|
||||
Usage: "number of epochs to backfill; defaults to 1800 (2 finalities)",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "repo",
|
||||
Value: "~/.lotus",
|
||||
Usage: "path to the repo",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
api, closer, err := lcli.GetFullNodeAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer closer()
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
|
||||
curTs, err := api.ChainHead(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
startHeight := int64(cctx.Int("from"))
|
||||
if startHeight == 0 {
|
||||
startHeight = int64(curTs.Height()) - 1
|
||||
}
|
||||
epochs := cctx.Int("epochs")
|
||||
|
||||
basePath, err := homedir.Expand(cctx.String("repo"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dbPath := path.Join(basePath, "sqlite", "msgindex.db")
|
||||
db, err := sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err := db.Close()
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: closing db: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
tx, err := db.Begin()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
insertStmt, err := tx.Prepare("INSERT INTO messages VALUES (?, ?, ?)")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
insertMsg := func(cid, tsCid cid.Cid, epoch abi.ChainEpoch) error {
|
||||
key := cid.String()
|
||||
tskey := tsCid.String()
|
||||
if _, err := insertStmt.Exec(key, tskey, int64(epoch)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
rollback := func() {
|
||||
if err := tx.Rollback(); err != nil {
|
||||
fmt.Printf("ERROR: rollback: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
for i := 0; i < epochs; i++ {
|
||||
epoch := abi.ChainEpoch(startHeight - int64(i))
|
||||
|
||||
ts, err := api.ChainGetTipSetByHeight(ctx, epoch, curTs.Key())
|
||||
if err != nil {
|
||||
rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
tsCid, err := ts.Key().Cid()
|
||||
if err != nil {
|
||||
rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
msgs, err := api.ChainGetMessagesInTipset(ctx, ts.Key())
|
||||
if err != nil {
|
||||
rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
for _, msg := range msgs {
|
||||
if err := insertMsg(msg.Cid, tsCid, epoch); err != nil {
|
||||
rollback()
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := tx.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var msgindexPruneCmd = &cli.Command{
|
||||
Name: "prune",
|
||||
Usage: "Prune the message index for messages included before a given epoch",
|
||||
Flags: []cli.Flag{
|
||||
&cli.IntFlag{
|
||||
Name: "from",
|
||||
Usage: "height to start the prune; if negative it indicates epochs from current head",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "repo",
|
||||
Value: "~/.lotus",
|
||||
Usage: "path to the repo",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
api, closer, err := lcli.GetFullNodeAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer closer()
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
|
||||
startHeight := int64(cctx.Int("from"))
|
||||
if startHeight < 0 {
|
||||
curTs, err := api.ChainHead(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
startHeight += int64(curTs.Height())
|
||||
|
||||
if startHeight < 0 {
|
||||
return xerrors.Errorf("bogus start height %d", startHeight)
|
||||
}
|
||||
}
|
||||
|
||||
basePath, err := homedir.Expand(cctx.String("repo"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
dbPath := path.Join(basePath, "sqlite", "msgindex.db")
|
||||
db, err := sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
err := db.Close()
|
||||
if err != nil {
|
||||
fmt.Printf("ERROR: closing db: %s", err)
|
||||
}
|
||||
}()
|
||||
|
||||
tx, err := db.Begin()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := tx.Exec("DELETE FROM messages WHERE epoch < ?", startHeight); err != nil {
|
||||
if err := tx.Rollback(); err != nil {
|
||||
fmt.Printf("ERROR: rollback: %s", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if err := tx.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
@ -34,11 +34,10 @@ COMMANDS:
|
||||
GLOBAL OPTIONS:
|
||||
--actor value, -a value specify other actor to query / manipulate
|
||||
--color use color in display output (default: depends on output being a TTY)
|
||||
--help, -h show help (default: false)
|
||||
--miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH]
|
||||
--version, -v print the version (default: false)
|
||||
--vv enables very verbose mode, useful for debugging the CLI (default: false)
|
||||
|
||||
--help, -h show help
|
||||
--version, -v print the version
|
||||
```
|
||||
|
||||
## lotus-miner init
|
||||
@ -67,8 +66,7 @@ OPTIONS:
|
||||
--no-local-storage don't use storageminer repo for sector storage (default: false)
|
||||
--gas-premium value set gas premium for initialization messages in AttoFIL (default: "0")
|
||||
--from value select which address to send actor creation message from
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner init restore
|
||||
@ -80,10 +78,10 @@ USAGE:
|
||||
lotus-miner init restore [command options] [backupFile]
|
||||
|
||||
OPTIONS:
|
||||
--config value config file (config.toml)
|
||||
--nosync don't check full-node sync status (default: false)
|
||||
--config value config file (config.toml)
|
||||
--storage-config value storage paths config (storage.json)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner init service
|
||||
@ -95,12 +93,12 @@ USAGE:
|
||||
lotus-miner init service [command options] [backupFile]
|
||||
|
||||
OPTIONS:
|
||||
--api-sealer value sealer API info (lotus-miner auth api-info --perm=admin)
|
||||
--api-sector-index value sector Index API info (lotus-miner auth api-info --perm=admin)
|
||||
--config value config file (config.toml)
|
||||
--nosync don't check full-node sync status (default: false)
|
||||
--type value [ --type value ] type of service to be enabled
|
||||
|
||||
--api-sealer value sealer API info (lotus-miner auth api-info --perm=admin)
|
||||
--api-sector-index value sector Index API info (lotus-miner auth api-info --perm=admin)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner run
|
||||
@ -112,11 +110,11 @@ USAGE:
|
||||
lotus-miner run [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--enable-gpu-proving enable use of GPU for mining operations (default: true)
|
||||
--manage-fdlimit manage open file limit (default: true)
|
||||
--miner-api value 2345
|
||||
--enable-gpu-proving enable use of GPU for mining operations (default: true)
|
||||
--nosync don't check full-node sync status (default: false)
|
||||
|
||||
--manage-fdlimit manage open file limit (default: true)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner stop
|
||||
@ -128,8 +126,7 @@ USAGE:
|
||||
lotus-miner stop [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner config
|
||||
@ -146,8 +143,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner config default
|
||||
@ -160,7 +156,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--no-comment don't comment default values (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner config updated
|
||||
@ -173,7 +169,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--no-comment don't comment default values (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner backup
|
||||
@ -194,7 +190,7 @@ DESCRIPTION:
|
||||
|
||||
OPTIONS:
|
||||
--offline create backup without the node running (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner version
|
||||
@ -206,8 +202,7 @@ USAGE:
|
||||
lotus-miner version [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner actor
|
||||
@ -233,8 +228,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner actor set-addresses, set-addrs
|
||||
@ -250,9 +244,9 @@ USAGE:
|
||||
lotus-miner actor withdraw [command options] [amount (FIL)]
|
||||
|
||||
OPTIONS:
|
||||
--beneficiary send withdraw message from the beneficiary address (default: false)
|
||||
--confidence value number of block confirmations to wait for (default: 5)
|
||||
|
||||
--beneficiary send withdraw message from the beneficiary address (default: false)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor repay-debt
|
||||
@ -265,7 +259,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--from value optionally specify the account to send funds from
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor set-peer-id
|
||||
@ -278,7 +272,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--gas-limit value set gas limit (default: 0)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor set-owner
|
||||
@ -291,7 +285,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor control
|
||||
@ -308,8 +302,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner actor control list
|
||||
@ -322,7 +315,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--verbose (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner actor control set
|
||||
@ -335,7 +328,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor propose-change-worker
|
||||
@ -348,7 +341,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor confirm-change-worker
|
||||
@ -361,7 +354,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor compact-allocated
|
||||
@ -376,7 +369,7 @@ OPTIONS:
|
||||
--mask-last-offset value Mask sector IDs from 0 to 'higest_allocated - offset' (default: 0)
|
||||
--mask-upto-n value Mask sector IDs from 0 to 'n' (default: 0)
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor propose-change-beneficiary
|
||||
@ -388,10 +381,10 @@ USAGE:
|
||||
lotus-miner actor propose-change-beneficiary [command options] [beneficiaryAddress quota expiration]
|
||||
|
||||
OPTIONS:
|
||||
--actor value specify the address of miner actor
|
||||
--overwrite-pending-change Overwrite the current beneficiary change proposal (default: false)
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--overwrite-pending-change Overwrite the current beneficiary change proposal (default: false)
|
||||
--actor value specify the address of miner actor
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner actor confirm-change-beneficiary
|
||||
@ -403,10 +396,10 @@ USAGE:
|
||||
lotus-miner actor confirm-change-beneficiary [command options] [minerID]
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
--existing-beneficiary send confirmation from the existing beneficiary address (default: false)
|
||||
--new-beneficiary send confirmation from the new beneficiary address (default: false)
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner info
|
||||
@ -424,8 +417,7 @@ COMMANDS:
|
||||
OPTIONS:
|
||||
--hide-sectors-info hide sectors info (default: false)
|
||||
--blocks value Log of produced <blocks> newest blocks and rewards(Miner Fee excluded) (default: 0)
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner info all
|
||||
@ -437,8 +429,7 @@ USAGE:
|
||||
lotus-miner info all [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner auth
|
||||
@ -455,8 +446,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner auth create-token
|
||||
@ -469,7 +459,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--perm value permission to assign to the token, one of: read, write, sign, admin
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner auth api-info
|
||||
@ -482,7 +472,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--perm value permission to assign to the token, one of: read, write, sign, admin
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner log
|
||||
@ -500,8 +490,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner log list
|
||||
@ -513,8 +502,7 @@ USAGE:
|
||||
lotus-miner log list [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner log set-level
|
||||
@ -547,7 +535,7 @@ DESCRIPTION:
|
||||
|
||||
OPTIONS:
|
||||
--system value [ --system value ] limit to log system
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner log alerts
|
||||
@ -560,7 +548,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--all get all (active and inactive) alerts (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner wait-api
|
||||
@ -576,7 +564,7 @@ CATEGORY:
|
||||
|
||||
OPTIONS:
|
||||
--timeout value duration to wait till fail (default: 30s)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner fetch-params
|
||||
@ -591,8 +579,7 @@ CATEGORY:
|
||||
DEVELOPER
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner sectors
|
||||
@ -628,8 +615,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors status
|
||||
@ -645,7 +631,7 @@ OPTIONS:
|
||||
--on-chain-info, -c show sector on chain info (default: false)
|
||||
--partition-info, -p show partition related info (default: false)
|
||||
--proof print snark proof bytes as hex (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors list
|
||||
@ -669,8 +655,7 @@ OPTIONS:
|
||||
--states value filter sectors by a comma-separated list of states
|
||||
--unproven, -u only show sectors which aren't in the 'Proving' state (default: false)
|
||||
--check-parallelism value number of parallel requests to make for checking sector states (default: 300)
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors list upgrade-bounds
|
||||
@ -685,7 +670,7 @@ OPTIONS:
|
||||
--buckets value (default: 25)
|
||||
--csv output machine-readable values (default: false)
|
||||
--deal-terms bucket by how many deal-sectors can start at a given expiration (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors refs
|
||||
@ -697,8 +682,7 @@ USAGE:
|
||||
lotus-miner sectors refs [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors update-state
|
||||
@ -711,7 +695,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it pass this flag if you know what you are doing (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors pledge
|
||||
@ -723,8 +707,7 @@ USAGE:
|
||||
lotus-miner sectors pledge [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors numbers
|
||||
@ -743,8 +726,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors numbers info
|
||||
@ -756,8 +738,7 @@ USAGE:
|
||||
lotus-miner sectors numbers info [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors numbers reservations
|
||||
@ -769,8 +750,7 @@ USAGE:
|
||||
lotus-miner sectors numbers reservations [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors numbers reserve
|
||||
@ -783,7 +763,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--force skip duplicate reservation checks (note: can lead to damaging other reservations on free) (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors numbers free
|
||||
@ -795,8 +775,7 @@ USAGE:
|
||||
lotus-miner sectors numbers free [command options] [reservation name]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors precommits
|
||||
@ -808,8 +787,7 @@ USAGE:
|
||||
lotus-miner sectors precommits [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors check-expire
|
||||
@ -822,7 +800,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--cutoff value skip sectors whose current expiration is more than <cutoff> epochs from now, defaults to 60 days (default: 172800)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors expired
|
||||
@ -834,10 +812,10 @@ USAGE:
|
||||
lotus-miner sectors expired [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--expired-epoch value epoch at which to check sector expirations (default: WinningPoSt lookback epoch)
|
||||
--remove-expired remove expired sectors (default: false)
|
||||
--show-removed show removed sectors (default: false)
|
||||
|
||||
--remove-expired remove expired sectors (default: false)
|
||||
--expired-epoch value epoch at which to check sector expirations (default: WinningPoSt lookback epoch)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors extend
|
||||
@ -849,19 +827,19 @@ USAGE:
|
||||
lotus-miner sectors extend [command options] <sectorNumbers...(optional)>
|
||||
|
||||
OPTIONS:
|
||||
--drop-claims drop claims for sectors that can be extended, but only by dropping some of their verified power claims (default: false)
|
||||
--from value only consider sectors whose current expiration epoch is in the range of [from, to], <from> defaults to: now + 120 (1 hour) (default: 0)
|
||||
--to value only consider sectors whose current expiration epoch is in the range of [from, to], <to> defaults to: now + 92160 (32 days) (default: 0)
|
||||
--sector-file value provide a file containing one sector number in each line, ignoring above selecting criteria
|
||||
--exclude value optionally provide a file containing excluding sectors
|
||||
--extension value try to extend selected sectors by this number of epochs, defaults to 540 days (default: 1555200)
|
||||
--from value only consider sectors whose current expiration epoch is in the range of [from, to], <from> defaults to: now + 120 (1 hour) (default: 0)
|
||||
--max-fee value use up to this amount of FIL for one message. pass this flag to avoid message congestion. (default: "0")
|
||||
--max-sectors value the maximum number of sectors contained in each message (default: 0)
|
||||
--new-expiration value try to extend selected sectors to this epoch, ignoring extension (default: 0)
|
||||
--only-cc only extend CC sectors (useful for making sector ready for snap upgrade) (default: false)
|
||||
--really-do-it pass this flag to really extend sectors, otherwise will only print out json representation of parameters (default: false)
|
||||
--sector-file value provide a file containing one sector number in each line, ignoring above selecting criteria
|
||||
--to value only consider sectors whose current expiration epoch is in the range of [from, to], <to> defaults to: now + 92160 (32 days) (default: 0)
|
||||
--drop-claims drop claims for sectors that can be extended, but only by dropping some of their verified power claims (default: false)
|
||||
--tolerance value don't try to extend sectors by fewer than this number of epochs, defaults to 7 days (default: 20160)
|
||||
|
||||
--max-fee value use up to this amount of FIL for one message. pass this flag to avoid message congestion. (default: "0")
|
||||
--max-sectors value the maximum number of sectors contained in each message (default: 0)
|
||||
--really-do-it pass this flag to really extend sectors, otherwise will only print out json representation of parameters (default: false)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors terminate
|
||||
@ -879,8 +857,7 @@ COMMANDS:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it pass this flag if you know what you are doing (default: false)
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors terminate flush
|
||||
@ -892,8 +869,7 @@ USAGE:
|
||||
lotus-miner sectors terminate flush [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors terminate pending
|
||||
@ -905,8 +881,7 @@ USAGE:
|
||||
lotus-miner sectors terminate pending [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors remove
|
||||
@ -919,7 +894,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it pass this flag if you know what you are doing (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors snap-up
|
||||
@ -931,8 +906,7 @@ USAGE:
|
||||
lotus-miner sectors snap-up [command options] <sectorNum>
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors abort-upgrade
|
||||
@ -945,7 +919,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it pass this flag if you know what you are doing (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors seal
|
||||
@ -957,8 +931,7 @@ USAGE:
|
||||
lotus-miner sectors seal [command options] <sectorNum>
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors set-seal-delay
|
||||
@ -971,7 +944,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--seconds Specifies that the time argument should be in seconds (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors get-cc-collateral
|
||||
@ -984,7 +957,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--expiration value the epoch when the sector will expire (default: 0)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors batching
|
||||
@ -1001,8 +974,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors batching commit
|
||||
@ -1015,7 +987,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--publish-now send a batch now (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner sectors batching precommit
|
||||
@ -1028,7 +1000,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--publish-now send a batch now (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors match-pending-pieces
|
||||
@ -1040,8 +1012,7 @@ USAGE:
|
||||
lotus-miner sectors match-pending-pieces [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors compact-partitions
|
||||
@ -1053,11 +1024,11 @@ USAGE:
|
||||
lotus-miner sectors compact-partitions [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--actor value Specify the address of the miner to run this command
|
||||
--deadline value the deadline to compact the partitions in (default: 0)
|
||||
--partitions value [ --partitions value ] list of partitions to compact sectors in
|
||||
--really-do-it Actually send transaction performing the action (default: false)
|
||||
|
||||
--actor value Specify the address of the miner to run this command
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sectors unseal
|
||||
@ -1069,8 +1040,7 @@ USAGE:
|
||||
lotus-miner sectors unseal [command options] [sector number]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner proving
|
||||
@ -1093,8 +1063,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving info
|
||||
@ -1106,8 +1075,7 @@ USAGE:
|
||||
lotus-miner proving info [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving deadlines
|
||||
@ -1120,7 +1088,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--all, -a Count all sectors (only live sectors are counted by default) (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving deadline
|
||||
@ -1132,9 +1100,9 @@ USAGE:
|
||||
lotus-miner proving deadline [command options] <deadlineIdx>
|
||||
|
||||
OPTIONS:
|
||||
--bitfield, -b Print partition bitfield stats (default: false)
|
||||
--sector-nums, -n Print sector/fault numbers belonging to this deadline (default: false)
|
||||
|
||||
--bitfield, -b Print partition bitfield stats (default: false)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving faults
|
||||
@ -1146,8 +1114,7 @@ USAGE:
|
||||
lotus-miner proving faults [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving check
|
||||
@ -1159,11 +1126,11 @@ USAGE:
|
||||
lotus-miner proving check [command options] <deadlineIdx>
|
||||
|
||||
OPTIONS:
|
||||
--faulty only check faulty sectors (default: false)
|
||||
--only-bad print only bad sectors (default: false)
|
||||
--slow run slower checks (default: false)
|
||||
--storage-id value filter sectors by storage path (path id)
|
||||
|
||||
--faulty only check faulty sectors (default: false)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving workers
|
||||
@ -1175,8 +1142,7 @@ USAGE:
|
||||
lotus-miner proving workers [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner proving compute
|
||||
@ -1192,8 +1158,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
##### lotus-miner proving compute windowed-post, window-post
|
||||
@ -1210,7 +1175,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--confidence value number of block confirmations to wait for (default: 5)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner storage
|
||||
@ -1238,8 +1203,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage attach
|
||||
@ -1272,14 +1236,14 @@ DESCRIPTION:
|
||||
|
||||
|
||||
OPTIONS:
|
||||
--allow-to value [ --allow-to value ] path groups allowed to pull data from this path (allow all if not specified)
|
||||
--groups value [ --groups value ] path group names
|
||||
--init initialize the path first (default: false)
|
||||
--max-storage value (for init) limit storage space for sectors (expensive for very large paths!)
|
||||
--weight value (for init) path weight (default: 10)
|
||||
--seal (for init) use path for sealing (default: false)
|
||||
--store (for init) use path for long-term storage (default: false)
|
||||
--weight value (for init) path weight (default: 10)
|
||||
|
||||
--max-storage value (for init) limit storage space for sectors (expensive for very large paths!)
|
||||
--groups value [ --groups value ] path group names
|
||||
--allow-to value [ --allow-to value ] path groups allowed to pull data from this path (allow all if not specified)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage detach
|
||||
@ -1292,7 +1256,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage redeclare
|
||||
@ -1304,10 +1268,10 @@ USAGE:
|
||||
lotus-miner storage redeclare [command options] [path]
|
||||
|
||||
OPTIONS:
|
||||
--id value storage path ID
|
||||
--all redeclare all storage paths (default: false)
|
||||
--drop-missing Drop index entries with missing files (default: true)
|
||||
--id value storage path ID
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage list
|
||||
@ -1323,8 +1287,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
#### lotus-miner storage list sectors
|
||||
@ -1336,8 +1299,7 @@ USAGE:
|
||||
lotus-miner storage list sectors [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage find
|
||||
@ -1349,8 +1311,7 @@ USAGE:
|
||||
lotus-miner storage find [command options] [sector number]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage cleanup
|
||||
@ -1363,7 +1324,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--removed cleanup remaining files from removed sectors (default: true)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner storage locks
|
||||
@ -1375,8 +1336,7 @@ USAGE:
|
||||
lotus-miner storage locks [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-miner sealing
|
||||
@ -1396,8 +1356,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sealing jobs
|
||||
@ -1410,7 +1369,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--show-ret-done show returned but not consumed calls (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sealing workers
|
||||
@ -1422,8 +1381,7 @@ USAGE:
|
||||
lotus-miner sealing workers [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sealing sched-diag
|
||||
@ -1436,7 +1394,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--force-sched (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sealing abort
|
||||
@ -1449,7 +1407,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--sched Specifies that the argument is UUID of the request to be removed from scheduler (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-miner sealing data-cid
|
||||
@ -1462,5 +1420,5 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--file-size value real file size (default: 0)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
@ -19,12 +19,11 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
GLOBAL OPTIONS:
|
||||
--enable-gpu-proving enable use of GPU for mining operations (default: true) [$LOTUS_WORKER_ENABLE_GPU_PROVING]
|
||||
--help, -h show help (default: false)
|
||||
--miner-repo value, --storagerepo value Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH]
|
||||
--version, -v print the version (default: false)
|
||||
--worker-repo value, --workerrepo value Specify worker repo path. flag workerrepo and env WORKER_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusworker") [$LOTUS_WORKER_PATH, $WORKER_PATH]
|
||||
|
||||
--miner-repo value, --storagerepo value Specify miner repo path. flag storagerepo and env LOTUS_STORAGE_PATH are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH]
|
||||
--enable-gpu-proving enable use of GPU for mining operations (default: true) [$LOTUS_WORKER_ENABLE_GPU_PROVING]
|
||||
--help, -h show help
|
||||
--version, -v print the version
|
||||
```
|
||||
|
||||
## lotus-worker run
|
||||
@ -36,29 +35,29 @@ USAGE:
|
||||
lotus-worker run [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE]
|
||||
--commit enable commit (default: true) [$LOTUS_WORKER_COMMIT]
|
||||
--data-cid Run the data-cid task. true|false (default: inherits --addpiece)
|
||||
--http-server-timeout value (default: "30s")
|
||||
--listen value host address and port the worker api will listen on (default: "0.0.0.0:3456") [$LOTUS_WORKER_LISTEN]
|
||||
--name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME]
|
||||
--no-default disable all default compute tasks, use the worker for storage/fetching only (default: false) [$LOTUS_WORKER_NO_DEFAULT]
|
||||
--no-local-storage don't use storageminer repo for sector storage (default: false) [$LOTUS_WORKER_NO_LOCAL_STORAGE]
|
||||
--no-swap don't use swap (default: false) [$LOTUS_WORKER_NO_SWAP]
|
||||
--name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME]
|
||||
--addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE]
|
||||
--precommit1 enable precommit1 (default: true) [$LOTUS_WORKER_PRECOMMIT1]
|
||||
--unseal enable unsealing (default: true) [$LOTUS_WORKER_UNSEAL]
|
||||
--precommit2 enable precommit2 (default: true) [$LOTUS_WORKER_PRECOMMIT2]
|
||||
--commit enable commit (default: true) [$LOTUS_WORKER_COMMIT]
|
||||
--replica-update enable replica update (default: true) [$LOTUS_WORKER_REPLICA_UPDATE]
|
||||
--prove-replica-update2 enable prove replica update 2 (default: true) [$LOTUS_WORKER_PROVE_REPLICA_UPDATE2]
|
||||
--regen-sector-key enable regen sector key (default: true) [$LOTUS_WORKER_REGEN_SECTOR_KEY]
|
||||
--sector-download enable external sector data download (default: false) [$LOTUS_WORKER_SECTOR_DOWNLOAD]
|
||||
--windowpost enable window post (default: false) [$LOTUS_WORKER_WINDOWPOST]
|
||||
--winningpost enable winning post (default: false) [$LOTUS_WORKER_WINNINGPOST]
|
||||
--no-default disable all default compute tasks, use the worker for storage/fetching only (default: false) [$LOTUS_WORKER_NO_DEFAULT]
|
||||
--parallel-fetch-limit value maximum fetch operations to run in parallel (default: 5) [$LOTUS_WORKER_PARALLEL_FETCH_LIMIT]
|
||||
--post-parallel-reads value maximum number of parallel challenge reads (0 = no limit) (default: 32) [$LOTUS_WORKER_POST_PARALLEL_READS]
|
||||
--post-read-timeout value time limit for reading PoSt challenges (0 = no limit) (default: 0s) [$LOTUS_WORKER_POST_READ_TIMEOUT]
|
||||
--precommit1 enable precommit1 (default: true) [$LOTUS_WORKER_PRECOMMIT1]
|
||||
--precommit2 enable precommit2 (default: true) [$LOTUS_WORKER_PRECOMMIT2]
|
||||
--prove-replica-update2 enable prove replica update 2 (default: true) [$LOTUS_WORKER_PROVE_REPLICA_UPDATE2]
|
||||
--regen-sector-key enable regen sector key (default: true) [$LOTUS_WORKER_REGEN_SECTOR_KEY]
|
||||
--replica-update enable replica update (default: true) [$LOTUS_WORKER_REPLICA_UPDATE]
|
||||
--sector-download enable external sector data download (default: false) [$LOTUS_WORKER_SECTOR_DOWNLOAD]
|
||||
--timeout value used when 'listen' is unspecified. must be a valid duration recognized by golang's time.ParseDuration function (default: "30m") [$LOTUS_WORKER_TIMEOUT]
|
||||
--unseal enable unsealing (default: true) [$LOTUS_WORKER_UNSEAL]
|
||||
--windowpost enable window post (default: false) [$LOTUS_WORKER_WINDOWPOST]
|
||||
--winningpost enable winning post (default: false) [$LOTUS_WORKER_WINNINGPOST]
|
||||
|
||||
--http-server-timeout value (default: "30s")
|
||||
--data-cid Run the data-cid task. true|false (default: inherits --addpiece)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-worker stop
|
||||
@ -70,8 +69,7 @@ USAGE:
|
||||
lotus-worker stop [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-worker info
|
||||
@ -83,8 +81,7 @@ USAGE:
|
||||
lotus-worker info [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-worker storage
|
||||
@ -102,8 +99,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-worker storage attach
|
||||
@ -115,14 +111,14 @@ USAGE:
|
||||
lotus-worker storage attach [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--allow-to value [ --allow-to value ] path groups allowed to pull data from this path (allow all if not specified)
|
||||
--groups value [ --groups value ] path group names
|
||||
--init initialize the path first (default: false)
|
||||
--max-storage value (for init) limit storage space for sectors (expensive for very large paths!)
|
||||
--weight value (for init) path weight (default: 10)
|
||||
--seal (for init) use path for sealing (default: false)
|
||||
--store (for init) use path for long-term storage (default: false)
|
||||
--weight value (for init) path weight (default: 10)
|
||||
|
||||
--max-storage value (for init) limit storage space for sectors (expensive for very large paths!)
|
||||
--groups value [ --groups value ] path group names
|
||||
--allow-to value [ --allow-to value ] path groups allowed to pull data from this path (allow all if not specified)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-worker storage detach
|
||||
@ -135,7 +131,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--really-do-it (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-worker storage redeclare
|
||||
@ -147,10 +143,10 @@ USAGE:
|
||||
lotus-worker storage redeclare [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--id value storage path ID
|
||||
--all redeclare all storage paths (default: false)
|
||||
--drop-missing Drop index entries with missing files (default: true)
|
||||
--id value storage path ID
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-worker resources
|
||||
@ -164,7 +160,7 @@ USAGE:
|
||||
OPTIONS:
|
||||
--all print all resource envvars (default: false)
|
||||
--default print default resource envvars (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## lotus-worker tasks
|
||||
@ -181,8 +177,7 @@ COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-worker tasks enable
|
||||
@ -195,7 +190,7 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--all Enable all task types (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
### lotus-worker tasks disable
|
||||
@ -208,5 +203,5 @@ USAGE:
|
||||
|
||||
OPTIONS:
|
||||
--all Disable all task types (default: false)
|
||||
|
||||
--help, -h show help
|
||||
```
|
||||
|
File diff suppressed because it is too large
Load Diff
4
go.mod
4
go.mod
@ -116,7 +116,7 @@ require (
|
||||
github.com/kelseyhightower/envconfig v1.4.0
|
||||
github.com/koalacxr/quantile v0.0.1
|
||||
github.com/libp2p/go-buffer-pool v0.1.0
|
||||
github.com/libp2p/go-libp2p v0.27.3
|
||||
github.com/libp2p/go-libp2p v0.27.5
|
||||
github.com/libp2p/go-libp2p-consensus v0.0.1
|
||||
github.com/libp2p/go-libp2p-gorpc v0.5.0
|
||||
github.com/libp2p/go-libp2p-kad-dht v0.21.1
|
||||
@ -144,7 +144,7 @@ require (
|
||||
github.com/raulk/go-watchdog v1.3.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
|
||||
github.com/urfave/cli/v2 v2.16.3
|
||||
github.com/urfave/cli/v2 v2.25.5
|
||||
github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba
|
||||
github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa
|
||||
github.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4
|
||||
|
8
go.sum
8
go.sum
@ -1005,8 +1005,8 @@ github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xS
|
||||
github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw=
|
||||
github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o=
|
||||
github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0=
|
||||
github.com/libp2p/go-libp2p v0.27.3 h1:tkV/zm3KCZ4R5er9Xcs2pt0YNB4JH0iBfGAtHJdLHRs=
|
||||
github.com/libp2p/go-libp2p v0.27.3/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE=
|
||||
github.com/libp2p/go-libp2p v0.27.5 h1:KwA7pXKXpz8hG6Cr1fMA7UkgleogcwQj0sxl5qquWRg=
|
||||
github.com/libp2p/go-libp2p v0.27.5/go.mod h1:oMfQGTb9CHnrOuSM6yMmyK2lXz3qIhnkn2+oK3B1Y2g=
|
||||
github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s=
|
||||
github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w=
|
||||
github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8=
|
||||
@ -1630,8 +1630,8 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
|
||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
||||
github.com/urfave/cli/v2 v2.16.3 h1:gHoFIwpPjoyIMbJp/VFd+/vuD0dAgFK4B6DpEMFJfQk=
|
||||
github.com/urfave/cli/v2 v2.16.3/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI=
|
||||
github.com/urfave/cli/v2 v2.25.5 h1:d0NIAyhh5shGscroL7ek/Ya9QYQE0KNabJgiUinIQkc=
|
||||
github.com/urfave/cli/v2 v2.25.5/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
|
||||
|
@ -89,6 +89,7 @@ const (
|
||||
|
||||
// health checks
|
||||
CheckFDLimit
|
||||
CheckFvmConcurrency
|
||||
LegacyMarketsEOL
|
||||
|
||||
// libp2p
|
||||
@ -165,6 +166,7 @@ func defaults() []Option {
|
||||
Override(new(dtypes.NodeStartTime), FromVal(dtypes.NodeStartTime(time.Now()))),
|
||||
|
||||
Override(CheckFDLimit, modules.CheckFdLimit(build.DefaultFDLimit)),
|
||||
Override(CheckFvmConcurrency, modules.CheckFvmConcurrency()),
|
||||
|
||||
Override(new(system.MemoryConstraints), modules.MemoryConstraints),
|
||||
Override(InitMemoryWatchdog, modules.MemoryWatchdog),
|
||||
|
@ -1,6 +1,9 @@
|
||||
package modules
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/filecoin-project/lotus/journal/alerting"
|
||||
"github.com/filecoin-project/lotus/lib/ulimit"
|
||||
)
|
||||
@ -42,6 +45,35 @@ func LegacyMarketsEOL(al *alerting.Alerting) {
|
||||
})
|
||||
}
|
||||
|
||||
func CheckFvmConcurrency() func(al *alerting.Alerting) {
|
||||
return func(al *alerting.Alerting) {
|
||||
fvmConcurrency, ok := os.LookupEnv("LOTUS_FVM_CONCURRENCY")
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
fvmConcurrencyVal, err := strconv.Atoi(fvmConcurrency)
|
||||
if err != nil {
|
||||
alert := al.AddAlertType("process", "fvm-concurrency")
|
||||
al.Raise(alert, map[string]string{
|
||||
"message": "LOTUS_FVM_CONCURRENCY is not an integer",
|
||||
"error": err.Error(),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// Raise alert if LOTUS_FVM_CONCURRENCY is set to a high value
|
||||
if fvmConcurrencyVal > 24 {
|
||||
alert := al.AddAlertType("process", "fvm-concurrency")
|
||||
al.Raise(alert, map[string]interface{}{
|
||||
"message": "LOTUS_FVM_CONCURRENCY is set to a high value that can cause chain sync panics on network migrations/upgrades",
|
||||
"set_value": fvmConcurrencyVal,
|
||||
"recommended": "24 or less during network upgrades",
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: More things:
|
||||
// * Space in repo dirs (taking into account mounts)
|
||||
// * Miner
|
||||
|
@ -4,9 +4,12 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"go.uber.org/fx"
|
||||
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/ethhashlookup"
|
||||
"github.com/filecoin-project/lotus/chain/events"
|
||||
"github.com/filecoin-project/lotus/chain/messagepool"
|
||||
@ -54,6 +57,17 @@ func EthModuleAPI(cfg config.FevmConfig) func(helpers.MetricsCtx, repo.LockedRep
|
||||
}
|
||||
}
|
||||
|
||||
// prefill the whole skiplist cache maintained internally by the GetTipsetByHeight
|
||||
go func() {
|
||||
start := time.Now()
|
||||
log.Infoln("Start prefilling GetTipsetByHeight cache")
|
||||
_, err := cs.GetTipsetByHeight(mctx, abi.ChainEpoch(0), cs.GetHeaviestTipSet(), false)
|
||||
if err != nil {
|
||||
log.Warnf("error when prefilling GetTipsetByHeight cache: %w", err)
|
||||
}
|
||||
log.Infof("Prefilling GetTipsetByHeight done in %s", time.Since(start))
|
||||
}()
|
||||
|
||||
ctx := helpers.LifecycleCtx(mctx, lc)
|
||||
lc.Append(fx.Hook{
|
||||
OnStart: func(context.Context) error {
|
||||
|
Loading…
Reference in New Issue
Block a user