Skip to content

eth_estimateGas uses global gas cap as the high watermwark #29695

Closed
@karalabe

Description

@karalabe

Tracker for #29509.

Gas estimation should cap itself to the block gas limit if none is given, currently it caps itself to the configured call gas cap. This is bad because it wastes estimation cycles.

Interestingly, the gas estimator itself works correctly, but is called bad (the gas is set before estimation to the global gas cap, so the poor estimator works with what it's given). The cause is a long stream of refactors and abstractions which gradually bubbles setting the gas value of a transaction in ToMessage, which sounds counterintuitive.

Fixing it is not super obvious, because changing ToMessage to not set the gas might have other implications. We should look through the call sites and see how to best fix without adding workarounds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions