Skip to content

Make the Misc layer's fee estimate match its real element count #5686

Open

Description

@shumkov

Context

add_estimation_costs_for_total_system_credits_update_v0 estimates the Misc layer as ApproximateElements(1) with AllItems(1, 8). Misc holds more than that:

The estimate does not decide the fee a user pays. It decides admission: validate_fees_of_event prices address-funded transitions with apply = false, and execute_event charges the actual metered cost. A transition whose address inputs cover the estimate but not the actual cost fails at execution (CorruptedCodeExecution, then dropped from the block as an internal error). That makes the gap between estimate and actual cost a rejection window, not an underpricing. Adding E and T never changed this estimator.

Proposal

  • Add an estimator generation, selected by the next unreleased protocol version, whose Misc layer matches its real element count and sizes.
  • Test a paid address-funded transition, after the Misc items of that protocol version exist, whose inputs cover the estimate exactly.

Raised in the review of #5681: #5681 (comment)

Activity

  1. added this to the v5.1.0 milestone on Oct 30, 2026
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions