---
# System prepended metadata

title: Startup Scenarios

---

# Startup Scenarios


1. Clean start
    * Check that the database is empty/nonexistent.
    * Load a snapshot -> populate the ledger, solid entry points, genesis time, epoch commitments something, mana, validators.
    * Initialize protocol with chain ID from snapshot
    * Perform the heuristic to select the chain based on tips. 
    * Perform chain validation.
    * Warp sync.

    
2. Start after graceful shutdown
    * Check that the database is existing and read latest clean epoch
    * Load a snapshot + snapshot diffs to recover latest clean epoch state (root blocks, validators, mana, ledger). 
    * Initialize protocol with chain ID from snapshot
    * Perform the heuristic to select the chain based on tips. 
    * Perform chain validation.
    * Warp sync.

3. Start after non-graceful shutdown
    * Database is corrupted.
    * If the last clean epoch bucket is corrupted, then check previous ones?
    * Load a snapshot + snapshot diffs to recover latest clean epoch state (root blocks, validators, mana, ledger). 
    * Initialize protocol with chain ID from snapshot
    * Perform the heuristic to select the chain based on tips. 
    * Perform chain validation.
    * Warp sync.

## What to store
