Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
docs: add information about contract size pubdata limitations (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimazhornyk authored Apr 5, 2024
1 parent f2c8058 commit 5cd3632
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/build/developer-reference/contract-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Each zkEVM bytecode must adhere to the following format:
- Its length in words (32-byte chunks) should be odd. In other words, `bytecodeLength % 64 == 32`.
- It can not be longer than `2^16` 32-byte words, i.e. `2^21` bytes.

Note: the `2^21` is a VM limit, but the deployed bytecode has to be published to L1, which imposes a pubdata limit, which is normally smaller.
By default, for each batch, it's set to 100000 bytes for hyperchains using calldata DA, and 120000 per each EIP-4844 blob.

The 32-byte hash of the bytecode of a zkSync contract is calculated in the following way:

- The first 2 bytes denote the version of bytecode hash format and are currently equal to `[1,0]`.
Expand Down

0 comments on commit 5cd3632

Please sign in to comment.