haqqd is the all-in-one command-line interface. It supports wallet management, queries and transaction operations
# Pre-requisite Readings
# Build and Configuration
After you have obtained the latest
haqqd binary, run:
to execute cli commands.
Check the version you are running using
There is also a
--help command available
You can also enable auto-completion with the
haqqd completion command. For example, at the start of a bash session, run
. <(haqqd completion), and all
haqqd subcommands will be auto-completed.
# Config and data directory
By default, your config and data are stored in the folder located at the
To specify the
haqqd config and data storage directory; you can update it using the global flag
# Configuring the Node
The Cosmos SDK automatically generates two configuration files inside
config.toml: used to configure the Tendermint, learn more on Tendermint's documentation (opens new window),
app.toml: generated by the Cosmos SDK, and used to configure your app, such as state pruning strategies, telemetry, gRPC and REST servers configuration, state sync, JSON-RPC, etc.
Both files are heavily commented, please refer to them directly to tweak your node.
One example config to tweak is the
minimum-gas-prices field inside
app.toml, which defines the minimum amount the validator node is willing to accept for processing a transaction. It is an anti spam mechanism and it will reject incoming transactions with less than the minimum gas prices.
If it's empty, make sure to edit the field with some value, for example
10token, or else the node will halt on startup.
# Pruning of State
There are four strategies for pruning state. These strategies apply only to state and do not apply to block storage.
To set pruning, adjust the
pruning parameter in the
The following pruning state settings are available:
everything: Prune all saved states other than the current state.
nothing: Save all states and delete nothing.
default: Save the last 100 states and the state of every 10,000th block.
custom: Specify pruning settings with the
By default, every node is in
default mode which is the recommended setting for most environments.
If you would like to change your nodes pruning strategy then you must do so when the node is initialized. Passing a flag when starting
haqq will always override settings in the
app.toml file, if you would like to change your node to the
everything mode then you can pass the
---pruning everything flag when you call
IMPORTANT: When you are pruning state you will not be able to query the heights that are not in your store.
# Client configuration
We can view the default client config setting by using
haqqd config command:
We can make changes to the default settings upon our choices, so it allows users to set the configuration beforehand all at once, so it would be ready with the same config afterward.
For example, the chain identifier can be changed to
haqq_11235-1 from a blank name by using:
Other values can be changed in the same way.
Alternatively, we can directly make the changes to the config values in one place at client.toml. It is under the path of
.haqq/config/client.toml in the folder where we installed haqq:
After the necessary changes are made in the
client.toml, then save. For example, if we directly change the chain-id from
haqq_11235-1, and output to number, it would change instantly as shown below.
A list of commonly used flags of
haqqd is listed below:
| ||Full Chain ID||String||---|
| ||Directory for config and data||string|
| ||Select keyring's backend||os/file/test||os|
| ||Output format||string||"text"|
# Command list
A list of commonly used
haqqd commands. You can obtain the full list by using the
haqqd -h command.
| ||Keys management|
| ||Transactions subcommands|
| ||Query subcommands|
| ||Tendermint subcommands|
| ||Client configuration|
| ||Initialize full node|
| ||Run full node|
| ||Haqq version|