Skip to main content
For the complete documentation index, see llms.txt

Usage limits

Midnight Network includes two types of usage limits: block limits and transaction limits.

Block limits​

Midnight uses a multi-dimensional cost model rather than a single byte cap per block. The following table shows the dimensions and their limits:

DimensionLimit per blockDescription
block_usage (broadcast bytes)1,000,000 bytesBytes of transaction data included in the block
bytes_written (persistent writes)50,000 bytesNet bytes written to disk permanently
bytes_churned (temp writes)50,000,000 bytesBytes written temporarily or overwritten
Read time budget2 secondsI/O read cost across all txs in the block
Compute time budget2 secondsCompute cost across all txs in the block

Mainnet, Preprod, and Preview use the same block limits.

The Substrate layer also imposes an overall 1 MB block byte limit, with ~786 KB available for normal transactions (75% of 1 MB). Block time is 6 seconds.

The 75% share for normal transactions applies to every dimension in the table, not only to block bytes. A single transaction gets less than that. When the node sizes one transaction, it holds back 10% of the block for block initialization, so one transaction can use only about 65% of any one limit, such as bytes_written. If a contract deployment is too large for one transaction, deploy it in batches as described in the batched contract deploy runbook.

Transaction limits​

The maximum transaction size is 1 MiB (1,048,576 bytes). This is the serialized byte size of the entire transaction. It's enforced during well-formedness validation. Transactions exceeding it are rejected with MalformedTransaction::TransactionTooLarge.

info

Both the block and transaction limits are configurable ledger parameters and can be adjusted via governance.

Per account transaction limit​

There is also a per-account throttle of up to 10 MB of transaction data per day (across a rolling window of 14,400 blocks at 6s/block).