mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 04:15:54 +00:00
b3a788c7ce
The current EVM generates its own new contract addresses, and this is why there are separate `msg.contractAddress` and `msg.codeAddress` fields in the computation start message. In EVMC, account updates are only allowed on the host side, including contract generation, and the start message has one destination field, `msg.destination`. The EVM cannot select addresses, only use them. It's a sensible design. The difference makes the current EVM incompatible with EVMC and its message format, so this patch corrects the difference. It moves contract address generation to the host side. This simplifies the EVM and its API a little. (As an API change, this is incompatible with vm2, so it's guarded under `evmc_enabled` to allow vm2 to continue to build and run at this time. This is also why there are fewer deletions than would otherwise be expected.) Signed-off-by: Jamie Lokier <jamie@shareable.org>