diff --git a/chain/validation/keymanager.go b/chain/validation/keymanager.go index 3161883b9..76fe8673d 100644 --- a/chain/validation/keymanager.go +++ b/chain/validation/keymanager.go @@ -87,7 +87,7 @@ func (k *KeyManager) newBLSKey() *wallet.Key { //sk := ffi.PrivateKeyGenerate(s.blsSeed) // s.blsSeed++ sk := [32]byte{} - sk[0] = uint8(k.blsSeed+1) // hack to keep gas values determinist + sk[0] = uint8(k.blsSeed + 1) // hack to keep gas values determinist key, err := wallet.NewKey(types.KeyInfo{ Type: wallet.KTBLS, PrivateKey: sk[:], diff --git a/cli/client.go b/cli/client.go index 3150840dc..5581632e1 100644 --- a/cli/client.go +++ b/cli/client.go @@ -35,8 +35,8 @@ var clientCmd = &cli.Command{ } var clientImportCmd = &cli.Command{ - Name: "import", - Usage: "Import data", + Name: "import", + Usage: "Import data", ArgsUsage: "[inputPath]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -82,8 +82,8 @@ var clientLocalCmd = &cli.Command{ } var clientDealCmd = &cli.Command{ - Name: "deal", - Usage: "Initialize storage deal with a miner", + Name: "deal", + Usage: "Initialize storage deal with a miner", ArgsUsage: "[dataCid miner price duration]", Flags: []cli.Flag{ &cli.BoolFlag{ @@ -193,8 +193,8 @@ var clientDealCmd = &cli.Command{ } var clientFindCmd = &cli.Command{ - Name: "find", - Usage: "find data in the network", + Name: "find", + Usage: "find data in the network", ArgsUsage: "[dataCid]", Action: func(cctx *cli.Context) error { if !cctx.Args().Present() { @@ -243,8 +243,8 @@ var clientFindCmd = &cli.Command{ } var clientRetrieveCmd = &cli.Command{ - Name: "retrieve", - Usage: "retrieve data from network", + Name: "retrieve", + Usage: "retrieve data from network", ArgsUsage: "[dataCid outputPath]", Flags: []cli.Flag{ &cli.StringFlag{ @@ -314,8 +314,8 @@ var clientRetrieveCmd = &cli.Command{ } var clientQueryAskCmd = &cli.Command{ - Name: "query-ask", - Usage: "find a miners ask", + Name: "query-ask", + Usage: "find a miners ask", ArgsUsage: "[minerAddress]", Flags: []cli.Flag{ &cli.StringFlag{ diff --git a/cli/multisig.go b/cli/multisig.go index 877fd41a4..9d1123f6e 100644 --- a/cli/multisig.go +++ b/cli/multisig.go @@ -47,8 +47,8 @@ var multisigCmd = &cli.Command{ } var msigCreateCmd = &cli.Command{ - Name: "create", - Usage: "Create a new multisig wallet", + Name: "create", + Usage: "Create a new multisig wallet", ArgsUsage: "[address1 address2 ...]", Flags: []cli.Flag{ &cli.Int64Flag{ @@ -158,10 +158,10 @@ var msigCreateCmd = &cli.Command{ } var msigInspectCmd = &cli.Command{ - Name: "inspect", - Usage: "Inspect a multisig wallet", + Name: "inspect", + Usage: "Inspect a multisig wallet", ArgsUsage: "[address]", - Flags: []cli.Flag{}, + Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) if err != nil { @@ -271,10 +271,10 @@ func state(tx *samsig.Transaction) string { } var msigProposeCmd = &cli.Command{ - Name: "propose", - Usage: "Propose a multisig transaction", + Name: "propose", + Usage: "Propose a multisig transaction", ArgsUsage: "[multisigAddress destinationAddress value (optional)]", - Flags: []cli.Flag{}, + Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) if err != nil { @@ -385,10 +385,10 @@ var msigProposeCmd = &cli.Command{ } var msigApproveCmd = &cli.Command{ - Name: "approve", - Usage: "Approve a multisig message", + Name: "approve", + Usage: "Approve a multisig message", ArgsUsage: "[multisigAddress messageId]", - Flags: []cli.Flag{}, + Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) if err != nil { diff --git a/cli/paych.go b/cli/paych.go index 4d2077e75..e150d6769 100644 --- a/cli/paych.go +++ b/cli/paych.go @@ -23,8 +23,8 @@ var paychCmd = &cli.Command{ } var paychGetCmd = &cli.Command{ - Name: "get", - Usage: "Create a new payment channel or get existing one", + Name: "get", + Usage: "Create a new payment channel or get existing one", ArgsUsage: "[fromAddress toAddress amount]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() != 3 { @@ -102,8 +102,8 @@ var paychVoucherCmd = &cli.Command{ } var paychVoucherCreateCmd = &cli.Command{ - Name: "create", - Usage: "Create a signed payment channel voucher", + Name: "create", + Usage: "Create a signed payment channel voucher", ArgsUsage: "[channelAddress amount]", Flags: []cli.Flag{ &cli.IntFlag{ @@ -153,8 +153,8 @@ var paychVoucherCreateCmd = &cli.Command{ } var paychVoucherCheckCmd = &cli.Command{ - Name: "check", - Usage: "Check validity of payment channel voucher", + Name: "check", + Usage: "Check validity of payment channel voucher", ArgsUsage: "[channelAddress voucher]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() != 2 { @@ -189,8 +189,8 @@ var paychVoucherCheckCmd = &cli.Command{ } var paychVoucherAddCmd = &cli.Command{ - Name: "add", - Usage: "Add payment channel voucher to local datastore", + Name: "add", + Usage: "Add payment channel voucher to local datastore", ArgsUsage: "[channelAddress voucher]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() != 2 { @@ -225,8 +225,8 @@ var paychVoucherAddCmd = &cli.Command{ } var paychVoucherListCmd = &cli.Command{ - Name: "list", - Usage: "List stored vouchers for a given payment channel", + Name: "list", + Usage: "List stored vouchers for a given payment channel", ArgsUsage: "[channelAddress]", Flags: []cli.Flag{ &cli.BoolFlag{ @@ -275,8 +275,8 @@ var paychVoucherListCmd = &cli.Command{ } var paychVoucherBestSpendableCmd = &cli.Command{ - Name: "best-spendable", - Usage: "Print voucher with highest value that is currently spendable", + Name: "best-spendable", + Usage: "Print voucher with highest value that is currently spendable", ArgsUsage: "[channelAddress]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() != 1 { @@ -330,8 +330,8 @@ var paychVoucherBestSpendableCmd = &cli.Command{ } var paychVoucherSubmitCmd = &cli.Command{ - Name: "submit", - Usage: "Submit voucher to chain to update payment channel state", + Name: "submit", + Usage: "Submit voucher to chain to update payment channel state", ArgsUsage: "[channelAddress voucher]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() != 2 { diff --git a/cli/state.go b/cli/state.go index ca6ce888c..b736c91de 100644 --- a/cli/state.go +++ b/cli/state.go @@ -61,8 +61,8 @@ var stateCmd = &cli.Command{ } var stateMinerInfo = &cli.Command{ - Name: "miner-info", - Usage: "Retrieve miner information", + Name: "miner-info", + Usage: "Retrieve miner information", ArgsUsage: "[minerAddress]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -153,8 +153,8 @@ func loadTipSet(ctx context.Context, cctx *cli.Context, api api.FullNode) (*type } var statePowerCmd = &cli.Command{ - Name: "power", - Usage: "Query network or miner power", + Name: "power", + Usage: "Query network or miner power", ArgsUsage: "[ (optional)]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -197,8 +197,8 @@ var statePowerCmd = &cli.Command{ } var stateSectorsCmd = &cli.Command{ - Name: "sectors", - Usage: "Query the sector set of a miner", + Name: "sectors", + Usage: "Query the sector set of a miner", ArgsUsage: "[minerAddress]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -237,8 +237,8 @@ var stateSectorsCmd = &cli.Command{ } var stateProvingSetCmd = &cli.Command{ - Name: "proving", - Usage: "Query the proving set of a miner", + Name: "proving", + Usage: "Query the proving set of a miner", ArgsUsage: "[minerAddress]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -277,8 +277,8 @@ var stateProvingSetCmd = &cli.Command{ } var stateReplaySetCmd = &cli.Command{ - Name: "replay", - Usage: "Replay a particular message within a tipset", + Name: "replay", + Usage: "Replay a particular message within a tipset", ArgsUsage: "[tipsetKey messageCid]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() < 1 { @@ -384,8 +384,8 @@ var statePledgeCollateralCmd = &cli.Command{ } var stateGetDealSetCmd = &cli.Command{ - Name: "get-deal", - Usage: "View on-chain deal info", + Name: "get-deal", + Usage: "View on-chain deal info", ArgsUsage: "[dealId]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -486,8 +486,8 @@ var stateListActorsCmd = &cli.Command{ } var stateGetActorCmd = &cli.Command{ - Name: "get-actor", - Usage: "Print actor information", + Name: "get-actor", + Usage: "Print actor information", ArgsUsage: "[actorrAddress]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -528,8 +528,8 @@ var stateGetActorCmd = &cli.Command{ } var stateLookupIDCmd = &cli.Command{ - Name: "lookup", - Usage: "Find corresponding ID address", + Name: "lookup", + Usage: "Find corresponding ID address", ArgsUsage: "[address]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -566,8 +566,8 @@ var stateLookupIDCmd = &cli.Command{ } var stateSectorSizeCmd = &cli.Command{ - Name: "sector-size", - Usage: "Look up miners sector size", + Name: "sector-size", + Usage: "Look up miners sector size", ArgsUsage: "[minerAddress]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -603,8 +603,8 @@ var stateSectorSizeCmd = &cli.Command{ } var stateReadStateCmd = &cli.Command{ - Name: "read-state", - Usage: "View a json representation of an actors state", + Name: "read-state", + Usage: "View a json representation of an actors state", ArgsUsage: "[actorAddress]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -796,8 +796,8 @@ var stateComputeStateCmd = &cli.Command{ } var stateWaitMsgCmd = &cli.Command{ - Name: "wait-msg", - Usage: "Wait for a message to appear on chain", + Name: "wait-msg", + Usage: "Wait for a message to appear on chain", ArgsUsage: "[messageCid]", Flags: []cli.Flag{ &cli.StringFlag{ @@ -837,8 +837,8 @@ var stateWaitMsgCmd = &cli.Command{ } var stateCallCmd = &cli.Command{ - Name: "call", - Usage: "Invoke a method on an actor locally", + Name: "call", + Usage: "Invoke a method on an actor locally", ArgsUsage: "[toAddress methodId (optional)]", Flags: []cli.Flag{ &cli.StringFlag{ diff --git a/cli/sync.go b/cli/sync.go index 0cde9c97e..891f61da3 100644 --- a/cli/sync.go +++ b/cli/sync.go @@ -94,8 +94,8 @@ var syncWaitCmd = &cli.Command{ } var syncMarkBadCmd = &cli.Command{ - Name: "mark-bad", - Usage: "Mark the given block as bad, will prevent syncing to a chain that contains it", + Name: "mark-bad", + Usage: "Mark the given block as bad, will prevent syncing to a chain that contains it", ArgsUsage: "[blockCid]", Action: func(cctx *cli.Context) error { napi, closer, err := GetFullNodeAPI(cctx) @@ -119,8 +119,8 @@ var syncMarkBadCmd = &cli.Command{ } var syncCheckBadCmd = &cli.Command{ - Name: "check-bad", - Usage: "check if the given block was marked bad, and for what reason", + Name: "check-bad", + Usage: "check if the given block was marked bad, and for what reason", ArgsUsage: "[blockCid]", Action: func(cctx *cli.Context) error { napi, closer, err := GetFullNodeAPI(cctx) diff --git a/cli/wallet.go b/cli/wallet.go index b7123b594..ed80c062c 100644 --- a/cli/wallet.go +++ b/cli/wallet.go @@ -135,8 +135,8 @@ var walletGetDefault = &cli.Command{ } var walletSetDefault = &cli.Command{ - Name: "set-default", - Usage: "Set default wallet address", + Name: "set-default", + Usage: "Set default wallet address", ArgsUsage: "[address]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -160,8 +160,8 @@ var walletSetDefault = &cli.Command{ } var walletExport = &cli.Command{ - Name: "export", - Usage: "export keys", + Name: "export", + Usage: "export keys", ArgsUsage: "[address]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) @@ -196,8 +196,8 @@ var walletExport = &cli.Command{ } var walletImport = &cli.Command{ - Name: "import", - Usage: "import keys", + Name: "import", + Usage: "import keys", ArgsUsage: "[ (optional, will read from stdin if omitted)]", Action: func(cctx *cli.Context) error { api, closer, err := GetFullNodeAPI(cctx) diff --git a/cmd/lotus-bench/main.go b/cmd/lotus-bench/main.go index fa6b89a81..3b5927c88 100644 --- a/cmd/lotus-bench/main.go +++ b/cmd/lotus-bench/main.go @@ -179,8 +179,8 @@ func main() { } sbfs := &fs.Basic{ - Miner: maddr, - Root: sbdir, + Miner: maddr, + Root: sbdir, } sb, err := sectorbuilder.New(sbfs, cfg) diff --git a/cmd/lotus-seed/seed/seed.go b/cmd/lotus-seed/seed/seed.go index 59e4200cf..3f5946ccc 100644 --- a/cmd/lotus-seed/seed/seed.go +++ b/cmd/lotus-seed/seed/seed.go @@ -55,8 +55,8 @@ func PreSeal(maddr address.Address, pt abi.RegisteredProof, offset abi.SectorNum next := offset sbfs := &fs.Basic{ - Miner: maddr, - Root: sbroot, + Miner: maddr, + Root: sbroot, } sb, err := sectorbuilder.New(sbfs, cfg) diff --git a/go.mod b/go.mod index 1e7953a48..fe67193e5 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,6 @@ require ( github.com/multiformats/go-multiaddr-dns v0.2.0 github.com/multiformats/go-multiaddr-net v0.1.2 github.com/multiformats/go-multihash v0.0.13 - github.com/multiformats/go-varint v0.0.5 github.com/opentracing/opentracing-go v1.1.0 github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 github.com/prometheus/common v0.4.0