Join Mainnet
Quickstart
Install aromd
Follow the installation prerequisites document to install the AROM Network Node binary aromd.
Configuration
Configure your node with a moniker
Download compressed genesis state
Put the
genesis.jsonfile in the corresponding location
Copy
Copy
aromd init chooseanicehandle --chain-id aromd_168-1wget https://github.com/ionicNetwork/mainnet/raw/main/genesis.arom_168-1.json.gzgzip -d genesis.ionic_168-1.json.gzmv genesis.ionic_168-1.json ~/.ionic/config/genesis.jsonStart AROM Network Node
Copy
Copy
aromd start --p2p.seeds [email protected]:26656 --x-crisis-skip-assert-invariantsTo save those seeds to your settings, put the comma-separated list format seeds in ~/.ionc/config/config.toml in the p2p section under seeds.
Manual Setup
These instructions are for setting up a brand new full node from scratch.
Ensure the latest arom version installed. First, initialize the node.
Copy
Copy
arom d init <your_custom_moniker> --chain-id arom _168-1Note Monikers can contain only ASCII characters. Using Unicode characters is not supported and renders your node unreachable.
By default, the init command creates your ~/.arom directory with subfolders config and data. In the config directory, the most important files for configuration are app.toml and config.toml.
You can edit the moniker in the ~/.arom /config/config.toml file:
Copy
Copy
# A custom human readable name for this nodemoniker = "<your_custom_moniker>"For optimized node performance, edit the ~/.arom /config/app.toml file to enable the anti-spam mechanism and reject incoming transactions with less than the minimum gas prices:
Copy
Copy
# This is a TOML config file.# For more information, see https://github.com/toml-lang/toml ##### main base config options ##### # The minimum gas prices a validator is willing to accept for processing a# transaction. A transaction's fees must meet the minimum of any denomination# specified in this config (for example, 10attoarom). minimum-gas-prices = "1000000000attoarom"Your full node has been initialized!
Genesis & Seeds
Copy the Genesis File
Fetch the mainnet's genesis.json file into aromd's config directory.
Copy
Copy
mkdir -p $HOME/.arom/configwget https://github.com/aromNetwork/mainnet/raw/main/genesis.ionic-1.json.gzgzip -d genesis.arom_168-1.json.gzmv genesis.arom_168-1.json $HOME/.arom/config/genesis.jsonIf you want to connect to the public testnet instead, click here
To verify the correctness of the configuration run:
Copy
Copy
aromd startAdd Seed Nodes
Your node needs to know how to find peers. You'll need to add healthy seed nodes to $HOME/.arom/config/config.toml. The launch(opens in a new tab) repo contains links to some seed nodes.
Run a Full Node
Start the full node with this command:
Copy
Copy
aromd startCheck that everything is running smoothly:
Copy
Copy
aromd statusView the status of the network with the arom Explorer(opens in a new tab).
Verify Mainnet
Help prevent a catastrophe by running invariants on each block on your full node. In essence, by running invariants, you ensure that the state of mainnet is the correct expected state. One vital invariant check is that no arom are being created or destroyed outside of the expected protocol, however, there are many other invariant checks each unique to their respective module. Because invariant checks are computationally expensive, they are not enabled by default. To run a node with these checks, start your node with the assert-invariants-blockly flag:
Copy
Copy
aromd start --assert-invariants-blocklyIf an invariant is broken on your node, your node will panic and prompt you to send a transaction which will halt mainnet. For example, the provided message may look like:
Copy
Copy
invariant broken: loose token invariance: pool.NotBondedTokens: 100 sum of account tokens: 101 CRITICAL please submit the following transaction: aromd tx crisis invariant-broken staking supplyWhen submitting an invariant-broken transaction, transaction fee tokens are not deducted as the blockchain will halt (invariant-broken transactions are free transactions).
Enable the REST API
By default, the REST API is disabled. To enable the REST API, edit the ~/.ionic/config/app.toml file, and set enable to true in the [api] section.
Copy
Copy
################################################################################## API Configuration ##################################################################################[api]# Enable defines if the API server should be enabled.enable = true# Swagger defines if swagger documentation should automatically be registered.swagger = false# Address defines the API server to listen on.address = "tcp://0.0.0.0:1317"Optionally, you can activate swagger by setting swagger to true or changing the port of the REST API in the parameter address. After restarting your application, you can access the REST API on YOURNODEIP:1317.
GRPC Configuration
By default, gRPC is enabled on port 9090. In the ~/.ionic/config/app.toml file, you can make changes in the gRPC section. To disable the gRPC endpoint, set enable to false. To change the port, use the address parameter.
Copy
Copy
################################################################################## gRPC Configuration ##################################################################################[grpc]# Enable defines if the gRPC server should be enabled.enable = true# Address defines the gRPC server address to bind to.address = "0.0.0.0:9090"Background Process
To run the node in a background process with automatic restarts, you can use a service manager like systemd. To set this up, run the following:
Copy
Copy
sudo tee /etc/systemd/system/ionicd.service > /dev/null <<EOF [Unit]Description=arom Network DaemonAfter=network-online.target [Service]User=$USERExecStart=$(which aromd) startRestart=alwaysRestartSec=3LimitNOFILE=4096 [Install]WantedBy=multi-user.targetEOFIf you're using Cosmovisor, you want to add
Copy
Copy
Environment="DAEMON_HOME=$HOME/.ionic"Environment="DAEMON_NAME=aromd"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"Environment="DAEMON_RESTART_AFTER_UPGRADE=true"after the LimitNOFILE line and replace $(which ionicd) with $(which cosmovisor).
Then setup the daemon
Copy
Copy
sudo -S systemctl daemon-reloadsudo -S systemctl enable ionicdWe can then start the process and confirm that it is running
Copy
Copy
sudo -S systemctl start aromd sudo service ionicd statusExport State
IONIC Network can dump the entire application state into a JSON file. This application state dump is useful for manual analysis and can also be used as the genesis file of a new network.
Export state with:
Copy
Copy
ionicd export > [filename].jsonYou can also export state from a particular height (at the end of processing the block of that height):
Copy
Copy
ionicd export --height [height] > [filename].jsonIf you plan to start a new network from the exported state, export with the --for-zero-height flag:
Copy
Copy
ionicd export --height [height] --for-zero-height > [filename].jsonPruning 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 ~/.ionic/config/app.toml file. 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 thepruning-keep-recent,pruning-keep-every, andpruning-intervalparameters.
By default, every node is in default mode which is the recommended setting for most environments. If you want to change your node pruning strategy, you must do so when the node is initialized. Passing a flag when starting ionic 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 ionic start.
Note: When you are pruning state you will not be able to query the heights that are not in your store.
Last updated