stellar-core can be controlled via the following commands.
Common options can be placed at any place in the command line.
http-command llbut we need this form if you want to change the log level during test runs.
Command options can only by placed after command.
$ stellar-core convert-id SDQVDISRYN2JXBS7ICL7QJAEKB3HWBJFP2QECXG7GZICAHBK4UNJCWK2
$ stellar-core http-command info
.well-known/stellar-history.jsonfile in the archive root.
--c infofor an offline instance
base64). The private signing key is read from standard input, unless
/dev/tty. In either event, if the signing key appears to be coming from a terminal, stellar-core disables echo. Note that if you do not have a STELLAR_NETWORK_ID environment variable, then before this argument you must specify the --netid option. For example, the production stellar network is “
Public Global Stellar Network ; September 2015” while the test network is “
Test SDF Network ; September 2015”.
--all-versions: run with all possible protocol versions
--version <N>: run tests for protocol version N, can be specified multiple times (default latest)
--base-instance <N>: run tests with instance numbers offset by N, used to run tests in parallel
[tx]using protocol versions 9 and 10 and stop after the first failure:
stellar-core --test -a --version 9 --version 10 "[tx]"
By default stellar-core listens for connections from localhost on port 11626. You can send commands to stellar-core via a web browser, curl, or using the --c command line option (see above). Most commands return their results in JSON format.
bans List current active bans
checkdb Triggers the instance to perform a background check of the database’s state.
checkpoint Triggers the instance to write an immediate history checkpoint. And uploads it to the archive.
Triggers the instance to connect to peer NAME at port NNN.
Deletes the tracking cursor identified by
Drops peer identified by NODE_ID, when D is 1 the peer is also banned.
info Returns information about the server in JSON format (sync state, connected peers, etc).
Adjust the log level for partition P where P is one of Bucket, Database, Fs, Herder, History, Ledger, Overlay, Process, SCP, Tx (or all if no partition is specified). Level is one of FATAL, ERROR, WARNING, INFO, DEBUG, VERBOSE, TRACE.
logrotate Rotate log files.
Performs maintenance tasks on the instance.
queueperforms deletion of queue data. See
setcursorfor more information.
metrics Returns a snapshot of the metrics registry (for monitoring and debugging purpose).
Clear metrics for a specified domain. If no domain specified, clear all metrics (for testing purposes).
peers Returns the list of known peers in JSON format.
Returns information about the quorum for node NODE_ID (this node by default). NODE_ID is either a full key (
GABCD...), an alias (
$name) or an
abbreviated ID (
@GABCD). If compact is set, only returns a summary version.
Outputs unshortened public keys if fullkeys is set.
Sets or creates a cursor identified by
ID with value
N. ID is an
uppercase AlphaNum, N is an uint32 that represents the last ledger sequence
number that the instance ID processed. Cursors are used by dependent services
to tell stellar-core which data can be safely deleted by the instance. The
data is historical data stored in the SQL tables such as txhistory or
ledgerheaders. When all consumers processed the data for ledger sequence N
the data can be safely removed by the instance. The actual deletion is
performed by invoking the
maintenance endpoint or on startup. See also
Gets the cursor identified by
ID. If ID is not defined then all cursors
will be returned.
Returns a JSON object with the internal state of the SCP engine for the last n (default 2) ledgers. Outputs unshortened public keys if fullkeys is set.
Submit a transaction to the network. blob is a base64 encoded XDR serialized ‘TransactionEnvelope’, and it returns a JSON object with the following properties status:
1970-01-01T00:00:00Z. It is the time the upgrade will be scheduled for. If it is in the past, the upgrade will occur immediately.
Artificially generate load for testing; must be used with
ARTIFICIALLY_GENERATE_LOAD_FOR_TESTING set to true. Depending on the mode,
either creates new accounts or generates payments on accounts specified
(where number of accounts can be offset). Additionally, allows batching up to
100 account creations per transaction via ‘batchsize’.
manualclose If MANUAL_CLOSE is set to true in the .cfg file. This will cause the current ledger to close.
Returns basic information about the account identified by name. Note that N is a string used as seed, but “root” can be used as well to specify the root account used for the test instance.
Injects a payment transaction (or a create transaction if “create” is specified) from the account F to the account T, sending N XLM to the account. Note that F and T are seed strings but can also be specified as “root” as shorthand for the root account for the test instance.