---
title: "EIP-3860 — Initcode Size Limit"
description: "EIP-3860 — Initcode Size Limit mapped to Neo N3."
---
# EIP-3860 — Initcode Size Limit
[Back to Protocol-Level EIPs](/standards-mirror/protocol-eips)
<StandardsMirror>
<StandardEntry
id="eip-3860"
title="EIP-3860 — Initcode Size Limit"
eip="3860"
status="Final"
neoMapping="NEF format limits"
category="Deployment"
parityLabel="Native"
parityClass="sm-pill-native"
>
<template #spec>
## EIP-3860: Limit and Meter Initcode
EIP-3860 (Shanghai) caps contract creation `initcode` at **49152 bytes** (`0xc000`)
and meters initcode execution by 2 gas per 32-byte word. Without this cap, a very
large initcode could consume excessive resources during contract deployment.
### Why It Was Needed
Pre-3860, an attacker could submit a transaction creating a contract with a 10MB
initcode, forcing every full node to process the entire blob just to determine
the deploy fails (or succeeds with absurd code). Cheap DoS surface.
### Neo Equivalent
The Neo NEF (Neo Executable Format) has explicit limits baked in:
- **Script size**: max 1 MB per contract (much higher than 48 KB but still bounded).
- **Manifest size**: max 64 KB.
- **Method count, parameter counts, etc.**: all bounded.
Contract deployment cost on Neo scales linearly with NEF size via the network fee
(byte-cost) plus a flat deployment cost from `ContractManagement.GetMinimumDeploymentFee()`.
::: tip Live on Neo TestNet
Both implementations are deployed on Neo N3 TestNet (network magic `894710606`).
| **Solidity** (`neo-solc`) | `0x5d95f5db9f06ee751778208c36c408a49968d728` | [`0xfe360560…230ca8`](https://dora.coz.io/transaction/neo3/testnet/0xfe360560225f6308357408bacfd276eec88179367131e0c5bfdc81e405230ca8) |
| **Neo C#** (`nccs`) | `0xb58a104cecaaa87e7c44915464f09b60e4768337` | [`0xe648287f…cbed74`](https://dora.coz.io/transaction/neo3/testnet/0xe648287f9c9409e8309209c8910916494a91a6e0eaa85794bf2d3348eecbed74) |
Checked-in snapshot: Solidity 1 / 1 assertions pass; Neo C# 1 / 1 assertions pass. This is a validation snapshot, not an all-green parity certification; see [TestNet Results](/standards-mirror/deployments/RESULTS) for failure details.
Source pairs: [`docs/standards-mirror/deployments/eip-3860/`](https://github.com/r3e-network/neo-devpack-solidity/tree/main/docs/standards-mirror/deployments/eip-3860).
:::
</template>
<template #solidity>
```
EIP-3860 effects on contract deployment:
if (initcodeSize > 49152) revert;
initcodeWords = (initcodeSize + 31) / 32;
initCodeCost = 2 * initcodeWords;
totalGasCost = baseDeployCost + initCodeCost + executionCost;
This was specifically about CREATE / CREATE2 transaction-level deploys.
```
</template>
<template #csharp>
```csharp
using Neo;
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Attributes;
using Neo.SmartContract.Framework.Native;
namespace R3E.Examples;
/// <summary>
/// Neo deployment fee model — informational. ContractManagement enforces:
///
/// - NEF.Script.Length <= 0x100000 (1 MB)
/// - Manifest serialised length <= 0xffff (64 KB)
/// - Manifest.Name length <= 32 chars
/// - Manifest.SupportedStandards count <= 8
/// - Manifest.Permissions count <= 16
/// - Manifest.Trusts count <= 16
/// - Manifest.Groups count <= 16
/// - Manifest.Abi.Methods count <= 1000
/// - Manifest.Abi.Events count <= 1000
///
/// Cost: minimumDeploymentFee + (NEF.Length + Manifest.Length) * StoragePrice
///
/// Querying the limits at runtime:
/// </summary>
[DisplayName("DeploymentLimits")]
public class DeploymentLimits : SmartContract
{
public static long MinimumDeploymentFee()
=> ContractManagement.GetMinimumDeploymentFee();
}
```
### What Goes Away
EIP-3860 was a retrofit because Ethereum had no original limit on initcode size.
NEF's structured format with explicit length-prefixed sections forces every limit
to be declared and enforced at parse time — a contract whose NEF would exceed the
limit can't even be serialised, let alone deployed.
</template>
</StandardEntry>
</StandardsMirror>