The XDC client software runs as a containerized application in Docker. This ensures a standardized and efficient environment for running XDC nodes. Let's start by examining this client software.
To obtain a comprehensive list of available commands and options, we can use the following command with the XDC Client:
sudo docker exec -it mainnet_xinfinnetwork_1 XDC --help
By executing this command, we gain access to the XDC client within the Docker container named mainnet_xinfinnetwork_1. The inclusion of the --help flag prompts the client to display its usage information, presenting an extensive list of commands and their respective options. The first page of output is shown here:
From the output, we can observe that the appropriate formatting for commands and options within the XDC client's Docker container is as follows:
XDC [options] command [command options] [arguments...]
By adhering to this structure, we can pass commands and options to Docker when running within the container. Consequently, the appropriate command structure from our external command line also becomes clear:
sudo docker exec -it mainnet_xinfinnetwork_1 XDC [options] command [command options] [arguments...]
Now, let's proceed to explore each command and option individually, based on the output obtained when using the --help flag.
COMMANDS
account
Manage accounts, list all existing accounts, import a private key into a new account, create a new account or update an existing account.
It supports interactive mode, when you are prompted for password as well as non-interactive mode where passwords are supplied via a given password file. Non-interactive mode is only meant for scripted use on test networks or known safe environments.
Make sure you remember the password you gave when creating a new account (with either new or import). Without it you are not able to unlock your account.
Note that exporting your key in unencrypted format is NOT supported.
Keys are stored under /keystore.
It is safe to transfer the entire directory or the individual keys therein between XDC nodes by simply copying.
Make sure you backup your keys regularly.
USAGE:
XDC account command [command options] [arguments...]
account COMMANDS:
list [command options] [arguments...]
XDC account list
Print a short summary of all accounts
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
new [command options] [arguments...]
XDC account new
Creates a new account and prints the address.
The account is saved in encrypted format, you are prompted for a passphrase.
You must remember this passphrase to unlock your account in the future.
For non-interactive use the passphrase can be specified with the --password flag.
Note, this is meant to be used for testing only, it is a bad idea to save your password to file or expose in any other way.
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
ACCOUNT OPTIONS:
- --password value Password file to use for non-interactive password input
MISC OPTIONS:
- --lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength
update [command options] [arguments...]
XDC account update [options] <address>
Update an existing account.
The account is saved in the newest version in encrypted format, you are prompted for a passphrase to unlock the account and another to save the updated file.
This same command can therefore be used to migrate an account of a deprecated format to the newest format or change the password for an account.
For non-interactive use the passphrase can be specified with the --password flag.
Since only one password can be given, only format update can be performed, changing your password is only possible interactively.
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
MISC OPTIONS:
- --lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength
import [command options] [arguments...]
XDC account import [options] <keyfile>
Imports an unencrypted private key from and creates a new account. Prints the address.
The keyfile is assumed to contain an unencrypted private key in hexadecimal format.
The account is saved in encrypted format, you are prompted for a passphrase.
You must remember this passphrase to unlock your account in the future.
For non-interactive use the passphrase can be specified with the --password flag
Note: As you can directly copy your encrypted accounts to another XDC instance, this import mechanism is not needed when you transfer an account between nodes.
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
ACCOUNT OPTIONS:
- --password value Password file to use for non-interactive password input
MISC OPTIONS:
- --lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength
attach
The XDC console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API.
See https://github.com/XinFinOrg/XDPoSChain/wiki/JavaScript-Console.
This command allows to open a console on a running XDC node.
USAGE:
XDC attach [command options] [arguments...]
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
API AND CONSOLE OPTIONS:
- --jspath loadScript JavaScript root path for loadScript (default: ".")
- --exec value Execute JavaScript statement
- --preload value Comma separated list of JavaScript files to preload into the console
console
The XDC console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API.
See https://github.com/XinFinOrg/XDPoSChain/wiki/JavaScript-Console.
USAGE:
XDC console [command options] [arguments...]
XDPoSChain OPTIONS:
- --identity value Custom node name
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
- --syncmode "full" Blockchain sync mode ("fast", "full", or "light")
- --gcmode value Blockchain garbage collection mode ("full", "archive") (default: "full")
- --networkid value Network identifier (integer, 89=XDPoSChain) (default: 88)
- --ethstats value Reporting URL of a ethstats service (nodename:secret@host:port)
- --config value TOML configuration file
ACCOUNT OPTIONS:
- --unlock value Comma separated list of accounts to unlock
- --password value Password file to use for non-interactive password input
API AND CONSOLE OPTIONS:
- --rpccorsdomain value Comma separated list of domains from which to accept cross origin requests (browser enforced)
- --rpcvhosts value Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost")
- --rpc Enable the HTTP-RPC server
- --rpcaddr value HTTP-RPC server listening interface (default: "localhost")
- --rpcport value HTTP-RPC server listening port (default: 8545). See Appendix A at the base of this page for port clarification.
- --rpcapi value API's offered over the HTTP-RPC interface
- --ws Enable the WS-RPC server
- --wsaddr value WS-RPC server listening interface (default: "localhost")
- --wsport value WS-RPC server listening port (default: 8546). See Appendix A at the base of this page for port clarification.
- --wsapi value API's offered over the WS-RPC interface
- --wsorigins value Origins from which to accept websockets requests
- --ipcdisable Disable the IPC-RPC server
- --ipcpath Filename for IPC socket/pipe within the datadir (explicit paths escape it)
- --jspath loadScript JavaScript root path for loadScript (default: ".")
- --exec value Execute JavaScript statement
- --preload value Comma separated list of JavaScript files to preload into the console
NETWORKING OPTIONS:
- --bootnodes value Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
- --bootnodesv4 value Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
- --bootnodesv5 value Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
- --port value Network listening port (default: 30303)
- --maxpeers value Maximum number of network peers (network disabled if set to 0) (default: 25)
- --maxpendpeers value Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
- --nat value NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any")
- --nodiscover Disables the peer discovery mechanism (manual peer addition)
- --nodekey value P2P node key file
- --nodekeyhex value P2P node key as hex (for testing)
STAKER OPTIONS:
- --etherbase value Public address for block mining rewards (default = first account created) (default: "0")
- --gasprice "250000000" Minimal gas price to accept for mining a transactions
- --minerthreads value Number of CPU threads to use for staking (default: 8)
- --mine Enable staking
- --targetgaslimit value Target gas limit sets the artificial target gas floor for the blocks to mine (default: 84000000)
LOGGING AND DEBUGGING OPTIONS:
- --metrics Enable metrics collection and reporting
DEPRECATED OPTIONS:
- --fast Enable fast syncing through state downloads
- --light Enable light client mode
MISC OPTIONS:
- --XDCx Enable the XDCX protocol
- --XDCx.datadir "/root/.XDC/XDCx" Data directory for the XDCX databases
- --XDCx.dbengine value Database engine for XDCX (leveldb, mongodb) (default: "leveldb")
- --XDCx.dbConnectionUrl value ConnectionUrl to database if dbEngine is mongodb. Host:port. If there are multiple instances, separated by comma. Eg: localhost:27017,localhost:27018 (default: "localhost:27017")
- --XDCx.dbReplicaSetName value ReplicaSetName if Master-Slave is setup
- --XDCx.dbName value Database name for XDCX (default: "XDCdex")
- --txpool.nolocals Disables price exemptions for locally submitted transactions
- --txpool.journal value Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
- --txpool.rejournal value Time interval to regenerate the local transaction journal (default: 1h0m0s)
- --txpool.pricelimit value Minimum gas price limit to enforce for acceptance into the pool (default: 1)
- --txpool.pricebump value Price bump percentage to replace an already existing transaction (default: 10)
- --txpool.accountslots value Minimum number of executable transaction slots guaranteed per account (default: 16)
- --txpool.globalslots value Maximum number of executable transaction slots for all accounts (default: 4096)
- --txpool.accountqueue value Maximum number of non-executable transaction slots permitted per account (default: 64)
- --txpool.globalqueue value Maximum number of non-executable transaction slots for all accounts (default: 1024)
- --txpool.lifetime value Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
- --apothem XDC Apothem Network
- --enable-0x-prefix Address use 0x-prefix (default = false)
- --rewound value Rewound blocks (default: 0)
- --announce-txs Always commit transactions
- --store-reward Store reward to file
- --rollback value Rollback chain at hash
- --slave Enable slave mode
- --shh Enable Whisper
- --shh.maxmessagesize value Max message size accepted (default: 1048576)
- --shh.pow value Minimum POW accepted (default: 0.2)
dump
Dump a specific block from storage
The arguments are interpreted as block numbers or hashes.
Use "XDC dump 0" to dump the genesis block.
USAGE:
XDC dump [command options] [arguments...]
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
DEPRECATED OPTIONS:
- --light Enable light client mode
MISC OPTIONS:
- --cache value Megabytes of memory allocated to internal caching (default: 1024)
dumpconfig
The dumpconfig command shows configuration values.
USAGE:
XDC dumpconfig [command options] [arguments...]
XDPoSChain OPTIONS:
- --identity value Custom node name
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
- --syncmode "full" Blockchain sync mode ("fast", "full", or "light")
- --gcmode value Blockchain garbage collection mode ("full", "archive") (default: "full")
- --networkid value Network identifier (integer, 89=XDPoSChain) (default: 88)
- --ethstats value Reporting URL of a ethstats service (nodename:secret@host:port)
- --config value TOML configuration file
ACCOUNT OPTIONS:
- --unlock value Comma separated list of accounts to unlock
- --password value Password file to use for non-interactive password input
API AND CONSOLE OPTIONS:
- --rpccorsdomain value Comma separated list of domains from which to accept cross origin requests (browser enforced)
- --rpcvhosts value Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost")
- --rpc Enable the HTTP-RPC server
- --rpcaddr value HTTP-RPC server listening interface (default: "localhost")
- --rpcport value HTTP-RPC server listening port (default: 8545). See Appendix A at the base of this page for port clarification.
- --rpcapi value API's offered over the HTTP-RPC interface
- --ws Enable the WS-RPC server
- --wsaddr value WS-RPC server listening interface (default: "localhost")
- --wsport value WS-RPC server listening port (default: 8546). See Appendix A at the base of this page for port clarification.
- --wsapi value API's offered over the WS-RPC interface
- --wsorigins value Origins from which to accept websockets requests
- --ipcdisable Disable the IPC-RPC server
- --ipcpath Filename for IPC socket/pipe within the datadir (explicit paths escape it)
NETWORKING OPTIONS:
- --bootnodes value Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
- --bootnodesv4 value Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
- --bootnodesv5 value Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
- --port value Network listening port (default: 30303)
- --maxpeers value Maximum number of network peers (network disabled if set to 0) (default: 25)
- --maxpendpeers value Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
- --nat value NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any")
- --nodiscover Disables the peer discovery mechanism (manual peer addition)
- --nodekey value P2P node key file
- --nodekeyhex value P2P node key as hex (for testing)
STAKER OPTIONS:
- --etherbase value Public address for block mining rewards (default = first account created) (default: "0")
- --gasprice "250000000" Minimal gas price to accept for mining a transactions
- --minerthreads value Number of CPU threads to use for staking (default: 8)
- --mine Enable staking
- --targetgaslimit value Target gas limit sets the artificial target gas floor for the blocks to mine (default: 84000000)
LOGGING AND DEBUGGING OPTIONS:
- --metrics Enable metrics collection and reporting
DEPRECATED OPTIONS:
- --fast Enable fast syncing through state downloads
- --light Enable light client mode
MISC OPTIONS:
- --XDCx Enable the XDCX protocol
- --XDCx.datadir "/root/.XDC/XDCx" Data directory for the XDCX databases
- --XDCx.dbengine value Database engine for XDCX (leveldb, mongodb) (default: "leveldb")
- --XDCx.dbConnectionUrl value ConnectionUrl to database if dbEngine is mongodb. Host:port. If there are multiple instances, separated by comma. Eg: localhost:27017,localhost:27018 (default: "localhost:27017")
- --XDCx.dbReplicaSetName value ReplicaSetName if Master-Slave is setup
- --XDCx.dbName value Database name for XDCX (default: "XDCdex")
- --txpool.nolocals Disables price exemptions for locally submitted transactions
- --txpool.journal value Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
- --txpool.rejournal value Time interval to regenerate the local transaction journal (default: 1h0m0s)
- --txpool.pricelimit value Minimum gas price limit to enforce for acceptance into the pool (default: 1)
- --txpool.pricebump value Price bump percentage to replace an already existing transaction (default: 10)
- --txpool.accountslots value Minimum number of executable transaction slots guaranteed per account (default: 16)
- --txpool.globalslots value Maximum number of executable transaction slots for all accounts (default: 4096)
- --txpool.accountqueue value Maximum number of non-executable transaction slots permitted per account (default: 64)
- --txpool.globalqueue value Maximum number of non-executable transaction slots for all accounts (default: 1024)
- --txpool.lifetime value Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
- --apothem XDC Apothem Network
- --enable-0x-prefix Address use 0x-prefix (default = false)
- --rewound value Rewound blocks (default: 0)
- --announce-txs Always commit transactions
- --store-reward Store reward to file
- --rollback value Rollback chain at hash
- --slave Enable slave mode
- --shh Enable Whisper
- --shh.maxmessagesize value Max message size accepted (default: 1048576)
- --shh.pow value Minimum POW accepted (default: 0.2)
export
Export blockchain into file
Requires a first argument of the file to write to.
Optional second and third arguments control the first and last block to write. In this mode, the file will be appended if already existing.
USAGE:
XDC export [command options] [arguments...]
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
DEPRECATED OPTIONS:
- --light Enable light client mode
MISC OPTIONS:
- --cache value Megabytes of memory allocated to internal caching (default: 1024)
import
Import a blockchain file
The import command imports blocks from an RLP-encoded form. The form can be one file with several RLP-encoded blocks, or several files can be used.
If only one file is used, import error will result in failure. If several files are used, processing will proceed even if an individual RLP-file import failure occurs.
USAGE:
XDC import [command options] [arguments...]
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --gcmode value Blockchain garbage collection mode ("full", "archive") (default: "full")
DEPRECATED OPTIONS:
- --light Enable light client mode
MISC OPTIONS:
- --cache value Megabytes of memory allocated to internal caching (default: 1024)
- --cache.database value Percentage of cache memory allowance to use for database io (default: 75)
- --cache.gc value Percentage of cache memory allowance to use for trie pruning (default: 25)
init
Bootstrap and initialize a new genesis block
The init command initializes a new genesis block and definition for the network. This is a destructive action and changes the network in which you will be participating.
It expects the genesis file as argument.
USAGE:
XDC init [command options] [arguments...]
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
DEPRECATED OPTIONS:
- --light Enable light client mode
js
Execute the specified JavaScript files
The JavaScript VM exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/XinFinOrg/XDPoSChain/wiki/JavaScript-Console
USAGE:
XDC js [command options] [arguments...]
XDPoSChain OPTIONS:
- --identity value Custom node name
- --datadir "/root/.XDC" Data directory for the databases and keystore
- --keystore Directory for the keystore (default = inside the datadir)
- --syncmode "full" Blockchain sync mode ("fast", "full", or "light")
- --gcmode value Blockchain garbage collection mode ("full", "archive") (default: "full")
- --networkid value Network identifier (integer, 89=XDPoSChain) (default: 88)
- --ethstats value Reporting URL of a ethstats service (nodename:secret@host:port)
- --config value TOML configuration file
ACCOUNT OPTIONS:
- --unlock value Comma separated list of accounts to unlock
- --password value Password file to use for non-interactive password input
API AND CONSOLE OPTIONS:
- --rpccorsdomain value Comma separated list of domains from which to accept cross origin requests (browser enforced)
- --rpcvhosts value Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost")
- --jspath loadScript JavaScript root path for loadScript (default: ".")
- --exec value Execute JavaScript statement
- --preload value Comma separated list of JavaScript files to preload into the console
NETWORKING OPTIONS:
- --bootnodes value Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
- --bootnodesv4 value Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
- --bootnodesv5 value Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
- --port value Network listening port (default: 30303)
- --maxpeers value Maximum number of network peers (network disabled if set to 0) (default: 25)
- --maxpendpeers value Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
- --nat value NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any")
- --nodiscover Disables the peer discovery mechanism (manual peer addition)
- --nodekey value P2P node key file
- --nodekeyhex value P2P node key as hex (for testing)
STAKER OPTIONS:
- --etherbase value Public address for block mining rewards (default = first account created) (default: "0")
- --gasprice "250000000" Minimal gas price to accept for mining a transactions
- --minerthreads value Number of CPU threads to use for staking (default: 8)
- --mine Enable staking
- --targetgaslimit value Target gas limit sets the artificial target gas floor for the blocks to mine (default: 84000000)
LOGGING AND DEBUGGING OPTIONS:
- --metrics Enable metrics collection and reporting
DEPRECATED OPTIONS:
- --fast Enable fast syncing through state downloads
- --light Enable light client mode
MISC OPTIONS:
- --XDCx Enable the XDCX protocol
- --XDCx.datadir "/root/.XDC/XDCx" Data directory for the XDCX databases
- --XDCx.dbengine value Database engine for XDCX (leveldb, mongodb) (default: "leveldb")
- --XDCx.dbConnectionUrl value ConnectionUrl to database if dbEngine is mongodb. Host:port. If there are multiple instances, separated by comma. Eg: localhost:27017,localhost:27018 (default: "localhost:27017")
- --XDCx.dbReplicaSetName value ReplicaSetName if Master-Slave is setup
- --XDCx.dbName value Database name for XDCX (default: "XDCdex")
- --txpool.nolocals Disables price exemptions for locally submitted transactions
- --txpool.journal value Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
- --txpool.rejournal value Time interval to regenerate the local transaction journal (default: 1h0m0s)
- --txpool.pricelimit value Minimum gas price limit to enforce for acceptance into the pool (default: 1)
- --txpool.pricebump value Price bump percentage to replace an already existing transaction (default: 10)
- --txpool.accountslots value Minimum number of executable transaction slots guaranteed per account (default: 16)
- --txpool.globalslots value Maximum number of executable transaction slots for all accounts (default: 4096)
- --txpool.accountqueue value Maximum number of non-executable transaction slots permitted per account (default: 64)
- --txpool.globalqueue value Maximum number of non-executable transaction slots for all accounts (default: 1024)
- --txpool.lifetime value Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
- --apothem XDC Apothem Network
- --enable-0x-prefix Address use 0x-prefix (default = false)
- --rewound value Rewound blocks (default: 0)
- --announce-txs Always commit transactions
- --store-reward Store reward to file
- --rollback value Rollback chain at hash
- --slave Enable slave mode
removedb
Remove blockchain and state databases.
USAGE:
XDC removedb [command options] [arguments...]
XDPoSChain OPTIONS:
- --datadir "/root/.XDC" Data directory for the databases and keystore
DEPRECATED OPTIONS:
- --light Enable light client mode
version
Print version numbers.
The output of this command is supposed to be machine-readable.
USAGE:
XDC version [arguments...]
wallet
Manage XDPoSChain wallets.
This will prompt for your password and imports your XDC account. It can be used non-interactively with the --password option taking a passwordfile as argument containing the wallet password in plaintext.
USAGE:
XDC wallet command [command options] [arguments...]
COMMANDS (ACCOUNT COMMANDS):
- import Import XDPoSChain wallet
OPTIONS:
- --help, -h Show help
help, h
Shows a list of commands or help for one command.
USAGE:
XDC help [arguments...]
XDPoSChain OPTIONS
--config value
TOML configuration file
--datadir "/root/.XDC"
Data directory for the databases and keystore
--keystore
Directory for the keystore (default = inside the datadir)
--networkid value
Network identifier (integer, 89=XDPoSChain) (default: 88)
--syncmode "full"
Blockchain sync mode ("fast", "full", or "light")
--gcmode value
Blockchain garbage collection mode ("full", "archive") (default: "full")
--ethstats value
Reporting URL of a ethstats service (nodename:secret@host:port)
--identity value
Custom node name
ACCOUNT OPTIONS
--unlock value
Comma separated list of accounts to unlock
--password value
Password file to use for non-interactive password input
API AND CONSOLE OPTIONS
--rpc
Enable the HTTP-RPC server
--rpcaddr value
HTTP-RPC server listening interface (default: "localhost")
--rpcport value
HTTP-RPC server listening port (default: 8545). See Appendix A at the base of this page for port clarification.
--rpcapi value
API's offered over the HTTP-RPC interface
--ws
Enable the WS-RPC server
--wsaddr value
WS-RPC server listening interface (default: "localhost")
--wsport value
WS-RPC server listening port (default: 8546). See Appendix A at the base of this page for port clarification.
--wsapi value
API's offered over the WS-RPC interface
--wsorigins value
Origins from which to accept websockets requests
--ipcdisable
Disable the IPC-RPC server
--ipcpath
Filename for IPC socket/pipe within the datadir (explicit paths escape it)
--rpccorsdomain value
Comma separated list of domains from which to accept cross origin requests (browser enforced)
--rpcvhosts value
Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost")
--jspath loadScript
JavaScript root path for loadScript (default: ".")
--exec value
Execute JavaScript statement
--preload value
Comma separated list of JavaScript files to preload into the console
NETWORKING OPTIONS
--bootnodes value
Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
--bootnodesv4 value
Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
--bootnodesv5 value
Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
--port value
Network listening port (default: 30303)
--maxpeers value
Maximum number of network peers (network disabled if set to 0) (default: 25)
--maxpendpeers value
Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
--nat value
NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any")
--nodiscover
Disables the peer discovery mechanism (manual peer addition)
--nodekey value
P2P node key file
--nodekeyhex value
P2P node key as hex (for testing)
STAKER OPTIONS
--mine
Enable staking
--minerthreads value
Number of CPU threads to use for staking (default: 8)
--etherbase value
Public address for block mining rewards (default = first account created) (default: "0")
--targetgaslimit value
Target gas limit sets the artificial target gas floor for the blocks to mine (default: 84000000)
--gasprice "250000000"
Minimal gas price to accept for mining a transactions
--extradata value
Block extra data set by the miner (default = client version)
LOGGING AND DEBUGGING OPTIONS
--metrics
Enable metrics collection and reporting
--verbosity value
Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
--cpuprofile value
Write CPU profile to the given file
DEPRECATED OPTIONS
--fast
Enable fast syncing through state downloads
--light
Enable light client mode
MISC OPTIONS
--XDCx
Enable the XDCX protocol
--XDCx.datadir "/root/.XDC/XDCx"
Data directory for the XDCX databases
--XDCx.dbengine value
Database engine for XDCX (leveldb, mongodb) (default: "leveldb")
--XDCx.dbConnectionUrl value
ConnectionUrl to database if dbEngine is mongodb. Host:port. If there are multiple instances, separated by comma. Eg: localhost:27017,localhost:27018 (default: "localhost:27017")
--XDCx.dbReplicaSetName value
ReplicaSetName if Master-Slave is setup
--XDCx.dbName value
Database name for XDCX (default: "XDCdex")
--txpool.nolocals
Disables price exemptions for locally submitted transactions
--txpool.journal value
Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
--txpool.rejournal value
Time interval to regenerate the local transaction journal (default: 1h0m0s)
--txpool.pricelimit value
Minimum gas price limit to enforce for acceptance into the pool (default: 1)
--txpool.pricebump value
Price bump percentage to replace an already existing transaction (default: 10)
--txpool.accountslots value
Minimum number of executable transaction slots guaranteed per account (default: 16)
--txpool.globalslots value
Maximum number of executable transaction slots for all accounts (default: 4096)
--txpool.accountqueue value
Maximum number of non-executable transaction slots permitted per account (default: 64)
--txpool.globalqueue value
Maximum number of non-executable transaction slots for all accounts (default: 1024)
--txpool.lifetime value
Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
--apothem
XDC Apothem Network
--enable-0x-prefix
Address use 0x-prefix (default = false)
--rewound value
Rewound blocks (default: 0)
--announce-txs
Always commit transactions
--store-reward
Store reward to file
--rollback value
Rollback chain at hash
--slave
Enable slave mode
--shh
Enable Whisper
--shh.maxmessagesize value
Max message size accepted (default: 1048576)
--shh.pow value
Minimum POW accepted (default: 0.2)
--help, -h
show help
APPENDIX A - docker-compose.yml
The "docker-compose.yml" file (contents shown below) is a configuration file written in YAML (YAML Ain't Markup Language) format used by Docker Compose. It defines the services, containers, and their configurations for the Dockerized implementation of the XDC Mainnet Client.
Let's go through the contents of the file and their meanings:
version: "3.4": Specifies the version of the Docker Compose syntax being used.
services: Defines the list of services (containers) that will be created and managed by Docker Compose.
xinfinnetwork: The name of the service or container defined within the Docker Compose file.
image: xinfinorg/xinfinnetwork:v1.4.6: Specifies the Docker image to be used for the "xinfinnetwork" service. In this case, it is using the "xinfinorg/xinfinnetwork" image with version "v1.4.6". This image contains the XDC Mainnet Client software.
volumes: Defines the volumes to be mounted within the container, allowing data to be shared between the host machine and the container. The paths before the colon represent the files/directories on the host machine, while the paths after the colon represent the corresponding locations within the container.
restart: "always": Specifies that the container should always be restarted if it stops or crashes.
env_file: .env: Specifies an environment file (".env") that contains environment variables to be set within the container.
ports: Defines the port mappings between the host machine and the container.
"30303:30303": Maps port 30303 on the host machine to port 30303 within the container. This port is used for RLPx(TCP)/UDP peer-to-peer communications allowing node discovery and connection to peers.
"8989:8545": Maps port 8989 on the host machine to port 8545 within the container. This port is used for the HTTP JSON-RPC API.
"8888:8546": Maps port 8888 on the host machine to port 8546 within the container. This port is used for the Websocket-RPC interface.
In case of any technical queries on XDC Network, feel free to drop your queries on XDC.Dev forum.
Quick links:
XinFin.org
XDC Chain Network Tools and Documents
XDC Network Explorer
XDC Dev Forum
Beta — XDC Web Wallet
XDC faucet
XDC faucet - Blocksscan
XinFin — XDC Social Links:
Twitter
GitHub
Telegram
Facebook
LinkedIn
YouTube
Discussion (0)