Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP-6188: Nonce Cap #6188

Merged
merged 9 commits into from
Jan 6, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions EIPS/eip-6188.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
eip: 6188
title: Nonce Cap
description: Caps the nonce at 2^64-2
author: Pandapip1 (@Pandapip1)
discussions-to: https://ethereum-magicians.org/t/eip-6190-functional-selfdestruct/12232
status: Draft
type: Standards Track
category: Core
created: 2022-12-20
requires: 2929
---

## Abstract

This EIP reserves a nonce for special contracts. It also caps the nonce at `2^64-2`.
Pandapip1 marked this conversation as resolved.
Show resolved Hide resolved

## Motivation

This EIP is not terribly useful on its own, as it adds additional computation without any useful side effects. However, it can be used by other EIPs.

## Specification

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

### `CREATE` and `CREATE2`
Pandapip1 marked this conversation as resolved.
Show resolved Hide resolved

If a nonce would be incremented to `2^64-1` by `CREATE` or `CREATE2`, it is instead set to `2^64-2`. `2^64-1` is reserved for alias or other special contracts.

## Rationale

Capping a nonce allows for contracts with special properties to be created, with their functionality based on their contract code. This EIP is not terribly useful on its own, but it can be used by other EIPs.
Pandapip1 marked this conversation as resolved.
Show resolved Hide resolved

## Backwards Compatibility

This EIP requires a protocol upgrade, since it modifies consensus rules. The further restriction of nonce should not have an effect on accounts, as reaching a nonce of `2^64-2` is unfeasible.

## Security Considerations

None.
Pandapip1 marked this conversation as resolved.
Show resolved Hide resolved

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).