Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subgraph: gasUsed for winningTicketRedeemds is the gas limit on the tx and not the actual gas used #27

Open
yondonfu opened this issue Aug 13, 2020 · 3 comments
Assignees
Labels
area: subgraph type: bug Something isn't working

Comments

@yondonfu
Copy link
Member

Describe the bug (required)
A clear and concise description of what the bug is.

I entered the following query at https://thegraph.com/explorer/subgraph/livepeer/livepeer:

{
  winningTicketRedeemeds(first :5, orderBy: blockNumber, orderDirection: desc) {
    gasUsed
  }
}

and I noticed that for tx 0xd05bf9676006101c15249494d5a1c83a16d3e8751ae589291d64cdd370b36314 the gasUsed field is 261183, but the gas used shown on the Etherscan page is 257657. 261183 is actually the gas limit of the tx and not the gas used by the tx.

Expected behavior (required)
A clear and concise description of what you expected to happen.

The gasUsed field should represent the gas used by a tx and not the gas limit of the tx.

@yondonfu yondonfu added type: bug Something isn't working area: subgraph labels Aug 13, 2020
@adamsoffer adamsoffer self-assigned this Aug 13, 2020
@yondonfu
Copy link
Member Author

yondonfu commented Mar 1, 2021

@adamsoffer adamsoffer transferred this issue from livepeer/livepeer-monorepo May 9, 2022
@adamsoffer
Copy link
Contributor

@0xcadams - According to this update by the graph team, updating graph-cli & graph-ts to their latest versions fixes this issue. Can you confirm?

@0xcadams
Copy link
Contributor

0xcadams commented May 11, 2022

Yeah so the update changed that field name to be gasLimit instead of gasUsed. And then there's the option to have a receipt field to get the gasUsed. We'd need to add a bit more code to get the gasUsed field to be actual gas used and not gas limit

graphprotocol/graph-node#3218 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: subgraph type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants