Documentation ¶
Overview ¶
Package commands implements the command to print the blockchain.
Package commands implements the command to print the blockchain.
Package cmd implements the command to print the blockchain.
Index ¶
- Constants
- Variables
- func EpochTime(curr, e abi.ChainEpoch, blockDelay uint64) string
- func Import(r repo.Repo, fileName string) error
- func PrintString(w io.Writer, s fmt.Stringer) error
- func ReqContext(cctx context.Context) context.Context
- func Run(ctx context.Context, args []string, stdin, stdout, stderr *os.File) (int, error)
- type APIInfo
- type ActorInfo
- type ActorView
- type AddressLsResult
- type AddressResult
- type BlockResult
- type ChainHeadResult
- type ChainLsResult
- type IDDetails
- type MessageSendResult
- type SilentWriter
- func (sw *SilentWriter) ClearError() error
- func (sw *SilentWriter) Error() error
- func (sw *SilentWriter) Print(a ...interface{}) bool
- func (sw *SilentWriter) Printf(format string, a ...interface{}) bool
- func (sw *SilentWriter) Println(a ...interface{}) bool
- func (sw *SilentWriter) Write(p []byte) bool
- func (sw *SilentWriter) WriteString(str string) bool
- func (sw *SilentWriter) WriteStringln(str string) bool
- type WaitResult
- type WalletSerializeResult
Constants ¶
const ( // OptionAPI is the name of the option for specifying the api port. OptionAPI = "cmdapiaddr" OptionToken = "token" // OptionRepoDir is the name of the option for specifying the directory of the repo. OptionRepoDir = "repodir" // OptionDrandConfigAddr is the init option for configuring drand to a given network address at init time OptionDrandConfigAddr = "drand-config-addr" // offlineMode tells us if we should try to connect this Filecoin node to the network OfflineMode = "offline" // ELStdout tells the daemon to write event logs to stdout. ELStdout = "elstdout" // SwarmAddress is the multiaddr for this Filecoin node SwarmAddress = "swarmlisten" // SwarmPublicRelayAddress is a public address that the venus node // will listen on if it is operating as a relay. We use this to specify // the public ip:port of a relay node that is sitting behind a static // NAT mapping. SwarmPublicRelayAddress = "swarmrelaypublic" // PeerKeyFile is the path of file containing key to use for new nodes libp2p identity PeerKeyFile = "peerkeyfile" // WalletKeyFile is the path of file containing wallet keys that may be imported on initialization WalletKeyFile = "wallet-keyfile" // GenesisFile is the path of file containing archive of genesis block DAG data GenesisFile = "genesisfile" // Network populates config with network-specific parameters for a known network (e.g. testnet2) Network = "network" // IsRelay when set causes the the daemon to provide libp2p relay // services allowing other filecoin nodes behind NATs to talk directly. IsRelay = "is-relay" Size = "size" ImportSnapshot = "import-snapshot" // wallet password Password = "password" AuthServiceURL = "auth-url" )
const Confidence = 10
Variables ¶
var ( // ErrInvalidSize indicates that the provided size was invalid. ErrInvalidSize = fmt.Errorf("invalid size") // ErrInvalidPrice indicates that the provided price was invalid. ErrInvalidPrice = fmt.Errorf("invalid price") // ErrInvalidAmount indicates that the provided amount was invalid. ErrInvalidAmount = fmt.Errorf("invalid amount") // ErrInvalidCollateral indicates that provided collateral was invalid. ErrInvalidCollateral = fmt.Errorf("invalid collateral") // ErrInvalidPledge indicates that provided pledge was invalid. ErrInvalidPledge = fmt.Errorf("invalid pledge") // ErrInvalidBlockHeight indicates that the provided block height was invalid. ErrInvalidBlockHeight = fmt.Errorf("invalid block height") // ErrMissingDaemon is the error returned when trying to execute a command that requires the daemon to be started. ErrMissingDaemon = errors.New("daemon must be started before using this command") // ErrNoWalletAddresses indicates that there are no addresses in wallet to mine to. ErrNoWalletAddresses = fmt.Errorf("no addresses in wallet to mine to") )
var ( AdminExtra = new(cmds.Extra).SetValue("perm", "admin") WriteExtra = new(cmds.Extra).SetValue("perm", "write") SignExtra = new(cmds.Extra).SetValue("perm", "sign") ReadExtra = new(cmds.Extra).SetValue("perm", "read") )
var RootCmd = &cmds.Command{ Helptext: cmds.HelpText{ Tagline: "A decentralized storage network", Subcommands: ` START RUNNING FILECOIN venus config <key> [<value>] - Get and set filecoin config values venus daemon - Start a long-running daemon process venus wallet - Manage your filecoin wallets venus msig - Interact with a multisig wallet VIEW DATA STRUCTURES venus chain - Inspect the filecoin blockchain venus sync - Inspect the filecoin Sync venus dag - Interact with IPLD DAG objects venus show - Get human-readable representations of filecoin objects NETWORK COMMANDS venus swarm - Interact with the swarm venus drand - retrieve drand randomness MESSAGE COMMANDS venus send - Send message venus mpool - Manage the message pool State COMMANDS venus wait-msg - Wait for a message to appear on chain venus search-msg - Search to see whether a message has appeared on chain venus power - Query network or miner power venus sectors - Query the sector set of a miner venus active-sectors - Query the active sector set of a miner venus sector - Get miner sector info venus get-actor - Print actor information venus lookup - Find corresponding ID address venus sector-size - Look up miners sector size venus get-deal - View on-chain deal info venus miner-info - Retrieve miner information venus network-version - MReturns the network version venus list-actor - list all actors Paych COMMANDS venus paych - Manage payment channels TOOL COMMANDS venus inspect - Show info about the venus node venus leb128 - Leb128 cli encode/decode venus log - Interact with the daemon event log output venus protocol - Show protocol parameter details venus version - Show venus version information venus seed - Seal sectors for genesis miner venus fetch - Fetch proving parameters `, }, Options: []cmds.Option{ cmds.StringsOption(OptionToken, "set the auth token to use"), cmds.StringOption(OptionAPI, "set the api port to use"), cmds.StringOption(OptionRepoDir, "set the repo directory, defaults to ~/.venus/repo"), cmds.StringOption(cmds.EncLong, cmds.EncShort, "The encoding type the output should be encoded with (pretty-json or json)").WithDefault("pretty-json"), cmds.BoolOption("help", "Show the full command help text."), cmds.BoolOption("h", "Show a short version of the command help text."), }, Subcommands: make(map[string]*cmds.Command), }
command object for the local cli
command object for the daemon
Functions ¶
func Import ¶
Import cache tipset cids to store. The value of the cached tipset CIDS is used as the check-point when running `venus daemon`
func PrintString ¶
PrintString prints a given Stringer to the writer.
Types ¶
type ActorView ¶
type ActorView struct { Address string `json:"address"` Code cid.Cid `json:"code,omitempty"` Nonce uint64 `json:"nonce"` Balance abi.TokenAmount `json:"balance"` Head cid.Cid `json:"head,omitempty"` }
ActorView represents a generic way to represent details about any actor to the user.
type AddressLsResult ¶
type AddressLsResult struct {
Addresses []address.Address
}
AddressLsResult is the result of running the address list command.
type AddressResult ¶
type AddressResult struct {
Address address.Address
}
type BlockResult ¶
type BlockResult struct { Cid cid.Cid Miner address.Address }
type ChainHeadResult ¶
type ChainHeadResult struct { Height abi.ChainEpoch ParentWeight big.Int Cids []cid.Cid Timestamp string }
type ChainLsResult ¶
type ChainLsResult struct { Height abi.ChainEpoch Timestamp string Blocks []BlockResult }
type IDDetails ¶
type IDDetails struct { Addresses []ma.Multiaddr ID peer.ID AgentVersion string ProtocolVersion string PublicKey []byte // raw bytes }
IDDetails is a collection of information about a node.
func (IDDetails) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*IDDetails) UnmarshalJSON ¶
UnmarshalJSON implements Unmarshaler
type MessageSendResult ¶
MessageSendResult is the return type for message send command
type SilentWriter ¶
type SilentWriter struct {
// contains filtered or unexported fields
}
SilentWriter writes to a stream, stopping after the first error and discarding output until the error is cleared. No printing methods return an error (to avoid warnings about ignoring it), but they do return a boolean indicating whether an error is waiting to be cleared. Example usage:
sw := NewSilentWriter(w) sw.Println("A line") sw.Println("Another line") return sw.Error()
func NewSilentWriter ¶
func NewSilentWriter(w io.Writer) *SilentWriter
NewSilentWriter returns a new writer backed by `w`.
func (*SilentWriter) ClearError ¶
func (sw *SilentWriter) ClearError() error
ClearError clears and returns any error encountered while writing. Subsequent writes will attempt to write to the underlying writer again.
func (*SilentWriter) Error ¶
func (sw *SilentWriter) Error() error
Error returns any error encountered while writing.
func (*SilentWriter) Print ¶
func (sw *SilentWriter) Print(a ...interface{}) bool
Print writes with fmt.Fprint and returns true if there was no error.
func (*SilentWriter) Printf ¶
func (sw *SilentWriter) Printf(format string, a ...interface{}) bool
Printf writes with fmt.Fprintf and returns true if there was no error.
func (*SilentWriter) Println ¶
func (sw *SilentWriter) Println(a ...interface{}) bool
Println writes with fmt.Fprintln and returns true if there was no error.
func (*SilentWriter) Write ¶
func (sw *SilentWriter) Write(p []byte) bool
Write writes with io.Writer.Write and returns true if there was no error.
func (*SilentWriter) WriteString ¶
func (sw *SilentWriter) WriteString(str string) bool
WriteString writes with io.WriteString and returns true if there was no error.
func (*SilentWriter) WriteStringln ¶
func (sw *SilentWriter) WriteStringln(str string) bool
WriteString writes with io.WriteString and returns true if there was no error.
type WaitResult ¶
type WaitResult struct { Message *types.UnsignedMessage Receipt *types.MessageReceipt Signature vm.ActorMethodSignature }
WaitResult is the result of a message wait call.
type WalletSerializeResult ¶
WalletSerializeResult is the type wallet export and import return and expect.
Source Files ¶
- address.go
- chain.go
- config.go
- daemon.go
- dag.go
- dispute.go
- drand.go
- errors.go
- fetch.go
- import.go
- inspector.go
- leb128.go
- log.go
- main.go
- message.go
- miner.go
- miner_actor.go
- miner_proving.go
- mpool.go
- multisig.go
- multisig_helper.go
- paych.go
- permission.go
- protocol.go
- seed.go
- show.go
- state.go
- swarm.go
- sync.go
- utils.go
- version.go