Stargaze
  • Welcome
    • Coming from Ethereum?
    • Coming from Solana?
    • Coming from Coinbase or other exchange?
    • Coming from MANTRA?
  • Introduction
    • What is Stargaze?
    • Meet the Team
  • Core Apps
    • Launchpad
      • Minters
      • Whitelists
      • Minter and Whitelist Fees
    • Marketplace
      • Governance Parameters
    • Names
    • Live Auctions
    • Infinity Swap
      • How it works
      • Price Mechanics
      • Swap
      • Why use Infinity Swap
      • Infinity Swap Fees
      • Examples
    • DAO DAO
    • StarDEX
      • Navigating StarDEX
      • Swapping Tokens
      • Providing Liquidity
      • Pool Analytics & Metrics
      • Managing and Removing Liquidity
  • Creators
    • Launching a Collection on Stargaze
    • Collection Guidelines
    • Content Guidelines
    • Featured Projects
  • Creator Tools
    • Stargaze Studio
      • Create an NFT Collection
        • Upload Assets and Metadata
        • Configure Collection and Minting Details
        • Creating a Standard Collection
          • Upload Assets and Metadata
          • Configure Collection and Minting Details: Standard Collection
          • Whitelist and Royalty Options
        • Creating an Open/Limited Edition Collection
          • Upload Assets and Metadata
          • Configure Collection and Minting Details: OE/LE
          • Whitelist and Royalty Options
        • Creating a 1/1 Collection
          • Upload Assets and Metadata
          • Configure Collection Details: 1/1 Collection
          • Whitelist and Royalty Options
          • Adding Additional Tokens to a 1/1 Collection
        • Creating a Burn to Mint Collection
          • Upload Assets and Metadata
          • Configure Collection and Minting Details: Standard Collection
          • Whitelist and Royalty Options
      • Interact with a Collection
        • Execute Messages
        • Query Data
    • Launching an NFT project via CLI
      • 1. Setup a basic project
        • 1a. Need help?
      • 2. Configure your project
      • 3. Add assets and metadata
        • Pinata Upload
      • 4. Instantiate minter contract on testnet
      • 5. Whitelist
      • 6. Mint from your contract
      • 7. Query contract
      • 8. Testing your contract on testnet
      • 9. Launching on mainnet
        • 9a. Launching on mainnet with Keplr (optional)
    • Create a Multisig Wallet
      • Create a Multisig using Keplr
      • Create a Multisig using DAO DAO
      • Create a Multisig using CLI
    • Stargaze Studio Fees
  • Developers
    • CosmWasm Contracts
      • Contract Code IDs
      • Deploy to Testnet
      • Deploy to Mainnet
    • Stargaze API
    • Indexers
      • Constellations
      • SubQuery
    • Token Factory
    • Minting and Trading Denoms
  • Tokenomics
    • STARS Token
    • Fair Burn
    • Real Yield
    • Governance
  • Nodes & Validators
    • Getting Setup
    • Running a Full Node
    • Setting up Cosmovisor
    • Running a Validator
    • Configuring StateSync
    • Running a Relayer
    • Foundation Delegation Program
  • Extras
    • FAQ
    • Stargaze Assets
    • Ranking and Algorithms
Powered by GitBook
On this page
  • Mainnet Setup and Tooling
  • Communication
  1. Nodes & Validators

Running a Validator

Getting a validator live is just the beginning

PreviousSetting up CosmovisorNextConfiguring StateSync

Last updated 1 year ago

Mainnet Setup and Tooling

Getting a Validator live is just the beginning. Running a Production Validator requires far more than the initial steps. Preparing your architecture for maximum uptime and redundancy falls outside the scope of this documentation, but a few of the bare-minimum requirements are:

  • How will you handle chain upgrades?

    • consider: Cosmovisor

  • How will you know your node is up?

    • consider: Monitoring and Alerts

  • How will you mitigate DDOS attacks?

    • consider: Sentry Nodes

  • How much storage will you need and how will you grow storage?

Answering these questions can be daunting, so there is some advice below.

Chain upgrades

In order to streamline chain upgrades and minimize downtime, you may want to set up to manage your node.

Backups

Backups of chain state are possible using the commands specified . If you are using a recent version of Cosmovisor, then the default configuration is that a state backup will be created before upgrades are applied. .

Taking backups of the .starsd/data folder is important for quick recovery if required

Alerting and Monitoring

Alerting and monitoring is desirable as well - you are encouraged to explore solutions and find one that works for your setup. Prometheus is available out-of-the box, and there are a variety of open-source tools. Recommended reading:

And for real-time alerting, consider:

Simple setup using Grafana Cloud

Using only the raw metrics endpoint provided by starsd you can get a working dashboard and alerting setup using Grafana Cloud. This means you don't have to run Grafana on the instance.

  1. First, in config.toml enable Prometheus. The default metrics port will be 26660

  2. Download Prometheus - this is needed to ship logs to Grafana Cloud.

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: cosmops
    static_configs:
    - targets: ['localhost:26660']
      labels:
        group: 'cosmops'

remote_write:
  - url: https://your-grafana-cloud-endpoint/api/prom/push
    basic_auth:
      username: ID_HERE
      password: "API KEY HERE"

3. Set up a service file, with sudo nano /etc/systemd/system/prometheus.service, replacing <your-user> and <prometheus-folder> with the location of Prometheus. This sets the Prometheus port to 6666

[Unit]
Description=prometheus
After=network-online.target

[Service]
User=<your-user>
ExecStart=/home/<your-user>/<prometheus-folder>/prometheus --config.file=/home/<your-user>/<prometheus-folder>/prometheus.yml --web.listen-address=:6666 --storage.tsdb.path=/home/<your-user>/<prometheus-folder>/data
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
/etc/systemd/system/prometheus.service

4. Enable and start the service.

sudo -S systemctl daemon-reload
sudo -S systemctl enable prometheus
sudo systemctl start prometheus

5. Import a dashboard to your Grafana. Search for 'Cosmos Validator' to find several options. You should see logs arriving in the dashboard after a couple of minutes.

For more info:

Avoiding DDOS attacks

Managing storage

If you are using a cloud services provider, you may want to mount $HOME on an externally mountable storage volume, as you may need to shuffle the data onto a larger storage device later. You can specify the home directory in most commands, or just use symlinks.

Disk space is likely to fill up, so having a plan for managing storage is key.

If you are running sentry nodes:

  • 512GB storage for the full node will give you a lot of runway

  • 256GB each for the sentries with pruning should be sufficient

Managing backups is outside the scope of this documentation, but several validators keep public snapshots and backups.

Ballpark costs

To give you an idea of cost, on AWS EBS (other cloud providers are available, or you can run your own hardware), with two backups a day, this runs to roughly:

  • $150 for 1TB

  • $35 for 200GB

  • Total cost: $220

What approach you take for this will depend on whether you are running on physical hardware co-located with you, running in a data centre, or running on virtualized hardware.

Communication

It's extremely important to be vigilant in the monitoring of both your node(s) as well as the Stargaze validator ecosystem:

  • Watch for new governance votes and VOTE appropriately for you and your delegations

Create a prometheus.yml file with your in the Prometheus folder. You can get these via the Grafana UI. Click 'details' on the Prometheus card:

If you are comfortable with server ops, you might want to build out a validator to protect against DDOS attacks.

The current best practice for running mainnet nodes is a Sentry Node Architecture. There are various approaches, as . Some validators advocate co-locating all three nodes in virtual partitions on a single box, using Docker or other virtualization tools. However, if in doubt, just run each node on a different server.

Bear in mind that Sentries can have pruning turned on, as outlined . It is desirable, but not essential, to have pruning disabled on the validator node itself.

Ensure you're alerted to all notifications on the #validator-announcements channel on the

cosmovisor
here
This can be turned off using environment flags
https://medium.com/solar-labs-team/cosmos-how-to-monitoring-your-validator-892a46298722
https://medium.com/simply-vc/cosmos-monitoring-and-alerting-for-validators-8e3f016c9567
https://chainflow.io/cosmos-validator-mission-control/
https://medium.com/cypher-core/cosmos-how-to-set-up-your-own-network-monitoring-dashboard-fe49c63a8271
https://github.com/blockpane/tenderduty
Grafana Cloud credentials
https://grafana.com/docs/grafana-cloud/quickstart/noagent_linuxnode/
https://forum.cosmos.network/t/monitoring-alerting-for-your-validator/446/28
Sentry Node Architecture
detailed here
here
Stargaze Discord Server