Commands and Config Options
Last updated
Last updated
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:
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:
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:
Now, let's proceed to explore each command and option individually, based on the output obtained when using the --help flag.
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.
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)
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 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
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
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.
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
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.
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 a specific block from storage
The arguments are interpreted as block numbers or hashes. Use "XDC dump 0" to dump the genesis block.
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)
The dumpconfig command shows configuration values.
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 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.
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 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.
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)
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.
XDPoSChain OPTIONS:
--datadir "/root/.XDC" Data directory for the databases and keystore
DEPRECATED OPTIONS:
--light Enable light client mode
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
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
Remove blockchain and state databases.
XDPoSChain OPTIONS:
--datadir "/root/.XDC" Data directory for the databases and keystore
DEPRECATED OPTIONS:
--light Enable light client mode
Print version numbers.
The output of this command is supposed to be machine-readable.
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.
COMMANDS (ACCOUNT COMMANDS):
import Import XDPoSChain wallet
OPTIONS:
--help, -h Show help
Shows a list of commands or help for one command.
TOML configuration file
Data directory for the databases and keystore
Directory for the keystore (default = inside the datadir)
Network identifier (integer, 89=XDPoSChain) (default: 88)
Blockchain sync mode ("fast", "full", or "light")
Blockchain garbage collection mode ("full", "archive") (default: "full")
Reporting URL of a ethstats service (nodename:secret@host:port)
Custom node name
Comma separated list of accounts to unlock
Password file to use for non-interactive password input
Enable the HTTP-RPC server
HTTP-RPC server listening interface (default: "localhost")
HTTP-RPC server listening port (default: 8545). See Appendix A at the base of this page for port clarification.
API's offered over the HTTP-RPC interface
Enable the WS-RPC server
WS-RPC server listening interface (default: "localhost")
WS-RPC server listening port (default: 8546). See Appendix A at the base of this page for port clarification.
API's offered over the WS-RPC interface
Origins from which to accept websockets requests
Disable the IPC-RPC server
Filename for IPC socket/pipe within the datadir (explicit paths escape it)
Comma separated list of domains from which to accept cross origin requests (browser enforced)
Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost")
JavaScript root path for loadScript (default: ".")
Execute JavaScript statement
Comma separated list of JavaScript files to preload into the console
Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
Network listening port (default: 30303)
Maximum number of network peers (network disabled if set to 0) (default: 25)
Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any")
Disables the peer discovery mechanism (manual peer addition)
P2P node key file
P2P node key as hex (for testing)
Enable staking
Number of CPU threads to use for staking (default: 8)
Public address for block mining rewards (default = first account created) (default: "0")
Target gas limit sets the artificial target gas floor for the blocks to mine (default: 84000000)
Minimal gas price to accept for mining a transactions
Block extra data set by the miner (default = client version)
Enable metrics collection and reporting
Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
Write CPU profile to the given file
Enable fast syncing through state downloads
Enable light client mode
Enable the XDCX protocol
Data directory for the XDCX databases
Database engine for XDCX (leveldb, mongodb) (default: "leveldb")
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")
ReplicaSetName if Master-Slave is setup
Database name for XDCX (default: "XDCdex")
Disables price exemptions for locally submitted transactions
Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
Time interval to regenerate the local transaction journal (default: 1h0m0s)
Minimum gas price limit to enforce for acceptance into the pool (default: 1)
Price bump percentage to replace an already existing transaction (default: 10)
Minimum number of executable transaction slots guaranteed per account (default: 16)
Maximum number of executable transaction slots for all accounts (default: 4096)
Maximum number of non-executable transaction slots permitted per account (default: 64)
Maximum number of non-executable transaction slots for all accounts (default: 1024)
Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
XDC Apothem Network
Address use 0x-prefix (default = false)
Rewound blocks (default: 0)
Always commit transactions
Store reward to file
Rollback chain at hash
Enable slave mode
Enable Whisper
Max message size accepted (default: 1048576)
Minimum POW accepted (default: 0.2)
show help
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.