EIPs/EIPS/eip-2031.md
Pandapip1 9e393a79d9
Force usage of included LICENSE file (#5055)
* Include LICENCE in the Jekyll build

* Replace old licence link with new and improved licence link

* Add note to EIP-1 mandating the new link

* Maybe this fixes it?

* Rename LICENCE so that jekyll picks it up

* Add original LICENCE file back

* Delete the markdown file

* Add Jekyll header

Hopefully the tooling still detects it as CC0

* Remove Jekyll header

* Maybe this will trick Jekyll and satisfy github?

* Remove config changes

* Enable incremental build

* Will it work if I rename it?

* I'll just paste the content of the licence into the file...

* Perhaps this will work

* Replace the licence file

* Fix false positive

Co-authored-by: Micah Zoltu <micah@zoltu.net>

* Resolve feedback

* Perhaps this might work

* It didn't work

This reverts commit 55116e15168fb20ae57dea97388bb260c0941465.

* Will licencee still detect this correctly?

* Jekyll Preamble in licence file

* Include it?

* Licence -> License, get rid of CC0.md

* Force wording of copyright waiver

* Formatting consistent with the rest of the list

* Spelling

* Escape

* Task failed successfully

* Fix two more links

* Will this render it?

* Perhaps this will work too

* .md essential

* Fix the issues Micah noted

Co-authored-by: Micah Zoltu <micah@zoltu.net>
2022-05-06 00:29:09 -07:00

3.2 KiB

eip title author discussions-to status type category created requires
2031 State Rent B - Net transaction counter Alexey Akhunov (@AlexeyAkhunov) https://ethereum-magicians.org/t/eip-2031-net-transaction-counter-change-b-from-state-rent-v3-proposal/3283 Stagnant Standards Track Core 2019-05-15 2029

Simple Summary

Ethereum starts to track the number of transactions inside its state (for now, only number of transactions after this change is introduced, therefore it is called Net transaction count). It is done by incrementing a storage slot in the special contract, called State counter contract (EIP-2029).

Abstract

It is part of the State Rent roadmap. This particular change makes any Ethereum transaction increment the transaction counter, which is a special storage slot in the State counter contract. This counter will be used to populate the nonces of newly created non-contract accounts. This way of populating nonce ensures replay protection for accounts that were evicted and then brought back by sending ether to them.

Motivation

Ethereum currently does not have a special place in the state for tracking number of transactions.

Specification

A new field, with the location 0 (that means it resides in the storage slot 0 in the state counter contract, and can be read by calling that contract with argument being 32 zero bytes), is added to the state counter contract. It will eventually contain txCount, the total number of transactions processed up until that point. On an after block B, or after the deployment of the state counter contract (which comes first), the field txCount is incremented after each transaction. Updating txCount means updating the storage of state counter contract at the location 0. These changes are never reverted.

Rationale

Two main alternatives were proposed for the replay protection of the accounts that were evicted by subsequently brought back by sending ether to them:

  1. Temporal replay protection. The nonce of the new accounts (and those brought back) is still zero, but a new valid-until field is introduced, making transactions invalid for inclusion after the time specified in this field. This, however, has unwanted side effected related to the fact that account nonces are not only used for replay protection, but also for computing the addresses of the deployed contracts (except those created by CREATE2).
  2. Setting nonce of new accounts (and those brought back) to something depending on the current block number. This approach requires coming up with an arbitrary parameter, which is the maximum number of transaction in the block, so that the new nonces never clash with the existing nonces. This is mostly a concern for private networks at the moment, because they will potentially have significantly more transactions in a block.

Backwards Compatibility

This change is not backwards compatible and requires hard fork to be activated.

Test Cases

Tests cases will be generated out of a reference implementation.

Implementation

There will be proof of concept implementation to refine and clarify the specification.

Copyright and related rights waived via CC0.