Skip to content

katana

Katana

Katana is a blazingly fast Starknet sequencer built for onchain game developers and appchain builders, focusing on rapid iteration and flexible deployment models.

Architecture Overview

Katana follows a modular, layered architecture with key components:

Backend: Manages block processing and sequencer state coordination.

Block Producer: Handles block creation with configurable mining strategies.

Executor Factory: Creates Cairo executors using Starknet's Blockifier.

Storage Provider: Abstracts database access using Merkle Patricia Tries via Bonsai.

Transaction Pool: Multi-stage validation pipeline from submission to block inclusion.

RPC Server: Provides standard Starknet APIs plus dev-specific endpoints.

Why Katana?

Developer-First: Tooling, flexible configuration, extensive APIs, and hot reloading.

State Forking: Fork existing networks at any block for testing against live contracts.

Multi-Settlement: Designed for Starknet settlement (L3 model) or sovereign operation.

Cairo Native: Optional ahead-of-time compilation for significant performance gains.

Getting Started

Quick Start

Start a local development sequencer with pre-funded accounts and instant mining:

katana --dev --dev.no-fee

This launches Katana in development mode with:

  • An RPC server at http://localhost:5050
  • 10 pre-funded accounts
  • Instant block mining
  • Gas fees disabled

Production Configuration

For production appchain deployments, use persistent storage and custom configuration:

katana --db-dir ./katana-db --config katana_prod.toml

Common production scenarios:

# Fork from Starknet mainnet at block 1000000
katana --fork.provider https://api.cartridge.gg/x/starknet/mainnet --fork.block 1000000
 
# Custom mining interval (every 10 seconds)
katana --block-time 10000 --db-dir ./katana-db

Installation

Katana can be installed via dojoup, our dedicated package manager:

curl -L https://install.dojoengine.org | bash
 
# Restart your terminal
 
dojoup install

Installing with asdf

If you prefer to install with the asdf version manager:

asdf plugin add katana https://github.com/dojoengine/asdf-katana.git
 
asdf install katana latest

Building from Source

If you prefer to build from source:

git clone https://github.com/dojoengine/katana
 
cargo install --path ./katana/bin/katana --locked --force

Next Steps