|
| 1 | +--- |
| 2 | +sidebar_position: 4 |
| 3 | +toc_max_heading_level: 5 |
| 4 | +--- |
| 5 | + |
| 6 | +# Faucets (Limits) |
| 7 | + |
| 8 | +Starknet currently has a number of limits in place in order to keep the network stable and optimized for the best performance. |
| 9 | + |
| 10 | +Blockifier-related constants and limits are defined, for each Starknet version starting from v0.13.0, in a JSON file called ``` |
| 11 | +versioned_constants``` in this [directory](https://github.com/starkware-libs/sequencer/tree/main/crates/blockifier/resources) |
| 12 | + |
| 13 | +## Starknet’s current limits |
| 14 | + |
| 15 | +| Entity | Description | Sepolia | Mainnet | |
| 16 | +| --------------------------------- | --------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- | |
| 17 | +| **Block time** | The maximum amount of time within which a pending block is closed, if no other limit is met | `30 seconds` | `30 seconds` | |
| 18 | +| **Block limit (Cairo steps)** | The maximum number of Cairo steps that can be completed within each block to ensure block production times remain consistent and predictable | `40,000,000` | `40,000,000` | |
| 19 | +| **Block limit (gas)** | Certain Starknet operations, such as sending messages between L1 and L2, consume Ethereum gas. The current L1 state update mechanism involves an Ethereum transaction for each Starknet block.| `5,000,000` | `5,000,000` | |
| 20 | +| **Max transaction size (Cairo steps)**| The maximum number of computational steps, measured in Cairo steps, that a transaction can contain when processed on the Starknet network. This limit is important for ensuring the efficient execution of transactions and preventing potential congestion. | `10,000,000` | `10,000,000` | |
| 21 | +| **Max number of events per transaction** | The maximum number of events that a transaction can emit during its execution. | `1000` | `1000` | |
| 22 | +| **Max number of data felts per event** | The maximum number of felts that an event can contain in its `data` array. | `300` | `300` | |
| 23 | +| **Max number of key felts per event** | The maximum number of felts that an event can contain in its `keys` array. | `50` | `50` | |
| 24 | +| **Max Cairo steps for `validate`** | The maximum number of computational steps, measured in Cairo steps, for a `validate` function. | `1,000,000` | `1,000,000` | |
| 25 | +| **Max contract bytecode size (Number of felts in the program)** | The maximum size of the bytecode or program that a smart contract can have on Starknet.Bytecode is the low-level code that comprises smart contracts. Limiting this size helps manage the complexity of contracts and the overall efficiency of the network | `81,290` | `81,290` | |
| 26 | +| **Max contract class size** | The maximum size for a contract class within Starknet.Contract classes are a fundamental building block for smart contracts, and limiting their size can have implications for the network’s scalability and security. | `4,089,446 bytes` | `4,089,446 bytes` | |
| 27 | +| **IP address limits (read/write)** | In order to reduce network spam, Starknet limits the amount of contract reads and writes that a single IP address can make. | `200 per min per IP address` | `200 per min per IP address` | |
| 28 | +| **Signature length (felts)** | | `4,000` | `4,000` | |
| 29 | +| **Calldata length (felts)** | | `4,000` | `4,000` | |
0 commit comments