---
eip: 2681
label: EIP-2681
title: Limit account nonce to 2^64-1
status: Final
type: Standards Track
category: Core
created: 2020-04-25
official: https://eips.ethereum.org/EIPS/eip-2681
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2681.md
canonical: https://eips.huatuo.xyz/eip-2681/
lang: en
tldr: Caps every account nonce at 2^64-1, retroactively from genesis, so clients, proofs and transaction formats can treat nonces as fixed 64-bit integers.
tags: [nonce, core, transactions, consensus]
---

# EIP-2681: Limit account nonce to 2^64-1

> Limit account nonce to be between 0 and 2^64-1.

**TL;DR:** Caps every account nonce at 2^64-1, retroactively from genesis, so clients, proofs and transaction formats can treat nonces as fixed 64-bit integers.

## What problem does it solve?

The Yellow Paper originally allowed an account nonce to be an arbitrarily large unsigned integer. In practice no account comes anywhere near even 64 bits, and clients like go-ethereum already stored it as a 64-bit number. But "arbitrary length" is awkward for state proofs and witnesses, for new transaction formats, and for client code that otherwise has to handle 256-bit nonces just in case.

EIP-2681 makes the practical limit official: a nonce is always between `0` and `2^64-1`.

## How it works

Two rules, applied **retroactively from genesis** (no fork block needed, because no existing account violates them):

1. A transaction whose nonce is `>= 2^64-1` is invalid. Equal-to is included because executing it would push the sender's nonce past the limit.
2. If `CREATE` or `CREATE2` runs from an account whose nonce is already `2^64-1`, it fails: `0` is pushed on the stack and no initcode gas is deducted.

Reaching the limit by sending transactions would cost at least `21000 × (2^64-1)` gas, so the cap is unreachable in practice. Older replay-protection tricks such as Morden's large starting nonce are no longer needed since [EIP-155](/eip-155/) introduced chain IDs.

## Sample code

Validation as a client might implement it:

```python
MAX_NONCE = 2**64 - 1

def validate_tx_nonce(tx, sender_account):
    if tx.nonce >= MAX_NONCE:
        raise InvalidTransaction("nonce too high (EIP-2681)")
    if tx.nonce != sender_account.nonce:
        raise InvalidTransaction("nonce mismatch")

def op_create(evm):
    if evm.current_account.nonce == MAX_NONCE:
        evm.stack.push(0)       # creation fails, no initcode executed
        return
    # ... normal CREATE logic
```

Fixed-size nonce in Solidity tooling (e.g. a struct mirroring account state):

```solidity
struct AccountState {
    uint64 nonce;      // fits by EIP-2681
    uint256 balance;
}
```

## Things to know

- Status is **Final**. Because it is retroactive and no account was affected, it did not need to be tied to a specific network upgrade.
- Nothing changes for normal users. The limit matters for client developers, proof systems and transaction-format designers.
- Later proposals rely on it: for example [EIP-7702](/eip-7702/) authorizations require the nonce to be below `2^64-1`.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-2681
