LogoLogo
REStakeMeet the teamBlock ExplorerHire Us
  • 🤐WhisperNode Public Guides
  • ⚛️Nodes -- Mainnet
    • Archway
      • Full Node Build
      • Setup Cosmovisor
      • Archway Resources
    • Chihuahua
      • Full Node Build
      • Setup Cosmovisor
      • Chihuahua Resources
    • AssetMantle
      • Full Node Build
      • Setup Cosmovisor
      • CLI Cheatsheet
    • Aura Network
      • Full Node Build
      • Setup Cosmovisor
      • Aura Network Resources
    • Axelar
      • Full Node Build
      • Setup Cosmovisor
      • Axelar Resources
    • Cheqd
      • Full Node Build
      • Setup Cosmovisor
      • Cheqd Resources
    • Comdex
      • Full Node Build
      • Setup Cosmovisor
      • Comdex Resources
    • Composable Finance
      • Full node build
      • Setup Cosmovisor
      • Composable Resources
    • CosmosHub
      • ICS-Provider -- [CosmosHub]
        • Full Node Build
        • Cosmovisor
      • ICS-Consumers
        • Neutron - Build a Node
      • Cosmos Resources
    • Dymension
      • Full Node Build
      • Setup Cosmovisor
      • Dymension Resources
    • Saga
      • Full Node Build
      • Setup Cosmovisor
      • Saga Resources
    • Empower
      • Full node build
      • Setup Cosmovisor
      • CLI Cheatsheet
      • Empower Resources
    • Gitopia
      • Full Node Build
      • Setup Cosmovisor
      • Gitopia Resources
    • Injective
      • Injective Resources
    • Juno
      • Full Node Build
      • Setup Cosmovisor
      • Juno Resources
    • Kujira
      • Full Node Build
      • Setup Cosmovisor
      • Oracle Price Feeder
      • Kujira Resources
    • Celestia
      • Full Node Build
      • Setup Cosmovisor
      • Celestia Resources
    • Migaloo
      • Full Node Build
      • Setup Cosmovisor
      • Migaloo Resources
    • Osmosis
      • Full Node Build
      • Setup Cosmovisor
      • Osmosis Resources
    • Passage
      • Full Node Build
      • Setup Cosmovisor
      • Passage Resources
    • Quasar Fi
      • Full node build
      • Setup Cosmovisor
      • Quasar Resources
    • Secret Network
      • Full Node Build
      • Setup Cosmovisor
      • Secret: State Sync
      • Secret Network Resources
    • Stargaze
      • Full node build
      • Setup Cosmovisor
      • Stargaze Resources
    • Stratos
      • Full Node Build
      • Setup Cosmovisor
      • Stratos Resources
  • 🧪Nodes -- Testnet
    • Archway - Constantine-3
      • Full Node Build
      • Setup Cosmovisor
      • Archway Resources
    • Babylon
      • Full Node Build
      • Setup Cosmovisor
      • Babylon Resources
    • Composable Finance - Banksy2
      • Full node build
      • Setup Cosmovisor
      • Composable Banksy2 Resources
    • Composable Finance - Banksy3
      • Full node build
      • Setup Cosmovisor
      • Composable Banksy3 Resources
    • Cooperative Denom
      • Full node build
      • Setup Cosmovisor
      • Cooperative Denom Resources
    • Cosmos
      • Full Node Build
      • Setup Cosmovisor
      • Cosmos Testnet Resources
    • Duality
      • Full Node Build
      • Setup Cosmovisor
      • Duality Testnet Resources
    • Dymension - Froopyland
      • Full node build
      • Setup Cosmovisor
      • CLI Cheatsheet
      • Dymension Resources
    • Seda
      • Full node build
      • Setup Cosmovisor
      • Seda Resources
    • Union | Testnet
      • Full node build
      • CLI Cheatsheet
      • Union Resources
    • Mantra Chain
      • Full node build
      • Setup Cosmovisor
      • CLI Cheatsheet
      • Mantra Chain Resources
    • dYdX Testnet
      • Full node build
      • Setup Cosmovisor
      • CLI Cheatsheet
      • Dymension Resources
    • Empower
      • Full node build
      • Setup Cosmovisor
      • CLI Cheatsheet
      • Empower Resources
    • Namada
      • Full node build
      • CLI Cheatsheet
      • Namada Resources
      • Tenderduty Setup
      • TMKMS Setup
      • Horcrux Setup
    • Penumbra
      • Full node build
      • CLI Cheatsheet
      • Namada Resources
      • Tenderduty Setup
      • TMKMS Setup
      • Horcrux Setup
    • BeraChain
      • Full node build
      • Setup Cosmovisor
      • Berachain Resources
      • CLI Cheatsheet
      • TMKMS Setup
      • Horcrux Setup
    • Neutron
      • Full Node Build
      • Setup Cosmovisor
      • Neutron Testnet Resources
    • Stride
      • Full Node Build
      • Setup Cosmovisor
      • Stride Testnet Resources
  • Reference
    • Team Validator Info
    • Chain Port Prefixes
Powered by GitBook
LogoLogo

Made with ❤️ by WhisperNode // © 2024.

On this page
  • Rationale
  • How to Use
  • Example Usage:
  • Supported Chains and Prefixes
  • JSON API

Was this helpful?

Edit on GitHub
Export as PDF
  1. Reference

Chain Port Prefixes

List of port prefixes for each Cosmos ecosystem chain, and instructions for changing them quickly.

PreviousTeam Validator Info

Last updated 1 year ago

Was this helpful?

Rationale

Node operators in the Cosmos ecosystem often wants to run multiple Cosmos SDK-based nodes on the sames server to save cost.

The Cosmos SDK init command will generate config.toml and app.toml for each node. Without revision, the ports in these files will conflict with each other if multiple nodes are ran on the same server.

This project is an attempt to standardize these ports while avoiding port conflict. While any random non-conflicting ports can do, a standardized port prefix system can make the port assignment more predictable. Moreover, if two node operators follow the same system, they can easily exchange deployment scripts without breaking codes.

How to Use

The best way to use the port prefix system is to use .

You can also change these 9 ports (5 in config.toml and 4 in app.toml) manually. See below.

config.toml:
  'laddr = "tcp://0.0.0.0:26656"': 'laddr = "tcp://0.0.0.0:{{ custom_port_prefix }}56"' # also use this port for external_address 
  'laddr = "tcp://127.0.0.1:26657"': 'laddr = "tcp://0.0.0.0:{{ custom_port_prefix }}57"''proxy_app = "tcp://127.0.0.1:26658"': 'proxy_app = "tcp://127.0.0.1:{{ custom_port_prefix }}58"''prometheus_listen_addr = ":26660"': 'prometheus_listen_addr = ":{{ custom_port_prefix }}61"''pprof_laddr = "localhost:6060"': 'pprof_laddr = "localhost:{{ custom_port_prefix }}60"'app.toml:
  'address = "tcp://0.0.0.0:1317"': 'address = "tcp://0.0.0.0:{{ custom_port_prefix }}17"''address = ":8080"': 'address = ":{{ custom_port_prefix }}80"''address = "0.0.0.0:9090"': 'address = "0.0.0.0:{{ custom_port_prefix }}90"''address = "0.0.0.0:9091"': 'address = "0.0.0.0:{{ custom_port_prefix }}91"'

Example Usage:

  • In your terminal, set the following environment variable:

export NODES_NUM=”0”
# where 0 is replaced by your chains port prefix

source ~/.zshrc
  • then, run the following sed commands to replace our ports in config.toml:

sed -i.bak -e "\
s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:$((NODES_NUM+0))58\"%; \
s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:$((NODES_NUM+0))57\"%; \
s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:$((NODES_NUM+0))60\"%; \
s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:$((NODES_NUM+0))56\"%; \
s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":$((NODES_NUM+0))60\"%" $HOME/.stchaind/config/config.toml
  • we'll repeat this for app.toml:

sed -i.bak -e "\
s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:$((NODES_NUM))17\"%; \
s%^address = \":8080\"%address = \":$((NODES_NUM))80\"%; \
s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:$((NODES_NUM))90\"%; \
s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:$((NODES_NUM))91\"%" $HOME/.stchaind/config/app.toml

Supported Chains and Prefixes

Note: Please do not use 266 as port prefix because this is the default Tendermint port prefix.

JSON API

Ansible deployment script
https://raw.githubusercontent.com/polkachu/cosmos-port-prefixes/main/networks.json