Skip to content

Commit

Permalink
EIP-1895: Improvements (ethereum#2153)
Browse files Browse the repository at this point in the history
* EIP-1895: Better constants and address range description

Address @Arachnid's comments about presenting constants and how an address value is limited.

* EIP-1985: Fix a typo

* EIP-1985: Use "instructions" instead of "opcodes"
  • Loading branch information
chfast authored and tkstanczak committed Nov 7, 2020
1 parent 11dd7ba commit 652df92
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions EIPS/eip-1985.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,24 @@ by eliminating unrealistic edge cases.
## Specification

If `block.number >= {FORK_BLOCK}`, the following value ranges are introduced.
They restrict the results (i.e. values pushed to the stack) of the opcodes listed below.
They restrict the results (i.e. values pushed to the stack) of the instructions listed below.

1. *gas*, *gas limit*, *block gas limit*
is a range between `0` and `9223372036854775807` (`2**63 - 1`).
It affects following the opcodes:
is a range between `0` and `0x7fffffffffffffff` (`2**63 - 1`, `9223372036854775807`).
It affects the following instructions:
- `GASLIMIT` (`0x45`),
- `GAS` (`0x5a`).

2. *block number*, *timestamp*
is a range between `0` and `9223372036854775807` (`2**63 - 1`).
It affects the following opcodes:
is a range between `0` and `0x7fffffffffffffff` (`2**63 - 1`, `9223372036854775807`).
It affects the following instructions:
- `TIMESTAMP` (`0x42`),
- `NUMBER` (`0x43`).

3. *account address*
is a range between `0` and `1461501637330902918203684832716283019655932542975` (`2**160 - 1`).
It affects the following opcodes:
is a range between `0` and `0xffffffffffffffffffffffffffffffffffffffff` (`2**160 - 1`, `1461501637330902918203684832716283019655932542975`)
i.e. the address occupies the 160 low bits of the 256-bit value and the remaining top 96 bits must be zeros.
It affects the following instructions:
- `ADDRESS` (`0x30`),
- `ORIGIN` (`0x32`),
- `CALLER` (`0x33`),
Expand All @@ -50,8 +51,8 @@ They restrict the results (i.e. values pushed to the stack) of the opcodes liste
- `CREATE2` (`0xf5`).

4. *buffer size*
is a range between `0` and `4294967295` (`2**32 - 1`).
It affects the following opcodes:
is a range between `0` and `0xffffffff` (`2**32 - 1`, `4294967295`).
It affects the following instructions:
- `CALLDATASIZE` (`0x36`),
- `CODESIZE` (`0x38`),
- `EXTCODESIZE` (`0x3b`),
Expand Down

0 comments on commit 652df92

Please sign in to comment.