mirror of https://github.com/status-im/EIPs.git
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:
parent
4ce895610c
commit
917dcdbb56
|
@ -55,6 +55,29 @@ We let a family of contracts to always have the same `version`. That
|
||||||
is, `CREATE` and `CREATE2` will always deploy contract that has the
|
is, `CREATE` and `CREATE2` will always deploy contract that has the
|
||||||
same `version` as the calling `address`.
|
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*.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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
|
### Validation
|
||||||
|
|
||||||
A new phrase, *validation* is added to contract deployment (by
|
A new phrase, *validation* is added to contract deployment (by
|
||||||
|
@ -79,7 +102,7 @@ version. A contract creation transaction is always executed in
|
||||||
run *validation* on the contract creation code. If it does not pass,
|
run *validation* on the contract creation code. If it does not pass,
|
||||||
return out-of-gas.
|
return out-of-gas.
|
||||||
|
|
||||||
#### Alternative Design for Contract Creation Transaction
|
#### Alternative Design
|
||||||
|
|
||||||
This provides an alternative design that allows contract to be created
|
This provides an alternative design that allows contract to be created
|
||||||
in multiple versions.
|
in multiple versions.
|
||||||
|
|
Loading…
Reference in New Issue