Skip to content

Commit d890306

Browse files
authored
clarified max contract class size limit
1 parent b3569f5 commit d890306

File tree

1 file changed

+36
-26
lines changed

1 file changed

+36
-26
lines changed

components/Starknet/modules/resources/pages/chain-info.adoc

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,80 +31,90 @@ Starting from v0.13.0, blockifier-related constants and limits are defined for e
3131
Starting from v0.13.5, resources are denominated in units of L2 gas, L1 gas, and L1 data gas.
3232
====
3333

34-
[%autowidth.stretch]
34+
[cols="1,2,1,1"]
3535
|===
3636
| Entity | Description | Sepolia | Mainnet
3737

3838
| Block time
39-
| The maximum amount of time within which a pending block is closed, if no other limit is met.
39+
| The maximum amount of time within which a pending block is closed, if no other limit is met
4040
| 30 seconds
4141
| 30 seconds
4242

4343
| Max L2 gas per block
44-
| The maximum amount of L2 gas that a block can contain.
45-
within each block to ensure block production times remain consistent and predictable.
44+
a| The maximum amount of L2 gas that a block can contain
45+
[NOTE]
46+
====
47+
This limit ensures block production times remains consistent and predictable.
48+
====
4649
| 5 * 10^9^
4750
| 5 * 10^9^
4851

4952
| Max L2 gas per transaction
50-
| The maximum number of computational steps, measured in L2 gas, that a transaction can contain when processed on the Starknet network.
53+
a| The maximum number of computational steps, measured in L2 gas, that a transaction can contain when processed on the Starknet network
54+
[NOTE]
55+
====
5156
This limit is important for ensuring the efficient execution of transactions and preventing potential congestion.
57+
====
5258
| 10^9^
5359
| 10^9^
5460

5561
| Max state updates per transaction
56-
| The maximum number of storage updates that a single transaction can generate. This limit helps maintain network stability and predictable performance.
62+
a| The maximum number of storage updates that a single transaction can generate
63+
[NOTE]
64+
====
65+
This limit helps maintain network stability and predictable performance.
66+
====
5767
| 2,000
5868
| 2,000
5969

6070
| Max number of events per transaction
61-
| The maximum number of events that a transaction can emit during its execution.
71+
| The maximum number of events that a transaction can emit during its execution
6272
| 1,000
6373
| 1,000
6474

6575
| Max number of data felts per event
66-
| The maximum number of felts that an event can contain in its `data` array.
76+
| The maximum number of felts that an event can contain in its `data` array
6777
| 300
6878
| 300
6979

7080
| Max number of key felts per event
71-
| The maximum number of felts that an event can contain in its `keys` array.
81+
| The maximum number of felts that an event can contain in its `keys` array
7282
| 50
7383
| 50
7484

7585
| Max L2 gas for `validate`
76-
| The maximum number of computational steps, measured in Cairo steps, for a `validate` function.
86+
| The maximum number of computational steps, measured in Cairo steps, for a `validate` function
7787
| 10^8^
7888
| 10^8^
7989

80-
| Max contract bytecode size (felts)
81-
| The maximum size of the bytecode or program that a smart contract can have on Starknet.
90+
| Max contract bytecode size
91+
| The maximum size of the bytecode or program that a smart contract can have on Starknet
92+
| 81,920 felts
93+
| 81,920 felts
8294

83-
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.
84-
| 81,920
85-
| 81,920
8695
| Max contract class size
87-
| The maximum size for a contract class within Starknet.
88-
89-
Contract classes are a fundamental building block for smart contracts, and limiting their size can have implications for the network's scalability and security.
96+
a| The maximum size for the Sierra file of a contract class within Starknet
97+
[NOTE]
98+
====
99+
This limit is important for ensuring the network's scalability and security.
100+
====
90101
| 4,089,446 bytes
91102
| 4,089,446 bytes
92103

93104
| IP address limits
94-
| In order to reduce network spam, Starknet limits the amount of contract reads and writes that a single IP
95-
address can make.
105+
| The amount of contract reads and writes that a single IP address can make (in order to reduce network spam)
96106
| 200 per min per IP address
97107
| 200 per min per IP address
98108

99-
| Signature length (felts)
109+
| Signature length
100110
| The maximum length of a signature
101-
| 4,000
102-
| 4,000
111+
| 4,000 felts
112+
| 4,000 felts
103113

104-
| Calldata length (felts)
114+
| Calldata length
105115
| The maximum length of a transaction calldata
106-
| 5,000
107-
| 5,000
116+
| 5,000 felts
117+
| 5,000 felts
108118
|===
109119

110120

0 commit comments

Comments
 (0)