Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

EVMC precompiles #259

@chfast

Description

@chfast

Implementation

The EVMC precompiles module has to implement EVMC VM API what boils down the execute() method.

In the execute() it receives the message with all the information needed to compute the result, which includes:

  • gas limit (the cost have to subtracted),
  • the address (to identify the precompile contract),
  • the input.
    Other fields are not relevant and can be ignored.
    The result is returned from the execute() function. The result includes:
  • status code (SUCCESS, OUT_OF_GAS, etc)
  • the output,
  • the amount of gas left.

The EVMC precompiles can ignore the Host interface (i.e. methods for state query and modification) entirely. This also means that Clients do not have to implement it if they only want to use EVMC precompiles. This should make EVMC integration easier.

Integration

Precompiles capability, Host driven

  1. Extend EVMC capabilities set with "precompiles".
  2. Assume EIP-1352 is ready.
  3. When a client is to execute a call within precomiles address range, it sends it to the "precompiles" VM.

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