Skip to content

Rework the per-dispatch pre-charge algorithm in ethexe handle dispatch #5561

Description

@grishasobol

Problem

The pre-charge sequence in process_program_queue (ethexe/runtime/common/src/lib.rs) — charge_for_program, charge_for_code_metadata, charge_for_instrumented_code — is inherited from the Vara processor, which loads program + code data on every dispatch. In ethexe that data is not loaded per dispatch, so the charging is incorrect:

  • charge_for_instrumented_code(block_config, 0) is passed a hardcoded 0 length (placeholder);
  • gas is charged for loading data that ethexe does not load each dispatch.

Goal

Rework the pre-charge algorithm for ethexe's execution model so gas is charged correctly for what is actually loaded/executed per dispatch, rather than reusing Vara's per-dispatch data-loading charges.

Activity

  1. self-assigned this
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

scope: vara.ethVara Ethereum application layer (L2)type: fixBug fix correcting incorrect behavior

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions