Automatically merged updates to draft EIP(s) 1702

Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing
This commit is contained in:
Wei Tang 2019-04-03 00:57:08 +02:00 committed by EIP Automerge Bot
parent 917dcdbb56
commit a44b8df456
1 changed files with 16 additions and 14 deletions

View File

@ -57,26 +57,28 @@ same `version` as the calling `address`.
#### Alternative Design
This provides an alternative design that allows `CREATE` and `CREATE2`
to deploy contract whose version are different compared with *parent*.
This provides an alternative design that allows `CREATE`, `CREATE2`
and contract creation transaction to deploy contract whose version are
different.
The client maintains a mapping `V` of currently supported version
prefix (for example, `\0asm`) to `version` number. All version
prefixes have the invariant that given any prefix in mapping `a` and
`b`, `a` is not `b`'s prefix.
`b`, `a` is not `b`'s prefix. Version numbers in `V` cannot be zero.
If the `version` of caller (determined by `I_a`) is zero, then
`CREATE` and `CREATE2` will always deploy contract with version zero.
Apply the following cause on contract deployment for all `CREATE`,
`CREATE2` and contract deployment transaction.
If the `version` of caller (determined by `I_a`) is not zero, do the
following checks and operations, and return out-of-gas if any of it
fails:
* Check that the code starts with an prefix in `V`, with `version`
number.
* Use `version`'s validation procedure to validate the *whole* code
(with prefix).
* Deploy the contract with `version`.
* If the `version` of caller (determined by `I_a`) is zero, then
`CREATE` and `CREATE2` will always deploy contract with version zero.
* If the `version` of caller (determined by `I_a`) is not zero, do the
following checks and operations, and return out-of-gas if any of it
fails:
* Check that the code starts with an prefix in `V`, with `version`
number.
* Use `version`'s validation procedure to validate the *whole* code
(with prefix).
* Deploy the contract with `version`.
### Validation