arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Keeper Commandline Mannual

hashtag
1 Prefacearrow-up-right

This article will introduce in detail the use of the command line function of the keeper-Node of the MEMO system; the keeper needs to download the binary and execute the program 'mefs-keeper' to start a Memo keeper-Node.

Usage

Use the following command to view all commands

hashtag

hashtag

Introduction

Used to create a wallet in the specified path. If the wallet information already exists in this path, the existing wallet will be used directly without recreating the wallet. Assign the MEFS_PATH environment virable to specify a path for this node.

Usage

Options

Example

The example sets the root directory of the node to: ~/.memo-keeper

hashtag

Introduction

The command is used to start and stop an keeper-Node

Usage

Options

Example

hashtag

Introduction

This command implements the related functions of operating the wallet.

Usage

Subcommands

Introduction

Create a new wallet address

Introduction

View all wallet addresses default Display

Introduction

View the default wallet address

Example

Introduction

Export the wallet's private key

Example

Parameter wallet-address is the wallet address of the node.

hashtag

Introduction

This command is used to modify the configuration file, which takes effect only when the node is not started; if the config is modified while the node is running, the node needs to be restarted to make it take effect;

The path where the configuration file is located: config.json in the root directory of the node which is specified when init the node.

Usage

Subcommands

Introduction

The set subcommand is used to set the value of the specified option in the configuration file

Usage

Options

Example

Configure the value of contract.endPoint

Introduction

This command is used to get the value of the specified configuration item

Usage

Example

Get the contract.endPoint value

hashtag

Introduction

This command is used to set the bootstrap node in the configuration file, multiple bootstrap nodes can be added.

Usage

Subcommands

Introduction

View the current node bootstrap node list

Introduction

Add a bootstrap node

Example

Introduction

clear the bootstrap node

hashtag

hashtag

Introduction

Network related commands

Usage

Subcommands

Introduction

This command checks node network information

Usage

Example

'12D3K...' here is the peerID of this node.

Introduction

Show the network information of all nodes currently connected.

Usage

Introduction

This command connects to a specified node manually.

Usage

Note

About how to construction the multiaddr for a node.

First use the net info command to view the network information of the node.

And the multiaddr of this node is:

Introduction

View node information according to peerID, command usage:

Usage

Example

Introduction

Used for the keeper node to declare its own public network ip address; (only the keeper node needs to use this command)

Usage

hashtag

Introduction

This command interacts with state db to obtain pay and penalty information about this node, or settle current income of this node.

Usage

Subcommands

This command is used to read from state db to get the payment and penalty information of storage orders between user and provider nodes.

This command is used to read from state db to show the current balance in fs and in memo token.

This command is used for provider nodes to settle the current storage income.

hashtag

Introduction

View commands for connected nodes

Introduction

This command is used to list connected roles

Usage

Introduction

This command checks the basic information of this node

Usage

Options

Example

or

hashtag

Introduction

Node pledge, withdrawal and other operations.

Usage

Subcommands

Note

About parameter 'amount' in subcommands

Quotes should be used for the amount parameter, and there must be a space between the amount and the unit. The unit is not case-sensitive. It can be Memo, NanoMemo, AttoMemo. The relationship between them is: 1 Memo=10^9 NanoMemo=10 ^ 18 AttoMemo

Introduction

Used to set the description for a node.

Introduction

Used to pledge some Memo for this node. Efficiant amount of Memo in wallet is required.

Usage

Example

To pledge 1 Memo for this node.

Introduction

View the current pledge amount.

Example

Introducton

Take out some pledged Memo from pledge balance to fs balance.

Example

Withdraw the pledge of 0.5 Memo to the Fs account

Introduction

pledgeRewardWithdraw Withdraw the pledge income to the FS file system.

Example

Withdraw 0.5Memo of pledge reward to Fs account

Introduction

withdraw Take out the token of the file system to the (Erc20) wallet

Example

Take out 0.5memo of the Fs file system to the (Erc20) wallet

Introduction

This command makes the node exit the current role. Wallet address and the balance in it is not effected.

Caution

Role-related functions will no longer be available at this time. However, the wallet balance will not be affected. For keepers and keepers, the role pledge amount provided when registering the role can be withdrawn after run quitRole.

Example

Introduction

alterPayee used to change the current payee.

hashtag

Introduction

View current node version

Usage

hashtag

hashtag

Introduction

It is used to repair the db as much as possible when the node starts abnormally. Warning: Do not exit the node abnormally. When you want to exit the node, you should use the daemon stop command to exit normally. Failure to do so may result in db corruption beyond repair

Usage

Example

Repair state database

hashtag

Introduction

Used when the node is down. Import/export state (or meta) database.

Subcommands

Introduction

Export the state database to a file, using the following method:

Usage

Example

Export the state database to the current directory

Introduciton

To import a database from a file, use the following method:

Usage

Example

import state database

hashtag

Introduction

The keeper node sets the whitelist function. When creating a bucket, the nodes in the whitelist are given priority.

Usage

Subcommands

Introduction

View whitelist node

Example

View the nodes in the whitelist

Introduction

Add whitelist node

Example

Add keeper node to whitelist

The parameter PID is the keeper node ID to be added to the whitelist

Introduction

delete whitelist node

Example

Delete whitelist nodes

The parameter PID is the keeper node ID to be added to the whitelist

Introduction

Check whether the node is in the whitelist

Example

Check whether the node is in the current whitelist

mefs-keeper restrict has PID The parameter PID is the keeper node ID to be added to the whitelist

Introduction

Set whitelist status

Example

Enable the whitelist function

Turn off the whitelist function

Introduction

Check whitelist status

Example

Check whitelist status

hashtag

hashtag

Introduction

Query the value of the token file of the node. The token file is located in the root directory of the node. Ordinary keepers do not need to pay attention to this value.

Usage

hashtag

Introduction

This command is used to set the log level. Different levels display log information of different alarm levels. The default is info level, which only displays normal status information. Ordinary keepers should use info log level. The debug/warn/error level is used by developers to view detailed error logs. This level will generate a large number of logs and cannot be in debug mode for a long time, otherwise it will take up a lot of disk space. It is not recommended for ordinary keepers to use.

Subcommands

Usage

Example

mefs-keeper -h

COMMANDS:
   init       Initialize a memoriae repo
   daemon     Run a network-connected Memoriae node.
   auth       Interact with auth
   wallet     Interact with wallet
   net        Interact with net
   config     Interact with config
   state      Interact with state manager
   role       Interact with role manager
   info       print information of this node
   register   register an account id for the wallet first, then register a role for it, at last, add it into a group.
   version    Print version
   backup     backup export or import
   bootstrap  bootstrap
   recover    recover
   log        Manage logging
   settle     Interact with settlement chain
   order      Interact with order
   restrict   Interact with restrict
   transfer   transfer eth or memo
   help, h    Shows a list of commands or help for one command
2 Start-node related commandsarrow-up-right
2.1 initarrow-up-right
2.2 daemonarrow-up-right
2.3 walletarrow-up-right
2.3.1 wallet newarrow-up-right
2.3.2 wallet listarrow-up-right
2.3.3 wallet defaultarrow-up-right
2.3.4 wallet exportarrow-up-right
2.4 configarrow-up-right
2.4.1 config setarrow-up-right
2.4.2 config getarrow-up-right
2.5 bootstraparrow-up-right
2.5.1 listarrow-up-right
2.5.2 addarrow-up-right
2.5.3 cleararrow-up-right
3 Status View Related Commandsarrow-up-right
3.1 netarrow-up-right
3.1.1 infoarrow-up-right
3.1.2 peersarrow-up-right
3.1.3 connectarrow-up-right
3.1.4 findpeerarrow-up-right
3.1.5 declarearrow-up-right
3.2 statearrow-up-right
3.2.1 postarrow-up-right
3.2.2 payarrow-up-right
3.2.3 withdrawarrow-up-right
3.3 rolearrow-up-right
3.3.1 listarrow-up-right
3.4 infoarrow-up-right
3.5 settlearrow-up-right
3.5.1 setDescarrow-up-right
3.5.2 pledgeAddarrow-up-right
3.5.3 pledgeGetarrow-up-right
3.5.4 pledgeWithdrawarrow-up-right
3.5.5 pledgeRewardWithdrawarrow-up-right
3.5.6 withdrawarrow-up-right
3.5.7 quitRolearrow-up-right
3.5.8 alterPayeearrow-up-right
3.6 versionarrow-up-right
4 keeper daily used commandsarrow-up-right
4.1 recoverarrow-up-right
4.2 backuparrow-up-right
4.2.1 exportarrow-up-right
4.2.2 importarrow-up-right
4.3 restrictarrow-up-right
4.3.1 listarrow-up-right
4.3.2 addarrow-up-right
4.3.3 deletearrow-up-right
4.3.4 hasarrow-up-right
4.3.5 setarrow-up-right
4.3.6 statarrow-up-right
5 Other commandsarrow-up-right
5.1 autharrow-up-right
5.2 log commandarrow-up-right
5.2.1 setLevelarrow-up-right
mefs-keeper init -h
   --setPass     set password using input (default: false)
   --password value, --pwd value  set password for access secret key (default: "memoriae")
   --secretKey value, --sk value  secret key
   --keyfile value, --kf value   absolute path of keyfile
   --kpw value      password to decrypt keyfile
   --help, -h       show help (default: false)
MEFS_PATH=~/.memo-keeper ./mefs-keeper init   --setPass=true
mefs-keeper daemon start -h

COMMANDS:
   start    Start a running mefs daemon
   stop     Stop a running mefs daemon
   help, h  Shows a list of commands or help for one command
--password value, --pwd value Use the password when registering (default: memoriae) 
--api value Set the api address to use (default: /ip4/127.0.0.1/tcp/5001) 
--secretKey value, --sk value Use the private key to create the node, if not, please initialize the node 
--swarm-port value Set the swarm port to be used by the node (default: 4001) 
--group value Set the group the node will enter (default: 0 ) 
--price value set the price (default: 0, means not modify the price in config.json) 
--secureAPI Whether it is a secure API (default: true) 
--help, -h View more help
MEFS_PATH=~/.memo-keeper nohup ./mefs-keeper daemon start --api=/ip4/127.0.0.1/tcp/5001 --swarm-port=4001 --group=1 &> keeper.log 2>&1 &
mefs-keeper wallet -h

COMMANDS:
   new      create a new wallet address
   list     list all addrs
   default  print default wallet address
   export   export wallet secret key
   help, h  Shows a list of commands or help for one command
mefs-keeper wallet default
mefs-keeper wallet export wallet-address
mefs-keeper config -h

COMMANDS:
   set      Set config key
   get      Get config key
   help, h  Shows a list of commands or help for one command
mefs-keeper config set -h
--key value The key of the config entry (eg "api.address") 
--value value The value with which to set the config entry 
--help, -h show help (default: false)
mefs-keeper config set --key=contract.endPoint --value="https://testchain.metamemo.one:24180"
mefs-keeper config get -h
mefs-keeper config get --key=contract.endPoint
mefs-keeper bootstrap -h

COMMANDS:
   list     list bootstrap addresses
   add      add bootstrap addresses
   clear    remove all bootstrap addresses
   help, h  Shows a list of commands or help for one command
mefs-keeper bootstrap add "/ip4/103.xx.xx.xx/tcp/44006/p2p/12D3KooWQgakkyTFzcMh8JVbNK3FtiwJZz264sStq8QKBTeHwR3D"
./mefs-keeper net -h

COMMANDS:
   info      get net info
   connect   connet a peer
   peers     print peers
   findpeer  find peers
   declare   declare public network address
   help, h   Shows a list of commands or help for one command
mefs-keeper info -h

USAGE:
   mefs-keeper info command [command options] [arguments...]

COMMANDS:
   self     print node id
   help, h  Shows a list of commands or help for one command
mefs-keeper net info 

Network ID 12D3K..., IP [/ip4/172.xx.xx.xx/tcp/4001 /ip4/128.xx.xx.xx/tcp/39525 /ip4/10.xx.xx.xx/tcp/39525], Type: Private
mefs-keeper net info self

ID:  26 keeper 2
mefs-keeper net peers

12D3KooWHXmKSneyGqE8fPrTmNTBs2rR9pWTdNcgVG3Tt5htJef7 [/ip4/121.37.158.192/tcp/23456]
12D3KooWB5yMrUL6NG6wHrdR9V114mUDkpJ5Mp3c1sLPHwiFi6DN [/ip4/192.168.1.46/tcp/4201]
mefs-keeper net connect -h

USAGE:
   mefs-keeper net connect [command options] [peer multiaddr (/ip4/1.2.3.4/tcp/5678/p2p/12D...)]
./mefs-keeper net info
Network ID 12D3K..., IP [/ip4/1.2.3.4/tcp/5678/], Type: Private
/ip4/1.2.3.4/tcp/5678/p2p/12D3K...
mefs-keeper net findpeer -h

USAGE:
   mefs-keeper net findpeer [command options] [peerID (12D...)]
mefs-keeper net findpeer 12D3KooW...
./mefs-keeper net declare -h

NAME:
   mefs-keeper net declare - declare public network address

USAGE:
   mefs-keeper net declare [command options] [net address (/ip4/1.2.3.4/tcp/5678)]
mefs-provider state -h

COMMANDS:
   post      list post
   pay       list pay
   withdraw  provider income of storing data
   help, h   Shows a list of commands or help for one command
mefs-keeper role list
mefs-keeper info -h
​--update (default: false) 
--all value, -a value Display all info information of the node (default: "false") 
--help, -h View more help
mefs-keeper info
mefs-keeper info -all true
mefs-keeper settle -h

COMMANDS:
   setDesc               Set description for a node. Especially for keepers, if desc is set to 'cloud', they will be selected as dc in buckets preferentially.
   withdraw              withdraw memo from fs
   pledgeAdd             add pledge value
   pledgeGet             get pledge information
   pledgeWithdraw        move pledge value to fs, then call settle withdraw
   pledgeRewardWithdraw  move pledge reward value to fs, then call settle withdraw
   quitRole              change its state to inactive, this op is invocatable and daemon will fail at next start
   alterPayee            alter current payee to a new one, need to be comfirmed by new payee to finish.
   help, h               Shows a list of commands or help for one command
USAGE:
   mefs-keeper settle pledgeAdd [command options] [amount (Memo / NanoMemo / AttoMemo) required]
mefs-keeper settle pledgeAdd "1 Memo"
mefs-keeper settle pledgeGet
mefs-keeper settle pledgeWithdraw "0.5 Memo"
mefs-keeper settle pledgeRewardWithdraw "0.5 Memo"
mefs-keeper settle withdraw "0.5 Memo"
mefs-keeper settle quitRole --really-do-it
mefs-keeper version
mefs-keeper recover db -h
--path specifies the database path to repair --deType the type of repair data (meta or state)
mefs-keeper recover db --path=/root/.memo-keeper/state --dbType=state
mefs-keeper backup export -h

USAGE:
   mefs-keeper backup export [command options] [arguments...]

OPTIONS:
   --path value    path to store
   --dbType value  export dbtype: meta or state (default: "state")
   --help, -h      show help (default: false)
mefs-keeper backup export --path=./ --dbType=state
mefs-keeper backup import -h

USAGE:
   mefs-keeper backup import [command options] [arguments...]

OPTIONS:
   --path value    path of file import from
   --dbType value  export dbtype: meta or state (default: "state")
   --help, -h      show help (default: false)
mefs-keeper backup import --path=./state-xxxxxxxxx.db --dbType=state
mefs-keeper restrict -h

USAGE:
   mefs-keeper restrict command [command options] [arguments...]

COMMANDS:
   list     list all accepted keepers/keepers
   add      add node(s) to restrict list
   delete   remove node(s) from restrict list
   has      test whether node(s) in restrict list
   set      enable/disable restrict
   stat     restrict stat(enable/disable)
   help, h  Shows a list of commands or help for one command
mefs-keeper restrict list
mefs-keeper restrict add PID
mefs-keeper restrict delete PID
mefs-keeper restrict set --enable
mefs-keeper restrict set disable
mefs-keeper restrict stat
mefs-keeper auth info -h

USAGE:
   mefs-keeper restrict command [command options] [arguments...]

COMMANDS:
   list     list all accepted keepers/keepers
   add      add node(s) to restrict list
   delete   remove node(s) from restrict list
   has      test whether node(s) in restrict list
   set      enable/disable restrict
   stat     restrict stat(enable/disable)
   help, h  Shows a list of commands or help for one command
mefs-keeper log setLevel -h

NAME:
   mefs-keeper log setLevel - Set log level

USAGE:
   mefs-keeper log setLevel [command options] [level (debug/info/warn/error)]
mefs-keeper log setLevel debug