Skip to content

FeeCalculator weight is not taken into account to the evm fee #1294

@dmoka

Description

@dmoka

Description

We are using this project in our parachain (HydraDX) and want to use a custom implementation for the FeeCalculator

/// Trait that outputs the current transaction gas price.
pub trait FeeCalculator {
	/// Return the minimal required gas price.
	fn min_gas_price() -> (U256, Weight);
}

As you see this calculator returns the min gas price and the weight needed to calculate the fee. But this fee then is never used in evm fee calculation in stack.rs

Steps to Reproduce

  1. Implement FeeCalculator to some dummy one where it returns a weight with a big number such as 20000000000000000
  2. Do an evm transaction and check the fee

Actual behaviour:

  • The fee is the same as with sending weight 0

Expected behaviour:

  • The fee becomes bigger

Environment

We use the following revision of the repo bf5885a982041cc744ecbb62a2afc13d56d464dc

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions