Disk Utilization FAQ
index_events = [] # Uncommented = index all events (default)
indexer = "null" # Disable indexing entirely
To limit indexing to specific events:
[tx_index]
indexer = "kv"
index_events = ["message.sender", "transfer.amount"]Growth Factors:
Number of indexed events and attributes
Frequency of those events
Typical Behavior:
Can rival
application.dbin sizeRedundant attributes (e.g., full addresses, denoms, etc.) multiply size
Mitigation:
Reduce
index_eventsAvoid emitting attributes that aren't needed off-chain
Set
indexer = "null"for non-querying archival nodes
📂 state.db — Purpose, Contents, Growth Factors, Mitigation
Purpose: Tracks block height → AppHash + validator sets
Contents:
App hashes for every block height
Validator sets and historical changes
Consensus parameters and their history
IAVL tree root hashes and metadata
Growth Factors:
Number of blocks (stores app hash per height)
Validator set churn (frequent changes create snapshots)
Consensus parameter changes (governance proposals)
IAVL tree node storage (each node = separate DB record)
Typical Behavior:
Full Nodes/Validators: Grows slowly, usually < 100MB with proper pruning
Archival Nodes: Multi-GB growth is normal and expected
⚠️ Warning: > 1GB for non-archival nodes indicates pruning issues
Common Issues Causing Large state.db:
For Non-Archival Nodes: Missing pruning configuration allowing indefinite retention
For All Node Types: Abnormally large ABCI responses (>10MB per block)
Excessive validator set changes storing complete metadata snapshots
IAVL tree inefficiencies with historical app hash storage
Mitigation:
Non-Archival Nodes: Enable pruning in
app.tomland setmin-retain-blocksArchival Nodes: Focus on optimizing event emissions and ABCI response sizes
Use
leveldb-inspectortool to identify large ABCI responsesConsider state sync recovery (non-archival nodes only)
Monitor for blocks with abnormally large ABCI responses
📂 application.db — Purpose, Contents, Growth Factors, Mitigation
Purpose: Stores the actual state of all SDK modules
Contents:
x/bank balances
x/staking delegations
Custom module state
Growth Factors:
Number of accounts, validators, contracts, etc.
Write volume to store
Typical Behavior:
Grows with app-level complexity
Compacted over time with IAVL pruning
Mitigation:
Enable pruning in
app.tomlPeriodic state sync or snapshots
📂 tx_index.db — Purpose & Notes
(Referenced earlier in the document — indexing behavior controlled via [tx_index] in config; disabling via indexer = "null" will reduce or eliminate this DB.)
🚨 Troubleshooting
When Database Sizes Indicate Problems — Normal ranges & warning signs
Normal database size ranges vary significantly by node type:
Full Nodes and Validators
application.db
Varies by chain activity
Growth matches network usage
blockstore.db
Linear with chain age (with pruning)
Sudden spikes indicate verbose events
tx_index.db
0 (if disabled) to large
Should be 0 if indexer = "null"
state.db
< 100MB even on large chains
> 1GB indicates pruning issues
Archival Nodes (Expected Larger Sizes)
application.db
Grows with chain activity
Same as other node types
blockstore.db
Linear growth, no pruning
Sudden spikes in block size
tx_index.db
Large (if indexing enabled)
Only if indexer should be disabled
state.db
Multi-GB growth over time
Individual blocks > 50MB
Investigating Large state.db — Causes & diagnostics
For Full Nodes/Validators (> 1GB) or Archival Nodes (individual blocks > 50MB):
Abnormally Large ABCI Responses (most common issue):
Individual blocks storing 10MB+ ABCI response data
Caused by excessive event emissions or verbose transaction logs
Check specific block heights with large responses
IAVL Tree Issues:
IAVL stores each tree node as separate database record
Historical app hashes retained indefinitely (normal for archival)
Potential state inconsistencies or corruption
Validator Set Churn:
Frequent validator changes create new validator set snapshots
Each change stores complete validator metadata (normal for archival)
Consensus Parameter Changes:
Governance proposals modifying consensus parameters
Historical parameter versions accumulate (normal for archival)
Incorrect Pruning Configuration (Full Nodes/Validators only):
No
min-retain-blocksconfigured on non-archival nodesPruning disabled when it should be enabled
Diagnostic Tools — LevelDB Inspector, IAVL analysis, Configuration review
The Pocket Network codebase includes specialized tools for database analysis.
LevelDB Inspector — Analyzes database contents and identifies space usage:
IAVL Tree Analysis — For investigating IAVL tree issues:
Configuration Review — Check your current settings:
Recovery Options for Oversized Databases
If databases have grown too large, consider these recovery methods.
Expandable: Snapshot-Based Recovery (Recommended)
Selectable: Selective Database Reset
Note: Avoid modifying links or query parameters — all links in this document remain unchanged.
Last updated
Was this helpful?
