Skip to content

eth_estimateGas performance #15859

@ryanschneider

Description

@ryanschneider

System information

Geth version: 1.8.0-unstable-56152b31 (also 1.7.3-stable-4bb3c89d)
OS & Version: Windows/Linux/OSX
Commit hash : 56152b31ac251d1cc68fcddbdad159ba5234c415

Expected behaviour

eth_estimateGas is more or less as performant as eth_call.

Actual behaviour

eth_estimateGas takes seconds or minutes to run.

Steps to reproduce the behaviour

I don't have a sure fire repro but have seen it happen if you make the call just a couple seconds after starting geth, or sometimes it takes hours before it gets into this state.

However, during testing I noticed two things:

So, as a test I switched to rpc.LatestBlockNumber in ryanschneider@7df8498, and was unable to reproduce the issue after throwing a lot of test traffic at it.

I'd love to help track down the issue, but don't have clarity into why the binary search is used. Also my current theory is that there is contention on the pending block, does that sounds like a reasonable place to look?

Backtrace

I'll get a debug.stacks output from either 1.7.3 or master here the next time I see the issue.

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