CLI arguments are everything that you pass after the
RSK start class.
The command-line arguments have two forms; the parameter and the flag
A list of command-line flags and parameters are available:
The following CLI flags determine which network the RSK node will connect to.
--main: Indicates that the configuration for the RSK Mainnet (public network) should be used.
--testnet: Indicates that the configuration for the RSK Testnet (public network) should be used.
--regtest: Indicates that the configuration for the RSK Regtest (localhost network) should be used.
java -cp rsk-core-<VERSION>.jar co.rsk.start --regtest
Only one of these three CLI flags should be specified.
When none of these are specified, RSK Mainnet is used by default.
The RSK node stores transactions, blocks, and other blockchain state on disk. This is known as the Blockchain Database.
--reset: Indicates that the block database should be erased, and should start from scratch, i.e. from genesis block. This is typically expected to be used when connecting to RSK Regtest, or in select debugging scenarios. It is also used when switching between different databases, e.g. between
--import: Indicates that the block database should be imported from an external source. This is typically expected to be used when connecting to RSK Testnet or RSK Mainnet, and when a reduction in “initial sync time” is desired. It is also used when switching between different databases, e.g. between
--verify-config: Indicates that the configuration file used by this run of the RSK node should be validated. By default this step is always performed.
--print-system-info: Indicates that the system information of the computer that the RSK node is running on should be output. By default, this is always output.
--skip-java-check: Indicates that the detection of the version of the Java Virtual Machine that the RSK node is running in is supported. By default, this check is always performed, to ensure that the RSK node is running in a compatible environment.
-base-path: Specifies the value of
database.dir, where the blockchain database is stored.
java -cp rsk-core-<VERSION>.jar co.rsk.start -base-path home/rsk/data
-rpccorsSpecifies the value of
rpc.providers.web.corsto control cors configuration
java -cp rsk-core-<VERSION>.jar co.rsk.start -rpccors *
Besides the parameters and flags, it’s also possible to configure the node over the CLI using the JVM parameters, which starts with the prefix
-D followed by the full path of the configuration like it is placed inside the configuration file.
java -cp rskj-core-<VERSION>.jar -Ddatabase.dir=/home/rsk/data co.rsk.Start
Most of the configurable options or settings for RSKj are available in “config”. See config reference for more details.
See the definition of the CLI flags in the RSKj codebase:
See the definition of the CLI parameters in the RSKj codebase:
Go to top