Skip to content

Conversation

@sergerad
Copy link
Contributor

@sergerad sergerad commented Jul 8, 2024

The comments refer to the relevant arguments as gas limit

    /// Stateful precompile that is Arc over [`ContextStatefulPrecompile`] trait.
    /// It takes a reference to input, gas limit and Context.
    ContextStateful(ContextStatefulPrecompileArc<DB>),

but the source names the argument gas_price

pub trait ContextStatefulPrecompile<DB: Database>: Sync + Send {
    fn call(
        &self,
        bytes: &Bytes,
        gas_price: u64,

My understanding is that gas price is not relevant to precompiles in general, just gas limit. In which case the variable name gas_price is incorrect.

Thanks!

@rakita rakita changed the title Rename gas_price to gas_limit for precompile args chore: Rename gas_price to gas_limit for precompile args Jul 10, 2024
@rakita rakita merged commit ee50203 into bluealloy:main Jul 10, 2024
j75689 pushed a commit to j75689/revm that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants