LogoLogo
WebsiteSpeedy StakingLinkedIn
  • Welcome
  • GOVERNANCE
    • Sustainability
      • Sustainability Report - 2024
      • Sustainability Report - 2023
    • Terms of Service (Staking)
    • Privacy Policy
  • Story
    • Cosmovisor guide - Odyssey
Powered by GitBook
LogoLogo

Company

  • About Us
  • Speedy Staking
  • Contact
  • Brand Assets

Services

  • White-Label Nodes
  • Testnet Consultancy
  • Technical Docs Support

© 2024 - Stake Solutions Inc.

On this page
  • Prerequisites
  • Setup Story - Geth
  • Execution Client Setup
  • Setup Story - Cosmos
  • Cosmovisor setup

Was this helpful?

  1. Story

Cosmovisor guide - Odyssey

PreviousPrivacy Policy

Last updated 4 months ago

Was this helpful?

Prerequisites

  • Create a user to run Story

  • Install go:

A validator node requires both Geth and Cosmos to run.

Setup Story - Geth

Ports for geth

Make sure your firewall (not part of this guide) is configured correctly

  • 30303 (TCP + API) - Used for p2p communication (MANDATORY)

  • 8545 - Required if you want your node to interface via JSON-RPC API over HTTP (Default closed, optional)

  • 8546 - Required for WebSocket interaction (Default closed, optional)

  • 8547 - Required for RPC with authentication (Default closed, optional)

Step 1: Give direct commands to copy for setting these variables; below example for temporary (until restart)

export STORY_DATA_ROOT="$HOME/.story/story"
export GETH_DATA_ROOT="$HOME/.story/geth"

Step 2: Create folders

mkdir -p "$STORY_DATA_ROOT"
mkdir -p "$GETH_DATA_ROOT"

Execution Client Setup

Step 3: Download the latest geth client release for your operating system

Step 4: Move your geth client to your local go library

mv <downloaded geth binary> <go binary location>/geth

Example with Go binary location at $HOME/go/bin and AMD64 architecture:

mv geth-linux-amd64 $HOME/go/bin/geth

Step 5: Set the geth binary to be allowed to execute

chmod +x <go binary location>/geth

Example:

chmod +x $HOME/go/bin/geth

Step 6: (run to test)

<go binary location>/geth --odyssey --syncmode full

Example:

$HOME/go/bin/geth --odyssey --syncmode full

You can continue with the next step if you see output like below.

Step 7: Create a systemd service for Geth

sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth Client
After=network.target

[Service]
User=$USER
ExecStart=<go binary location>/geth --odyssey --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Example:

sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth Client
After=network.target

[Service]
User=$USER
ExecStart=$HOME/go/bin/geth --odyssey --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Step 8: Start Story Geth with your systemd service

systemctl daemon-reload
systemctl enable story-geth
systemctl start story-geth

Setup Story - Cosmos

Ports for Cosmos

Make sure your firewall (not part of this guide) is configured correctly

  • 26656 - Used for peer-to-peer communication between nodes in the network (MANDATORY).

  • 26657 - Used for RPC. It allows querying the state, broadcasting transactions, and interacting with the node programmatically (Default closed, optional).

  • 26660 - Used for exposing Prometheus metrics for monitoring the Tendermint process (Default closed, optional).

Step 1: Download the newest story Cosmos binary for your architecture

Step 2: move the story cosmos binary to your binary location and make it executable

mv story-<your architecture> <go binary location>/story
chmod +x <go binary location>/story

Example:

mv story-linux-amd64 $HOME/go/bin/story
chmod +x $HOME/go/bin/story

Step 3: Initialise Story

moniker - The name of your validator

<go binary location>/story init --moniker <moniker name> --network odyssey

Example:

$HOME/go/bin/story init --moniker <moniker name> --network odyssey

Cosmovisor setup

Step 4: Install Cosmovisor

Minimum version 1.6

Follow the guide from the official documentation here:

Step 5: Set environment variables to initialise the chain using Cosmovisor

This sets the variables temporarily for one-time use

Default settings for Story with Cosmovisor are as follows:

export DAEMON_HOME=$HOME/.story/story
export DAEMON_NAME=story
export DAEMON_DATA_BACKUP_DIR=$HOME/.story/story_backup

Step 6: Create the backup folder location:

mkdir -p $DAEMON_DATA_BACKUP_DIR

Step 7: Initialise Cosmovisor

moniker - The name of your validator

network - The network you want to initialise the node on (in this case, odyssey)

cosmovisor init <go binary location>/story
$HOME/.story/story/cosmovisor/current/bin/story init --moniker "<moniker>" --network odyssey

Example:

cosmovisor init $HOME/go/bin/story
$HOME/.story/story/cosmovisor/current/bin/story init --moniker "<moniker>" --network odyssey

Step 8: Add story binary to the path to use story commands

export PATH="$PATH:~/.story/story/cosmovisor/current/bin" >> ~/.bashrc
source ~/.bashrc

Step 9: Download the Genesis file and Addressbook

wget -O $HOME/.story/story/config/addrbook.json https://server-3.itrocket.net/testnet/story/addrbook.json
wget -O $HOME/.story/story/config/genesis.json https://server-3.itrocket.net/testnet/story/genesis.json

Step 10: (Optional)

Configure Story by editing the following file with your required changes:

~/.story/story/config/config.toml

Step 11: Download the chain data

Follow the steps under Snapshot (pruned) OR find an alternative provider.

Step 12: Set version upgrade manually

cosmovisor add-upgrade v0.13.0 https://github.com/piplabs/story/releases/download/v0.13.0/story-linux-amd64 --force --upgrade-height 858000

Step 13: Create a systemd service

sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story node
After=network-online.target
[Service]
User=$USER
ExecStart=<go binary location>/cosmovisor run run
Restart=on-failure
RestartSec=3
LimitNOFILE=10000
Environment="DAEMON_NAME=story"
Environment="DAEMON_HOME=$HOME/.story/story"
Environment="DAEMON_DATA_BACKUP_DIR=$HOME/.story/story_backup"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF

Example:

sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story node
After=network-online.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/cosmovisor run run
Restart=on-failure
RestartSec=3
LimitNOFILE=10000
Environment="DAEMON_NAME=story"
Environment="DAEMON_HOME=$HOME/.story/story"
Environment="DAEMON_DATA_BACKUP_DIR=$HOME/.story/story_backup"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF

Step 14: Start Story with your systemd service

systemctl daemon-reload
systemctl start story

Step 15: Create your validator

Complete this step only when your node is fully synced; compare node height with chain height on an explorer.

stake - The amount of $IP you want to self-delegate (1000000000000000000 for 1 IP)

private-key - The private key of your validator, get it using:

story validator export --export-evm-key

moniker - The name of your validator

max-commission-change-rate - The maximum commission amount (in %) you can at a time

max-commission-rate - The maximum commission amount (in %) you can EVER set

commission-rate - The actual commission rate you will start with

story validator create --stake <amount> --private-key "<private-key>" --moniker "<Moniker>" --max-commission-change-rate <rate> --max-commission-rate <rate> --commission-rate <rate>
LogoDownload and install - The Go Programming Language
LogoReleases · piplabs/story-gethGitHub
LogoReleases · piplabs/storyGitHub
LogoCosmovisor | Explore the SDK
LogoStory - Services