-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
This is a discussion we've had with @karalabe and @holiman.
Having a mixed chain has a lot of challenges, some of which include:
- What happens to wasm bytecode deployed on an EVM chain (which behaves as having "STOP" as its first instruction) after a hard fork enables ewasm. Suddenly the behaviour of the contract changes significantly. The bigger issue here is that it may contain code which would be rejected by ewasm validation, but it will never need to pass that validation.
- What happens to wasm bytecode deployed by EVM bytecode. It would not be validated and metered.
One possible solution to this we have discussed is to introduce a "code type" field in the account. If this field is missing it is considered to be 1 (evm). Ewasm would have a type of 2.
Contracts created by contracts always retain the code type, e.g. EVM contracts create EVM contracts, ewasm contracts create ewasm contracts.
This also simplifies the rules about selecting the execution engine in a transaction.
Metadata
Metadata
Assignees
Labels
No labels