From 514c756570911d18c985d2f6243609286271a9b4 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Tue, 3 May 2022 14:35:06 -0400 Subject: [PATCH 1/2] Alias cli commands --- cli/chain.go | 5 ++++- cli/net.go | 3 ++- cli/state.go | 3 +++ cmd/lotus-miner/actor.go | 5 +++-- cmd/lotus-miner/proving.go | 5 +++-- cmd/lotus-shed/blockmsgid.go | 3 ++- cmd/lotus-shed/keyinfo.go | 5 +++-- cmd/lotus-shed/miner.go | 2 +- cmd/lotus-shed/mpool.go | 3 ++- cmd/lotus-shed/msg.go | 3 ++- cmd/lotus-sim/info_message.go | 1 + 11 files changed, 26 insertions(+), 12 deletions(-) diff --git a/cli/chain.go b/cli/chain.go index 63aa79483..00b9a73c6 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -90,7 +90,8 @@ var ChainHeadCmd = &cli.Command{ } var ChainGetBlock = &cli.Command{ - Name: "getblock", + Name: "get-block", + Aliases: []string{"getblock"}, Usage: "Get a block and print its details", ArgsUsage: "[blockCid]", Flags: []cli.Flag{ @@ -299,6 +300,7 @@ var ChainStatObjCmd = &cli.Command{ var ChainGetMsgCmd = &cli.Command{ Name: "getmessage", + Aliases: []string{"get-message", "get-msg"}, Usage: "Get and print a message by its cid", ArgsUsage: "[messageCid]", Action: func(cctx *cli.Context) error { @@ -349,6 +351,7 @@ var ChainGetMsgCmd = &cli.Command{ var ChainSetHeadCmd = &cli.Command{ Name: "sethead", + Aliases: []string{"set-head"}, Usage: "manually set the local nodes head tipset (Caution: normally only used for recovery)", ArgsUsage: "[tipsetkey]", Flags: []cli.Flag{ diff --git a/cli/net.go b/cli/net.go index c9a9a4392..5248a1410 100644 --- a/cli/net.go +++ b/cli/net.go @@ -358,7 +358,8 @@ var NetId = &cli.Command{ } var NetFindPeer = &cli.Command{ - Name: "findpeer", + Name: "find-peer", + Aliases: []string{"findpeer"}, Usage: "Find the addresses of a given peerID", ArgsUsage: "[peerId]", Action: func(cctx *cli.Context) error { diff --git a/cli/state.go b/cli/state.go index 18d9a12bd..b1346d6cd 100644 --- a/cli/state.go +++ b/cli/state.go @@ -1428,6 +1428,7 @@ func jsonReturn(code cid.Cid, method abi.MethodNum, ret []byte) (string, error) var StateWaitMsgCmd = &cli.Command{ Name: "wait-msg", + Aliases: []string{"wait-message"}, Usage: "Wait for a message to appear on chain", ArgsUsage: "[messageCid]", Flags: []cli.Flag{ @@ -1470,6 +1471,7 @@ var StateWaitMsgCmd = &cli.Command{ var StateSearchMsgCmd = &cli.Command{ Name: "search-msg", + Aliases: []string{"search-message"}, Usage: "Search to see whether a message has appeared on chain", ArgsUsage: "[messageCid]", Action: func(cctx *cli.Context) error { @@ -1727,6 +1729,7 @@ var StateCircSupplyCmd = &cli.Command{ var StateSectorCmd = &cli.Command{ Name: "sector", + Aliases: []string{"sector-info"}, Usage: "Get miner sector info", ArgsUsage: "[minerAddress] [sectorNumber]", Action: func(cctx *cli.Context) error { diff --git a/cmd/lotus-miner/actor.go b/cmd/lotus-miner/actor.go index 1409557cf..01440a09e 100644 --- a/cmd/lotus-miner/actor.go +++ b/cmd/lotus-miner/actor.go @@ -51,8 +51,9 @@ var actorCmd = &cli.Command{ } var actorSetAddrsCmd = &cli.Command{ - Name: "set-addrs", - Usage: "set addresses that your miner can be publicly dialed on", + Name: "set-addresses", + Aliases: []string{"set-addrs"}, + Usage: "set addresses that your miner can be publicly dialed on", Flags: []cli.Flag{ &cli.Int64Flag{ Name: "gas-limit", diff --git a/cmd/lotus-miner/proving.go b/cmd/lotus-miner/proving.go index ed4516b5a..faae5e955 100644 --- a/cmd/lotus-miner/proving.go +++ b/cmd/lotus-miner/proving.go @@ -522,8 +522,9 @@ var provingComputeCmd = &cli.Command{ } var provingComputeWindowPoStCmd = &cli.Command{ - Name: "window-post", - Usage: "Compute WindowPoSt for a specific deadline", + Name: "windowed-post", + Aliases: []string{"window-post"}, + Usage: "Compute WindowPoSt for a specific deadline", Description: `Note: This command is intended to be used to verify PoSt compute performance. It will not send any messages to the chain.`, ArgsUsage: "[deadline index]", diff --git a/cmd/lotus-shed/blockmsgid.go b/cmd/lotus-shed/blockmsgid.go index 85b786ec0..3dc26b92d 100644 --- a/cmd/lotus-shed/blockmsgid.go +++ b/cmd/lotus-shed/blockmsgid.go @@ -14,7 +14,8 @@ import ( ) var blockmsgidCmd = &cli.Command{ - Name: "blockmsgid", + Name: "block-message-id", + Aliases: []string{"blockmsgid"}, Usage: "Print a block's pubsub message ID", ArgsUsage: " ...", Action: func(cctx *cli.Context) error { diff --git a/cmd/lotus-shed/keyinfo.go b/cmd/lotus-shed/keyinfo.go index 3c99b5050..00ac9dc50 100644 --- a/cmd/lotus-shed/keyinfo.go +++ b/cmd/lotus-shed/keyinfo.go @@ -41,8 +41,9 @@ type keyInfoOutput struct { } var keyinfoCmd = &cli.Command{ - Name: "keyinfo", - Usage: "work with lotus keyinfo files (wallets and libp2p host keys)", + Name: "key-info", + Aliases: []string{"keyinfo"}, + Usage: "work with lotus keyinfo files (wallets and libp2p host keys)", Description: `The subcommands of keyinfo provide helpful tools for working with keyinfo files without having to run the lotus daemon.`, Subcommands: []*cli.Command{ diff --git a/cmd/lotus-shed/miner.go b/cmd/lotus-shed/miner.go index 479e081e9..c44b67d77 100644 --- a/cmd/lotus-shed/miner.go +++ b/cmd/lotus-shed/miner.go @@ -119,7 +119,7 @@ var minerFaultsCmd = &cli.Command{ var minerCreateCmd = &cli.Command{ Name: "create", - Usage: "sends a create miner msg", + Usage: "sends a create miner message", ArgsUsage: "[sender] [owner] [worker] [sector size]", Action: func(cctx *cli.Context) error { wapi, closer, err := lcli.GetFullNodeAPI(cctx) diff --git a/cmd/lotus-shed/mpool.go b/cmd/lotus-shed/mpool.go index 004bd99a6..f4744d615 100644 --- a/cmd/lotus-shed/mpool.go +++ b/cmd/lotus-shed/mpool.go @@ -20,7 +20,8 @@ var mpoolCmd = &cli.Command{ } var minerSelectMsgsCmd = &cli.Command{ - Name: "miner-select-msgs", + Name: "miner-select-messages", + Aliases: []string{"miner-select-msgs"}, Flags: []cli.Flag{ &cli.Float64Flag{ Name: "ticket-quality", diff --git a/cmd/lotus-shed/msg.go b/cmd/lotus-shed/msg.go index 7853624a6..d8e02bc82 100644 --- a/cmd/lotus-shed/msg.go +++ b/cmd/lotus-shed/msg.go @@ -22,7 +22,8 @@ import ( ) var msgCmd = &cli.Command{ - Name: "msg", + Name: "message", + Aliases: []string{"msg"}, Usage: "Translate message between various formats", ArgsUsage: "Message in any form", Action: func(cctx *cli.Context) error { diff --git a/cmd/lotus-sim/info_message.go b/cmd/lotus-sim/info_message.go index afdd20c4e..91c57ba5c 100644 --- a/cmd/lotus-sim/info_message.go +++ b/cmd/lotus-sim/info_message.go @@ -16,6 +16,7 @@ import ( var infoMessageSizeSimCommand = &cli.Command{ Name: "message-size", + Aliases: []string{"msg-size"}, Description: "Output information about message size distribution", Flags: []cli.Flag{ &cli.Int64Flag{ From 0869bea026253370767ec3daad2107ba2eea6ad6 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Tue, 3 May 2022 14:42:13 -0400 Subject: [PATCH 2/2] make gen --- documentation/en/cli-lotus-miner.md | 95 +++++--------- documentation/en/cli-lotus.md | 197 +++++++++------------------- 2 files changed, 96 insertions(+), 196 deletions(-) diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index 38f075232..5be59a1b6 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -236,35 +236,24 @@ USAGE: lotus-miner actor command [command options] [arguments...] COMMANDS: - set-addrs set addresses that your miner can be publicly dialed on - withdraw withdraw available balance - repay-debt pay down a miner's debt - set-peer-id set the peer id of your miner - set-owner Set owner address (this command should be invoked twice, first with the old owner as the senderAddress, and then with the new owner) - control Manage control addresses - propose-change-worker Propose a worker address change - confirm-change-worker Confirm a worker address change - compact-allocated compact allocated sectors bitfield - help, h Shows a list of commands or help for one command + set-addresses, set-addrs set addresses that your miner can be publicly dialed on + withdraw withdraw available balance + repay-debt pay down a miner's debt + set-peer-id set the peer id of your miner + set-owner Set owner address (this command should be invoked twice, first with the old owner as the senderAddress, and then with the new owner) + control Manage control addresses + propose-change-worker Propose a worker address change + confirm-change-worker Confirm a worker address change + compact-allocated compact allocated sectors bitfield + help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help (default: false) ``` -### lotus-miner actor set-addrs +#### lotus-miner actor set-addresses, set-addrs ``` -NAME: - lotus-miner actor set-addrs - set addresses that your miner can be publicly dialed on - -USAGE: - lotus-miner actor set-addrs [command options] [arguments...] - -OPTIONS: - --gas-limit value set gas limit (default: 0) - --unset unset address (default: false) - --help, -h show help (default: false) - ``` ### lotus-miner actor withdraw @@ -1199,22 +1188,22 @@ USAGE: lotus-miner net command [command options] [arguments...] COMMANDS: - peers Print peers - ping Ping peers - connect Connect to a peer - listen List listen addresses - id Get node identity - findpeer Find the addresses of a given peerID - scores Print peers' pubsub scores - reachability Print information about reachability from the internet - bandwidth Print bandwidth usage information - block Manage network connection gating rules - stat Report resource usage for a scope - limit Get or set resource limits for a scope - protect Add one or more peer IDs to the list of protected peer connections - unprotect Remove one or more peer IDs from the list of protected peer connections. - list-protected List the peer IDs with protected connection. - help, h Shows a list of commands or help for one command + peers Print peers + ping Ping peers + connect Connect to a peer + listen List listen addresses + id Get node identity + find-peer, findpeer Find the addresses of a given peerID + scores Print peers' pubsub scores + reachability Print information about reachability from the internet + bandwidth Print bandwidth usage information + block Manage network connection gating rules + stat Report resource usage for a scope + limit Get or set resource limits for a scope + protect Add one or more peer IDs to the list of protected peer connections + unprotect Remove one or more peer IDs from the list of protected peer connections. + list-protected List the peer IDs with protected connection. + help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help (default: false) @@ -1290,17 +1279,8 @@ OPTIONS: ``` -### lotus-miner net findpeer +#### lotus-miner net find-peer, findpeer ``` -NAME: - lotus-miner net findpeer - Find the addresses of a given peerID - -USAGE: - lotus-miner net findpeer [command options] [peerId] - -OPTIONS: - --help, -h show help (default: false) - ``` ### lotus-miner net scores @@ -2141,29 +2121,16 @@ USAGE: lotus-miner proving compute command [command options] [arguments...] COMMANDS: - window-post Compute WindowPoSt for a specific deadline - help, h Shows a list of commands or help for one command + windowed-post, window-post Compute WindowPoSt for a specific deadline + help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help (default: false) ``` -#### lotus-miner proving compute window-post +##### lotus-miner proving compute windowed-post, window-post ``` -NAME: - lotus-miner proving compute window-post - Compute WindowPoSt for a specific deadline - -USAGE: - lotus-miner proving compute window-post [command options] [deadline index] - -DESCRIPTION: - Note: This command is intended to be used to verify PoSt compute performance. - It will not send any messages to the chain. - -OPTIONS: - --help, -h show help (default: false) - ``` ## lotus-miner storage diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index 14f7b7deb..9a87a5008 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -1726,30 +1726,30 @@ USAGE: lotus state command [command options] [arguments...] COMMANDS: - power Query network or miner power - sectors Query the sector set of a miner - active-sectors Query the active sector set of a miner - list-actors list all actors in the network - list-miners list all miners in the network - circulating-supply Get the exact current circulating supply of Filecoin - sector Get miner sector info - get-actor Print actor information - lookup Find corresponding ID address - replay Replay a particular message - sector-size Look up miners sector size - read-state View a json representation of an actors state - list-messages list messages on chain matching given criteria - compute-state Perform state computations - call Invoke a method on an actor locally - get-deal View on-chain deal info - wait-msg Wait for a message to appear on chain - search-msg Search to see whether a message has appeared on chain - miner-info Retrieve miner information - market Inspect the storage market actor - exec-trace Get the execution trace of a given message - network-version Returns the network version - miner-proving-deadline Retrieve information about a given miner's proving deadline - help, h Shows a list of commands or help for one command + power Query network or miner power + sectors Query the sector set of a miner + active-sectors Query the active sector set of a miner + list-actors list all actors in the network + list-miners list all miners in the network + circulating-supply Get the exact current circulating supply of Filecoin + sector, sector-info Get miner sector info + get-actor Print actor information + lookup Find corresponding ID address + replay Replay a particular message + sector-size Look up miners sector size + read-state View a json representation of an actors state + list-messages list messages on chain matching given criteria + compute-state Perform state computations + call Invoke a method on an actor locally + get-deal View on-chain deal info + wait-msg, wait-message Wait for a message to appear on chain + search-msg, search-message Search to see whether a message has appeared on chain + miner-info Retrieve miner information + market Inspect the storage market actor + exec-trace Get the execution trace of a given message + network-version Returns the network version + miner-proving-deadline Retrieve information about a given miner's proving deadline + help, h Shows a list of commands or help for one command OPTIONS: --tipset value specify tipset to call method on (pass comma separated array of cids) @@ -1837,17 +1837,8 @@ OPTIONS: ``` -### lotus state sector +#### lotus state sector, sector-info ``` -NAME: - lotus state sector - Get miner sector info - -USAGE: - lotus state sector [command options] [minerAddress] [sectorNumber] - -OPTIONS: - --help, -h show help (default: false) - ``` ### lotus state get-actor @@ -1985,31 +1976,12 @@ OPTIONS: ``` -### lotus state wait-msg +#### lotus state wait-msg, wait-message ``` -NAME: - lotus state wait-msg - Wait for a message to appear on chain - -USAGE: - lotus state wait-msg [command options] [messageCid] - -OPTIONS: - --timeout value (default: "10m") - --help, -h show help (default: false) - ``` -### lotus state search-msg +#### lotus state search-msg, search-message ``` -NAME: - lotus state search-msg - Search to see whether a message has appeared on chain - -USAGE: - lotus state search-msg [command options] [messageCid] - -OPTIONS: - --help, -h show help (default: false) - ``` ### lotus state miner-info @@ -2103,24 +2075,24 @@ USAGE: lotus chain command [command options] [arguments...] COMMANDS: - head Print chain head - getblock Get a block and print its details - read-obj Read the raw bytes of an object - delete-obj Delete an object from the chain blockstore - stat-obj Collect size and ipld link counts for objs - getmessage Get and print a message by its cid - sethead manually set the local nodes head tipset (Caution: normally only used for recovery) - list, love View a segment of the chain - get Get chain DAG node by path - bisect bisect chain for an event - export export chain to a car file - slash-consensus Report consensus fault - gas-price Estimate gas prices - inspect-usage Inspect block space usage of a given tipset - decode decode various types - encode encode various types - disputer interact with the window post disputer - help, h Shows a list of commands or help for one command + head Print chain head + get-block, getblock Get a block and print its details + read-obj Read the raw bytes of an object + delete-obj Delete an object from the chain blockstore + stat-obj Collect size and ipld link counts for objs + getmessage, get-message, get-msg Get and print a message by its cid + sethead, set-head manually set the local nodes head tipset (Caution: normally only used for recovery) + list, love View a segment of the chain + get Get chain DAG node by path + bisect bisect chain for an event + export export chain to a car file + slash-consensus Report consensus fault + gas-price Estimate gas prices + inspect-usage Inspect block space usage of a given tipset + decode decode various types + encode encode various types + disputer interact with the window post disputer + help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help (default: false) @@ -2140,18 +2112,8 @@ OPTIONS: ``` -### lotus chain getblock +#### lotus chain get-block, getblock ``` -NAME: - lotus chain getblock - Get a block and print its details - -USAGE: - lotus chain getblock [command options] [blockCid] - -OPTIONS: - --raw print just the raw block header (default: false) - --help, -h show help (default: false) - ``` ### lotus chain read-obj @@ -2204,32 +2166,12 @@ OPTIONS: ``` -### lotus chain getmessage +##### lotus chain getmessage, get-message, get-msg ``` -NAME: - lotus chain getmessage - Get and print a message by its cid - -USAGE: - lotus chain getmessage [command options] [messageCid] - -OPTIONS: - --help, -h show help (default: false) - ``` -### lotus chain sethead +#### lotus chain sethead, set-head ``` -NAME: - lotus chain sethead - manually set the local nodes head tipset (Caution: normally only used for recovery) - -USAGE: - lotus chain sethead [command options] [tipsetkey] - -OPTIONS: - --genesis reset head to genesis (default: false) - --epoch value reset head to given epoch (default: 0) - --help, -h show help (default: false) - ``` #### lotus chain list, love @@ -2602,22 +2544,22 @@ USAGE: lotus net command [command options] [arguments...] COMMANDS: - peers Print peers - ping Ping peers - connect Connect to a peer - listen List listen addresses - id Get node identity - findpeer Find the addresses of a given peerID - scores Print peers' pubsub scores - reachability Print information about reachability from the internet - bandwidth Print bandwidth usage information - block Manage network connection gating rules - stat Report resource usage for a scope - limit Get or set resource limits for a scope - protect Add one or more peer IDs to the list of protected peer connections - unprotect Remove one or more peer IDs from the list of protected peer connections. - list-protected List the peer IDs with protected connection. - help, h Shows a list of commands or help for one command + peers Print peers + ping Ping peers + connect Connect to a peer + listen List listen addresses + id Get node identity + find-peer, findpeer Find the addresses of a given peerID + scores Print peers' pubsub scores + reachability Print information about reachability from the internet + bandwidth Print bandwidth usage information + block Manage network connection gating rules + stat Report resource usage for a scope + limit Get or set resource limits for a scope + protect Add one or more peer IDs to the list of protected peer connections + unprotect Remove one or more peer IDs from the list of protected peer connections. + list-protected List the peer IDs with protected connection. + help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help (default: false) @@ -2693,17 +2635,8 @@ OPTIONS: ``` -### lotus net findpeer +#### lotus net find-peer, findpeer ``` -NAME: - lotus net findpeer - Find the addresses of a given peerID - -USAGE: - lotus net findpeer [command options] [peerId] - -OPTIONS: - --help, -h show help (default: false) - ``` ### lotus net scores