Skip to main content

Run a local chain

Overview

This guide explains how to run a local chain for development and testing purposes. You'll initiate our just script that builds the chain binary and then creates, configures, and runs a new chain.

Prerequisites

Before you start, complete the following prerequisites:

tip

You can install just by using brew:

brew install just

Step 1. Clone the repository

Clone the Warden Protocol repository and navigate to the root directory:

git clone https://github.com/warden-protocol/wardenprotocol
cd wardenprotocol

Step 2. Execute the script

Then execute the just script:

just localnet

You'll see blocks being produced and the height incrementing.

Step 3. Verify initiation

  1. You should now be able to query the chain and access data from the genesis block. In a separate terminal window, run the following:

    wardend status
  2. To check the binary version, run this:

    wardend version
  3. You can also check your node's configuration in its home directory at $HOME/.warden:

    • config/genesis.json: The genesis file. Here you'll find two validator addresses, a Keychain, a Space, and other initial node settings (see accounts, keychains, spaces, etc.).
    • config/app.toml: The application configuration file. Here you can adjust validator settings and other parameters.
tip

The local chain will have the following default settings:

  • The default key (genesis account) name: shulgin
  • The chain ID: warden_1337-1

Step 4. Stop and restart

To stop the node, press Ctrl + C.

To restart from block 0, run this command:

wardend start

Alternatively you can do this:

  • Reset the node home directory and start the chain from scratch.
    just localnet
  • Delete all local chain data but keep config.toml, app.toml, and keys.
    wardend comet unsafe-reset-all
    wardend start

Next steps