Skip to content

[Bug]: EstimateGasInternal is heavy and unnecessary #227

@yihuang

Description

@yihuang

Summary

CallEVMWithData calls EstimateGasInternal to estimate the gas in state machine execution, the estimate will execute the call multiple times just to estimate the gas needed, it's inefficient and there's no point to do that in state machine execution.

Problem Definition

EstimateGasInternal will execute the same call multiple times, may lead to ddos attack.

Proposed Feature

Remove EstimateGasInternal from the state machine execution.

  • To call EVM in begin/end blockers, use a static gas limit.
  • To call EVM in the context of an user transaction, apply the transaction remaining gas to the gas limit of the evm call.

Work Breakdown

#### Must have
- [ ] discuss proposal (if proposal rejected, close EPIC)
- [ ] create ADR (if ADR rejected, close EPIC)
- [ ] add sub-tasks needed to implement the proposed feature
#### Nice to have
- [ ] add sub-tasks that are nice to have for the proposed feature

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