Skip to main content

Peer Roles in Monolythium

Monolythium uses explicit peer roles that go beyond standard Cosmos SDK terminology. This document defines each role precisely to prevent operator confusion, configuration drift, and sync failures.

Overview

Different node types serve different purposes. Conflating them causes problems:

  • Using seed nodes for blocksync fails silently
  • Using pruned nodes for genesis sync causes replay divergence
  • Exposing validators to public networks creates attack surface

This guide explains what each role does and when to use it.


1. Seed Nodes

Seed nodes exist for peer discovery only. They do not serve blocks.

What seed_mode=true Does

When a CometBFT node runs with seed_mode=true:

  1. It accepts incoming connections
  2. It exchanges address book entries with the connecting peer
  3. It disconnects immediately after the exchange
  4. It never sends blocks, headers, or state data

What Seed Nodes Cannot Do

CapabilitySeed Node
Exchange peer addressesYes
Serve blocks for blocksyncNo
Serve state for statesyncNo
Maintain persistent connectionsNo
Help a node catch upNo

When to Use Seed Nodes

  • Initial peer discovery when joining a network
  • Finding peers when your address book is empty
  • DNS-based seed infrastructure for public networks

When NOT to Use Seed Nodes

  • Genesis sync: Seeds disconnect before sending any blocks
  • Catching up: Seeds cannot help you sync
  • Persistent connections: Seeds reject long-lived connections

Common Mistake

Operators often configure seeds expecting them to help with blocksync. This fails silently. The node connects, receives addresses, disconnects, and then must find actual peers to sync from.

If your node is stuck at height 0 with seeds configured, this is likely the cause.


2. Bootstrap Nodes

Bootstrap nodes are a Monolythium-specific concept. They do not exist in standard Cosmos SDK tooling.

Why Bootstrap Nodes Exist

Standard Cosmos SDK relies on PEX (peer exchange) to find sync sources. This creates problems:

  • PEX may return pruned nodes that cannot serve early blocks
  • PEX may return nodes with different genesis or app versions
  • Random peer selection introduces replay nondeterminism
  • Operators cannot guarantee deterministic sync paths

Bootstrap nodes solve this by providing known-good archive peers for initial sync.

Bootstrap Node Requirements

SettingValueReason
seed_modefalseMust maintain connections and serve blocks
pruningnothingMust have all blocks from height 1
earliest_block_height1Verified full archive
Connection typepersistent_peersEnsures stable sync source

How Bootstrap Sync Works

  1. New node starts with pex = false
  2. Node connects to bootstrap peers via persistent_peers
  3. Node syncs deterministically from height 1
  4. After sync completes, operator can enable PEX for ongoing operation

Why This Matters

Without bootstrap nodes, two operators joining the same network might:

  • Sync from different peer sets
  • Encounter different block ordering during replay
  • Produce different app hashes at the same height

Bootstrap nodes eliminate this class of failures.


3. Persistent Peers

The persistent_peers setting in config.toml enforces long-lived connections to specific peers.

Behavior

  • Node maintains connections to all listed peers
  • Reconnects automatically if disconnected
  • Does not remove these peers from the address book

Typical Uses

Use CaseConfiguration
Validator ↔ ValidatorPrivate persistent peering
Validator ↔ SentrySentry as sole persistent peer
Bootstrap syncBootstrap nodes as persistent peers
Cross-datacenterStable links between infrastructure

Important Limitation

Setting persistent_peers to point at seed_mode=true nodes is useless. The seed node will disconnect immediately regardless of persistence settings.


4. Validators

Validators are a consensus role, not a configuration flag.

What Validators Do

  • Participate in consensus
  • Propose blocks when selected
  • Sign pre-votes and pre-commits
  • Submit to slashing conditions

What Makes a Node a Validator

A node becomes a validator when:

  1. It has a registered validator key (priv_validator_key.json)
  2. The associated operator address has bonded stake
  3. The validator is in the active set

Validator Security Requirements

RequirementReason
No public RPCPrevents query DoS and tx injection
Sentry architectureHides validator IP from network
Private peering onlyNo random PEX connections
Firewall rulesOnly allow sentry IPs

What Validators Should NOT Do

  • Expose RPC endpoints publicly
  • Rely on PEX for peer discovery
  • Connect directly to seed nodes
  • Run without sentry protection in production

5. Archive Nodes

Archive refers to data retention, not network behavior.

What Archive Means

An archive node stores complete blockchain history:

  • All blocks from height 1
  • All state at every height (if pruning=nothing)
  • Full transaction index (if enabled)

Archive vs Other Roles

AspectArchive NodeSeed NodeValidator
Stores full historyYesIrrelevantOptional
Serves blocksyncYesNoYes
Signs blocksNoNoYes
seed_modefalsetruefalse

When You Need Archive

  • Running a bootstrap node
  • Providing blocksync to new nodes
  • Historical queries and indexing
  • Snapshot generation

Archive Does Not Mean

  • The node is a seed (archive nodes can serve blocks; seeds cannot)
  • The node is a validator (archive is about storage, not consensus)
  • The node must be public (archive nodes can be private)

6. Sentry Nodes

Sentry nodes protect validators from direct network exposure.

Architecture

Internet


┌─────────┐
│ Sentry │◄──── Public peers connect here
└────┬────┘

▼ (private network)
┌─────────┐
│Validator│◄──── Never exposed to public
└─────────┘

Sentry Configuration

SettingSentryValidator
pextruefalse
persistent_peersValidatorSentry only
Public IPYesNo
FirewallOpen P2PSentry IPs only

Why Sentries Matter

  • Validators are high-value targets
  • Direct exposure enables DoS attacks
  • IP disclosure enables targeted attacks
  • Sentries absorb network abuse

7. Why Monolythium Does This Differently

Standard Cosmos SDK tooling assumes operators understand these distinctions. In practice:

  • Documentation conflates seeds and persistent peers
  • No standard "bootstrap" concept exists
  • PEX is treated as sufficient for all sync scenarios
  • Operators learn through failure

Monolythium's Approach

ProblemStandard CosmosMonolythium
Genesis sync sourcePEX (random)Bootstrap nodes (deterministic)
Peer role confusionImplicitExplicit documentation
Config driftPossibleDetected via monoctl config doctor
Replay divergenceSilent failurePrevented by bootstrap sync

What This Prevents

  1. Silent replay failures: Random sync sources may have incompatible state
  2. Config drift: Wrong chain IDs or EVM chain IDs go undetected
  3. Operator confusion: Unclear why sync fails with seeds configured
  4. Nondeterminism: Different operators get different results

8. Summary Table

Roleseed_modeServes BlocksPersistentUsed for SyncSigns Blocks
SeedtrueNoNoNoNo
BootstrapfalseYesYesYesNo
ArchivefalseYesOptionalYesNo
ValidatorfalseYesYesNoYes
SentryfalseYesYesIndirectNo

Quick Reference

I want to...

GoalUse
Find peers when starting freshSeed nodes
Sync from genesis deterministicallyBootstrap nodes
Run a public RPC endpointArchive node (not seed)
Participate in consensusValidator behind sentries
Protect my validatorSentry architecture
Serve historical queriesArchive node

My node is stuck at height 0

  1. Check if you only have seeds configured (seeds don't serve blocks)
  2. Add bootstrap nodes as persistent_peers
  3. Set pex = false during initial sync
  4. Verify bootstrap nodes are archive nodes with earliest_block_height = 1