Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.
This repository was archived by the owner on May 1, 2026. It is now read-only.

Behaviour on a combined EVM+ewasm chain #153

Description

@axic

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions