For the complete documentation index, see llms.txt
Midnight Node overview
The Midnight Node provides the foundational infrastructure for operating on the Midnight Network. It implements core protocol logic, manages peer-to-peer networking, and supports decentralized operations through integration with the Cardano network as a Partner Chain.
Functions
The Midnight node is responsible for:
- Processing privacy-preserving smart contract transactions with zero-knowledge proofs
- Enforcing protocol rules and maintaining blockchain state integrity
- Enabling peer-to-peer (P2P) capabilities: node discovery, connection establishment, and block gossip
- Selecting block producers from two pools: permissioned candidates (Federated Node Operators, or FNOs, on Mainnet today) and registered Cardano stake pool operators (SPOs), once SPO registration opens
For how validators produce and finalize blocks, see consensus.
Who can produce blocks
Status as of November 2026:
- On Mainnet, only Federated Node Operators (FNOs) produce blocks. FNOs are a permissioned set of operators, and they don't need to stake NIGHT or ADA.
- On Preprod and Preview, block production is also permissioned.
- Registration for Cardano stake pool operators (SPOs) as Midnight block producers isn't open yet on any network. When registration opens, SPOs will need ADA stake.
- There is no public guide to running a block producer yet.
You don't need permission or stake to run a full node or an RPC node. These nodes follow the chain and serve queries, but they don't produce blocks.
The D parameter decides how many committee seats go to permissioned candidates and how many go to registered SPOs. On Mainnet, Preprod, and Preview, it currently gives registered SPOs no seats. To check it yourself, call the systemParameters_getDParameter method on a node you run, or on a public RPC endpoint from the environment reference (Preprod and Mainnet go through Blockfrost and need a project token):
curl -s -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"systemParameters_getDParameter","params":[]}' \
http://localhost:9944
The response includes numPermissionedCandidates and numRegisteredCandidates. A numRegisteredCandidates value of 0 means no registered SPOs produce blocks. This holds while the network has permissioned candidates, which Mainnet, Preprod, and Preview all have today.
Characteristics
- Built on Polkadot SDK (Substrate framework)
- Implements Partner Chain components for Cardano integration
- Acts as a Partner Chain node with cross-chain communication
- Requires persistent connection to Cardano via PostgreSQL database populated by Cardano-db-sync
Architecture
┌─────────────┐ ┌─────────────────┐ ┌──────────────┐
│ Cardano │ ───▶ │ Cardano Indexer │ ───▶ │ PostgreSQL │
│ Mainchain │ │ (db-sync) │ │ (cexplorer) │
└─────────────┘ └─────────────────┘ └──────────────┘
│ Observes mainchain state
│ Queries Cardano data
│ (cNIGHT, governance)
▼
┌────────────────────────────────────────────────────────────────────┐
│ Midnight Node │
├────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Runtime │ │
│ │ │ │
│ │ ┌────────────────────────────────────────────────────────┐ │ │
│ │ │ Pallets │ │ │
│ │ │ │ │ │
│ │ │ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │
│ │ │ │ Midnight │ │ Native │ │ Federated │ │ │ │
│ │ │ │ System │ │ Token │ │ Authority │ │ │ │
│ │ │ │ │ │ Observation │ │ │ │ │ │
│ │ │ └─────────────┘ └──────────────┘ └──────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │
│ │ │ │ Version │ │ Midnight │ │ Federated │ │ │ │
│ │ │ │ │ │ │ │ Authority │ │ │ │
│ │ │ │ │ │ │ │ Observation │ │ │ │
│ │ │ └─────────────┘ └──────────────┘ └──────────────┘ │ │ │
│ │ └────────────────────────────────────────────────────────┘ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Node Services │ │
│ │ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ RPC │ │Consensus │ │ Keystore │ │ Network │ │ │
│ │ │ Server │ │ AURA │ │ │ │ P2P │◀───│──│────▶ Other Midnight Nodes
│ │ │Port 9944 │ │ GRANDPA │ │ │ │Port 30333│ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │
│ └──────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────┘
│
│ WebSocket RPC
│ Port: 9944
▼
┌─────────────────────────────────────────────────────────┐
│ External Clients: DApps, Indexers, Block Explorers │
└─────────────────────────────────────────────────────────┘
Core parameters
| Parameter | Value |
|---|---|
| Block time | 6 seconds |
| Session length | 1200 slots (2 hours) |
| Epoch length | 300 blocks |
| Hash function | blake2_256 |
| Account type | sr25519 public key |
| P2P port | 30333 (default) |
| RPC port | 9944 (WebSocket, default) |
Consensus
- Validator set: permissioned only. For who produces blocks today, see who can produce blocks.
- The
Dparameter (pallet-system-parameters) controls the split between permissioned and registered validators.
Runtime pallets
Node 1.0.400 includes eight custom pallets that implement core blockchain functionality:
- pallet-midnight: Core ledger state and privacy-preserving transaction processing
- pallet-midnight-system: System-level administrative operations
- pallet-cnight-observation: Cardano bridge integration for cNIGHT token management and DUST generation
- pallet-federated-authority: Multi-collective governance requiring consensus from multiple bodies
- pallet-federated-authority-observation: Governance synchronization with Cardano Mainchain
- pallet-system-parameters: Manages governance-controlled network parameters
- pallet-throttle: Limits signed transaction throughput per governance member account
- pallet-version: Runtime version tracking and upgrade monitoring
The ledger 9 runtime on Mainnet, Preview, and Preprod (runtime 2.1.100, which node 2.1.101 runs) adds two pallets. For details, see Ledger 9 upgrade.
- pallet-c2m-bridge: Custom pallet for the Cardano-to-Midnight token bridge. It ships with node 2.1.101 but stays off until governance enables it, and its rollout will be announced separately. Don't treat bridging as available on Mainnet.
- SafeMode: Standard Substrate pallet (
pallet_safe_mode). It lets a permitted origin put the chain into safe mode for a limited number of blocks. While safe mode is on, the runtime dispatches only calls on its allow list.
Signature schemes
The Midnight Node uses different cryptographic schemes for various operations:
- ECDSA: Partner Chain consensus message signing and BEEFY aggregated proofs
- Ed25519: GRANDPA finality message signing
- Sr25519: AURA block authorship signing (based on Schnorrkel / Ristretto / x25519)
Node types
- Full node: Validates transactions and maintains current blockchain state
- Archive node: Stores complete blockchain history with all historical states
- Boot node: Provides initial connection points for nodes joining the network
- RPC node: Exposes HTTP/WebSocket APIs for external client interactions
Node tools
- Node toolkit: Command-line tool released with each node version, for inspecting blocks, reading ledger parameters, and sending test transactions