Ana içeriğe geç

Node Types

Monolythium nodes can be configured with different pruning strategies depending on their purpose. The pruning setting determines how much historical state a node retains, which directly affects storage requirements, query capabilities, and suitability for different workloads.

Overview

TypePruning SettingStorageSync TimeUse Case
ArchivenothingGrows continuouslyLongest (full replay)Indexers, explorers, snapshots, historical queries
Full (Default)defaultStabilizes after initial growthModerateValidators, RPC endpoints, general operation
PrunedcustomMinimalFastestRelays, sentries, development
bilgi

Pruning controls state retention, not block storage. Even a pruned node stores block headers. The distinction is whether the node can answer queries about historical state at arbitrary heights.


Archive Nodes

Archive nodes retain all historical state from genesis. Every state transition at every block height is preserved, enabling queries against any point in the chain's history.

Configuration

In ~/.mono/config/app.toml:

pruning = "nothing"

Using Monarch CLI:

monarch join --network Testnet --archive --moniker my-archive-node

Using monod directly:

monod start --pruning nothing

When You Need an Archive Node

RequirementWhy Archive
Block explorer / MonoscanNeeds state at every height for address balances, contract state
Indexer serviceBackfill requires replaying historical state
Snapshot generationSnapshots must include complete state
Historical balance queriesOnly archive nodes can serve eth_getBalance at old block numbers
Contract state archaeologyDebugging requires inspecting past contract storage
Bootstrap nodeNew nodes syncing from genesis need a full-history peer

Storage Characteristics

Archive node storage grows continuously and never stabilizes. The growth rate depends on chain activity:

MetricEstimate
Growth rateVaries with transaction volume
Initial syncFull replay from genesis (longest)
Disk typeNVMe SSD strongly recommended
Filesystemext4 or xfs
Plan for Growth

Archive nodes require ongoing storage capacity planning. Monitor disk usage and plan for expansion. Running out of disk space on an archive node can corrupt the state database and require a full re-sync.

Testnet Reference

On the Monolythium testnet, seed2 operates as an archive node. This provides:

  • A known-good archive peer for bootstrap sync
  • Snapshot generation source
  • Historical query endpoint for development

Full Nodes (Default)

Full nodes use the default pruning strategy, keeping a window of recent state while discarding older state. This is the recommended configuration for most operators, including validators.

Configuration

In ~/.mono/config/app.toml:

pruning = "default"

Using Monarch CLI:

monarch join --network Testnet --moniker my-full-node

The default pruning strategy retains the most recent 362,880 states (approximately 25 days at ~1 second block times) and runs a pruning pass every 10 blocks.

When to Use a Full Node

RequirementWhy Full Node
Validator operationNeeds recent state for consensus, not full history
RPC endpoint (recent data)Can serve queries for recent blocks
General participationStandard network participant
Relay nodeAdequate for transaction relay

Storage Characteristics

Full node storage grows during initial sync but stabilizes once the pruning window is filled. Old state outside the window is garbage-collected.

MetricEstimate
Stable sizeFraction of archive node size
Initial syncFull replay, then pruning begins
Disk typeSSD recommended

Pruned Nodes

Custom-pruned nodes retain only a minimal window of recent state. This provides the smallest storage footprint at the cost of being unable to serve most historical queries.

Configuration

In ~/.mono/config/app.toml:

pruning = "custom"
pruning-keep-recent = "1000"
pruning-interval = "10"

Using monod directly:

monod start --pruning custom --pruning-keep-recent 1000 --pruning-interval 10

When to Use a Pruned Node

RequirementWhy Pruned
Sentry nodeRelays blocks and transactions, no queries needed
Development / testingFast sync, disposable state
Relay-only nodeForwards transactions, does not serve queries
Resource-constrained environmentsMinimal disk and memory footprint

Limitations

Pruned nodes cannot:

  • Serve eth_getBalance or eth_call at historical block heights
  • Support indexer backfill operations
  • Generate snapshots for other nodes
  • Act as bootstrap nodes for genesis sync
  • Answer Cosmos SDK queries for heights outside the retention window

Configuration Reference

All pruning parameters are set in ~/.mono/config/app.toml:

ParameterValuesDefaultDescription
pruningdefault, nothing, customdefaultPruning strategy
pruning-keep-recentInteger (states)362880Number of recent states to keep (only with custom)
pruning-intervalInteger (blocks)10How often the pruning routine runs (only with custom)
min-retain-blocksInteger (blocks)0Minimum block height offset to retain (0 = all blocks retained)

How the Parameters Interact

  • pruning = "nothing": Ignores pruning-keep-recent and pruning-interval. All state is kept.
  • pruning = "default": Uses built-in defaults (keep 362,880 recent states, prune every 10 blocks). The pruning-keep-recent and pruning-interval fields are ignored.
  • pruning = "custom": Uses the values you set for pruning-keep-recent and pruning-interval.
Pruning Interval

A lower pruning-interval means more frequent cleanup passes, which keeps disk usage tighter but adds minor I/O overhead. A higher interval reduces I/O at the cost of temporarily higher disk usage between passes. The default of 10 is a reasonable balance for most workloads.


Changing Pruning After Sync

Whether you can change pruning settings on an existing node depends on the direction of the change:

ChangePossible Without Re-sync?Notes
Archive to Full/PrunedYesOld state will be pruned on next interval. May take time.
Full to PrunedYesReduces retention window. State outside new window is pruned.
Pruned to FullYesOnly expands future retention. Past state is already gone.
Full/Pruned to ArchiveNoDiscarded state cannot be recovered. Must re-sync from genesis or restore from an archive snapshot.
Irreversible Data Loss

Once state is pruned, it cannot be recovered by changing configuration. If you need archive capabilities on a node that was previously pruned, you must re-sync from genesis using a bootstrap node or restore from an archive-mode snapshot.


Storage Estimates

Approximate storage requirements based on current chain activity. These numbers will grow as the network matures:

Node TypeTestnet (Estimate)Mainnet (Estimate)Growth
ArchiveLargestLargestContinuous
Full (Default)ModerateModerateStabilizes
Pruned (1000 states)SmallestSmallestStable (minimal)

Exact figures depend on transaction volume, contract deployments, and state complexity. Monitor your node's actual disk usage after initial sync to establish baselines for your workload.

Monitoring Disk Usage

# Check data directory size
du -sh ~/.mono/data/

# Check available disk space
df -h ~/.mono/

# Watch growth over time
watch -n 3600 du -sh ~/.mono/data/

Using Monarch CLI:

monarch status
# Includes disk usage in the status output

Monarch CLI

Monarch CLI simplifies node type selection during setup:

CommandNode Type
monarch join --network TestnetFull node (default pruning)
monarch join --network Testnet --archiveArchive node (pruning = "nothing")
monarch join --network Testnet --validatorFull node configured for validation

After initial setup, pruning can be adjusted by editing app.toml directly or using:

monarch config set pruning "custom"
monarch config set pruning-keep-recent "1000"
monarch config set pruning-interval "10"

Decision Guide

I want to...

GoalNode TypeWhy
Run a validatorFull (default)Validators need recent state, not full history
Run a public RPC endpointFull or ArchiveFull for recent queries, archive for historical
Run a block explorer backendArchiveExplorers query state at arbitrary heights
Run an indexerArchiveBackfill requires complete state history
Protect my validator (sentry)PrunedSentries relay traffic, no queries needed
Develop and test locallyPrunedFast sync, minimal resources
Generate snapshotsArchiveSnapshots capture full state
Relay transactions onlyPrunedMinimal footprint, no query serving