EIP-1895: Improvements (#2153)

* 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"
This commit is contained in:
Paweł Bylica 2019-07-02 18:44:23 +02:00 committed by Alex Beregszaszi
parent fa8855c9fe
commit afdc22d975
1 changed files with 10 additions and 9 deletions

View File

@ -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`),
@ -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`),