This article will introduce in detail the use of the command line function of the provider-Node of the MEMO system; the provider needs to download the binary and execute the program 'mefs-provider' to start a Memo provider-Node.
Usage
Use the following command to view all commands
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-provider
Introduction
The command is used to start and stop an provider-Node
Usage
Options
Example
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.
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
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
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 provider node to declare its own public network ip address; (only the provider node needs to use this command)
Usage
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 show 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.
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
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 providers 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.
Introduction
View current node version
Usage
Introduction
View order related information
Usage
Subcommands
Introductoion
List all users who has data stored in this provider.
Usage
Introductoion
List all order status with provider nodes
Usage
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
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
Introduction
The provider 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 provider node to whitelist
The parameter PID is the provider node ID to be added to the whitelist
Introduction
delete whitelist node
Example
Delete whitelist nodes
The parameter PID is the provider 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-provider restrict has PID The parameter PID is the provider 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
Introduction
Query the value of the token file of the node. The token file is located in the root directory of the node. Ordinary providers do not need to pay attention to this value.
Usage
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 providers 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 providers to use.
Subcommands
Usage
Example
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
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
Introduction
The command is used to start and stop an keeper-Node
Usage
Options
Example
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.
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
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
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
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.
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
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.
Introduction
View current node version
Usage
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
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
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
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
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
This article will introduce in detail the use of the command line function of the User-Node of the MEMO system; the user needs to download the binary and execute the program 'mefs-user' to start a Memo User-Node.
Usage
Use the following command to view all commands
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-user
Introduction
The command is used to start and stop an User-Node
Usage
Options
Example
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.
Introduction
View the bucket/object password for uploading. The enc mode is set when upload object. If enc mode is set to aes1, then bucket password is selected for uploading, on the other hand, if enc mode is set to aes2, then object password is selected for uploading. Right password should be used for downloading encrypted objects.
--enc: encrypt mode, aes1 for using bucket password, aes2 for using object password.
Note: If the password is set for a bucket, the objectID and StripeID should be set to 0. If the passwrod is set for an object, the stripeID should be set to 0.
Example
Check the aes1 mode uploading password.
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
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
Introduction
This command is used to start the gateway for an user node, and it can only be successfully accessed after the node synchronization is completed.
Usage
Subcommands
Introduction
starts the gateway
Usage
Options
Example
Introduction
stops the Gateway
Introduction
This command first registers a MEMO system account ID for the wallet address, then registers the wallet account as a specified role (User, Keeper, user), and finally adds the role to the specified group;
Note: daemon startDuring the start-up process of the User node call, the account id, registration role, and joining the group will be automatically generated according to the parameters specified;
Usage
Options
Example
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 user node to declare its own public network ip address; (only the user node needs to use this command)
Usage
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.
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
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 providers 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.
Introduction
View current node version
Usage
Introduction
View order related information
Usage
Subcommands
Introduction
List all task information
Usage
Introductoion
List all order statuses with provider nodes
Usage
Introduction
List all provider status information
Usage
Introduction
View the order information of the specified provider
Usage
Example
Introduction
View order details
Usage
Introduction
This command creates, uploads, downloads, and views a collection of containers and files for the user.
Usage
Subcommands
Introduction
This command creates buckets
Usage
Options
Example
Bucket name: test, storage policy: erasure code, number of data blocks: 10, number of check blocks 5
Introduction
This command is used to view the status of all buckets
Usage
Introduction
This command is used to view all the information of the specified bucket, the following is an example (test is the bucket name)
Usage
Introduction
This command specifies the file for upload
Usage
USAGE: mefs-user lfs putObject [command options] [arguments...]
OPTIONS: --bucket value, --bn value use bucket name --object value, --on value file name after upload --path value upload file path --etag value select verification method (default: md5) --enc value Select encryption method (default: aes) --help, -h View help
Introduction
This command is used to view the specified file status
Usage
Example
Introduction
Download the file to the specified path
Usage
Note
--etag option here can be substituted by cid or md5, all of them has the same meaning. If bucket password is used(aes1 is set when putObject), the value of --objectID is ommited.
--decrypt option is the bucket/object password set when putObject.
Example 1
Download an object without etag.
Example 2
Download an object with etag and password.
./mefs-user lfs getObject --md5 f1c9645dbc14efddc7d8a322685f26eb --userID 36 --bucketID 0 --objectID 1 --decrypt 09a74f0cd7ff9d098f1753a83ed523d0c16b79ca2ce9ca5b5459ffada7e2376c --path aa
Introduction
View all file information of a specified bucket
Usage
Example
Introductioin
delete specified file
Usage
Example
Introduction
Download objects using rpc
Usage
Example
Introduction
Display the storage information of the node
Introduction
View the bucket user list
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
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
Introduction
The user 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 user node to whitelist
The parameter PID is the user node ID to be added to the whitelist
Introduction
delete whitelist node
Example
Delete whitelist nodes
The parameter PID is the user 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-user restrict has PID The parameter PID is the user 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
Introduction
Query the value of the token file of the node. The token file is located in the root directory of the node. Ordinary users do not need to pay attention to this value.
Usage
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 users 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 users to use.
Subcommands
Usage
Example