ppd Command

'ppd'commands are used to operate PP(resource) node

Help

List ppd usage, available sub-commands and flags

 ./ppd -h
 
 OR 
 
 ./ppd --help

Response:

Usage:
  ppd [command]

Available Commands:
  config      create default configuration file
  help        Help about any command
  start       start the node
  terminal    open terminal attached to node demon
  version     get version of the build

Flags:
  -c, --config string   configuration file path  (default "./configs/config.yaml")
  -h, --help            help for ppd
  -r, --home string     path for the node (default "/mnt/hgfs/code/devnettesting/p2p/sds/target")

Config

Create default configuration file for a PP(resource) node

node folder is the folder that contains configs and accounts of the PP node. An PP node folder usually looks like

Response:

After the execution of this command, a configs/config.yaml file will be generated under the node folder.

The node folder looks like:

accounts contains important account info, such as wallet and P2P key files , and thus need to be kept secret.

configs includes all configurations for this PP node. User should modify the config.yaml file to accommodate different scenarios. Please pay more attention to the following configurations:

  • StratosChainUrl: you can configure it to your own stchaincli rest-server if you already run one with your stchaind node; for Stratos Testnet, this value should be set as "https://rest-test.thestratos.org".

  • SPList: for local running, it looks like

    for Stratos Testnet, set NetworkAddress as:

  • ChainId: Set this value as your own blockchain's chain-id; for the current Stratos Testnet, set it as stratos-testnet-3.

  • NetworkAddress: make sure to set the NetworkAddress to your public IP address and port. If your node is behind a router, you probably need to configure port forwarding on the router, like

peers the pp-list file lists all the PP nodes found in the network.

tmp stores stdout log. It is generated automatically during the node is running.

Start

Start a PP(resource) node without interactivity

Response:

Version

get the version of the build

Response:

Terminal

Start a PP(resource) node with interactivity

This command need to be executed in the PP node folder

Response:

AS shown above, a set of commands can be used to communicate with Stratos-chain, SP node as well as other peers under ppd terminal.

help

show all the commands

rp, registerpeer

register PP node to SP(meta, or indexing) node

wallets

acquire all wallets' address

activate

activate <amount> <fee> <gas>

send transaction to Stratos-chain to become an active PP node

prepay

prepay <amount> <fee> <gas>

prepay stos to get ozone, amount in ustos

startmining

start mining

put

put <filepath>

upload a file. It will consume ozone

list

query all files

list <filename>

query a specific uploaded file by filename

get

get <sdm://account/filehash|filename>

download a file. It will consume ozone

sharefile

sharefile <filehash> <expiry> <private>

share an uploaded file

allshare

list all shared files

getsharefile

getsharefile <sharelink> <password>

download a shared file, need to consume ozone

cancelshare

cancelshare <shareID>

cancel a shared file

delete

delete <filehash>

delete a file

monitor

show monitor

newwallet

newwallet <nodeName> <hdPath>

create new wallet, input password in prompt

login

login <>wallet-address>

unlock and log in wallet, input password in prompt

config

config <key> <value>

set config key value, separated by one space

Last updated