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

graphql: null sometimes returned for status, gasUsed #26559

Closed
imnotanoob opened this issue Jan 26, 2023 · 6 comments
Closed

graphql: null sometimes returned for status, gasUsed #26559

imnotanoob opened this issue Jan 26, 2023 · 6 comments

Comments

@imnotanoob
Copy link

Hello,

I have not noticed this on testnet or prod yet, but there seems to be a schema difference between dev and other environments.
For example with this graphQL Query

{"query":"{block(number: 151) { number hash transactions {from{address} to{address} hash index gas gasUsed effectiveGasPrice logs { topics index data account {address}} status createdContract {address}}}}"}

We receive this as the response:

  "data" : {
    "block" : {
      "number" : 151,
      "hash" : "0xdda745d33d7db0c209f5992f0d7647437425674a97bb49f8faf418d0ddd97f08",
      "transactions" : [ {
        "from" : {
          "address" : "0x679e7cb3466710f73734641dd3bf90669dcd3e99"
        },
        "to" : null,
        "hash" : "0x482f6fa5400f18cb8be2ced414dd1a2c5701dcd2a4e9e72a80bb7cd737385e56",
        "index" : 0,
        "gas" : "0x989680",
        "gasUsed" : 287497,
        "effectiveGasPrice" : "0x1a13b8600",
        "logs" : [ ],
        "status" : null,
        "createdContract" : {
          "address" : "0xe7073d6fc1ed152738b0442a6b800bf2184fe889"
        }
      } ]
    }
  }
}

The "status" shows up as null.

@rjl493456442
Copy link
Member

What's your command to launch Geth?

I try to launch the dev mode geth geth --dev --graphql --http console and status can be resolved correctly.

@holiman
Copy link
Contributor

holiman commented Jan 30, 2023

What's your command to launch Geth?

And what is your geth version?

@imnotanoob
Copy link
Author

imnotanoob commented Jan 30, 2023

1.10.24.

This doesn't happen often. Extremely randomly. For example if you try 100 times it happens once.
Same for gasUsed.

GETH_ARGS=--dev --authrpc.jwtsecret /dummy.jwt --http --http.addr=0.0.0.0 --http.port=8546 --http.vhosts=* --http.corsdomain="*" --graphql.corsdomain="*" --graphql.vhosts="*" --rpc.txfeecap 0 --rpc.allow-unprotected-txs --allow-insecure-unlock --http.api="personal,eth,net,web3,debug,admin" --vmdebug  --vmodule 'rpc=5' --maxpeers 0 --nat none --graphql --verbosity 3

@fjl fjl changed the title Geth Dev GraphQL Null Status graphql: null sometimes returned for status, gasUsed Feb 9, 2023
@fjl
Copy link
Contributor

fjl commented Feb 9, 2023

Pretty sure this issue is related to #25868

@s1na
Copy link
Contributor

s1na commented Mar 6, 2023

This is caused by a data race happening here:

b.receipts = receipts

In which multiple transactions race for setting the receipts of a block.

@s1na
Copy link
Contributor

s1na commented Mar 30, 2023

Should be fixed in #26965.

@s1na s1na closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants