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 service return empty accessList's storageKeys on goerli network data where it should not #23640

Closed
jangko opened this issue Sep 26, 2021 · 1 comment · Fixed by #23650
Labels

Comments

@jangko
Copy link

jangko commented Sep 26, 2021

I'm using geth's graphql to fetch block header and transactions of goerli net. At block 5000628 and tx no 71, one of the storageKeys is empty, but from JSON-RPC I got non-empty storageKeys. Same thing happened on block 5000647 tx no 42.

But the strange thing is both sender and tx hash returned by graphql query are correct. And using this sender and txhash I'm able to tell that the query result is wrong.

System information

Geth
Version: 1.10.8-stable
Git Commit: 2667545
Git Commit Date: 20210824
Architecture: amd64
Go Version: go1.16.4
Operating System: windows

Expected behaviour

...
 "accessList": [
    {
      "address": "0x57b96462b8d236cfec75dc9c0e0dcee20a22a7dd",
      "storageKeys": [
        "0x0000000000000000000000000000000000000000000000000000000000000006",
        "0x0000000000000000000000000000000000000000000000000000000000000007",
        "0x0000000000000000000000000000000000000000000000000000000000000008",
        "0x0000000000000000000000000000000000000000000000000000000000000009",
        "0x000000000000000000000000000000000000000000000000000000000000000a",
        "0x000000000000000000000000000000000000000000000000000000000000000c"
      ]
    },
    {
      "address": "0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6",
      "storageKeys": []
    },
    {
      "address": "0x4774be14b1e81eb9f78f5d58b061f796fb2c744f",
      "storageKeys": []
    }
]
...

Actual behaviour

...
"accessList": [
    {
      "address": "0x57b96462b8d236cfec75dc9c0e0dcee20a22a7dd",
      "storageKeys": []
    },
    {
      "address": "0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6",
      "storageKeys": []
    },
    {
     "address": "0x4774be14b1e81eb9f78f5d58b061f796fb2c744f",
     "storageKeys": []
    }
]
...

Steps to reproduce the behaviour

using graphql client such as altair, connect to http://127.0.0.1:8545/graphql
or using geth's built-in client http://127.0.0.1:8545/graphql/ui
then send this query:

query getAccessList($blockNumber: Long = 5000628) {  
  block(number: $blockNumber) {    
    transactionAt(index: 71) {
      accessList {
        address
        storageKeys
      }
    }
  }
}
@jangko jangko changed the title Graphql service returned empty accessList's storageKeys on goerli network data where it should not Graphql service return empty accessList's storageKeys on goerli network data where it should not Sep 26, 2021
@holiman
Copy link
Contributor

holiman commented Sep 28, 2021

Getting it:

> eth.getRawTransaction("0xa0fae49e54b60a9dd1782a8416e38948d7f24cbb68115abe2b1640c45fcf73de")
"0x01f901ca056a8545df5a9900830927c0940000000000d41c96294ccdac8612bdfe29c641af80b85300000000000000000000011e9068e25238910000000000004f980199b2b146f1000000004774be14b1e81eb9f78f5d58b061f796fb2c744f57b96462b8d236cfec75dc9c0e0dcee20a22a7dd02000017000018f9010df8dd9457b96462b8d236cfec75dc9c0e0dcee20a22a7ddf8c6a00000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000007a00000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000009a0000000000000000000000000000000000000000000000000000000000000000aa0000000000000000000000000000000000000000000000000000000000000000cd694b4fbf271143f4fbf7b91a5ded31805e42b2208d6c0d6944774be14b1e81eb9f78f5d58b061f796fb2c744fc080a01c02edc1cfa96bb7a7de9111504f71310d42ade698f992c98dabd685425af0c7a04256f35f0f541ca5d9080391913758fd2b98a1a9e43c9bf1733b97ea6cae9814"

Checking it:

$ rlpdump -hex "0x01f901ca056a8545df5a9900830927c0940000000000d41c96294ccdac8612bdfe29c641af80b85300000000000000000000011e9068e25238910000000000004f980199b2b146f1000000004774be14b1e81eb9f78f5d58b061f796fb2c744f57b96462b8d236cfec75dc9c0e0dcee20a22a7dd02000017000018f9010df8dd9457b96462b8d236cfec75dc9c0e0dcee20a22a7ddf8c6a00000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000007a00000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000009a0000000000000000000000000000000000000000000000000000000000000000aa0000000000000000000000000000000000000000000000000000000000000000cd694b4fbf271143f4fbf7b91a5ded31805e42b2208d6c0d6944774be14b1e81eb9f78f5d58b061f796fb2c744fc080a01c02edc1cfa96bb7a7de9111504f71310d42ade698f992c98dabd685425af0c7a04256f35f0f541ca5d9080391913758fd2b98a1a9e43c9bf1733b97ea6cae9814"
01
[
  05,
  "j",
  45df5a9900,
  0927c0,
  0000000000d41c96294ccdac8612bdfe29c641af,
  "",
  00000000000000000000011e9068e25238910000000000004f980199b2b146f1000000004774be14b1e81eb9f78f5d58b061f796fb2c744f57b96462b8d236cfec75dc9c0e0dcee20a22a7dd02000017000018,
  [
    [
      57b96462b8d236cfec75dc9c0e0dcee20a22a7dd,
      [
        0000000000000000000000000000000000000000000000000000000000000006,
        0000000000000000000000000000000000000000000000000000000000000007,
        0000000000000000000000000000000000000000000000000000000000000008,
        0000000000000000000000000000000000000000000000000000000000000009,
        000000000000000000000000000000000000000000000000000000000000000a,
        000000000000000000000000000000000000000000000000000000000000000c,
      ],
    ],
    [
      b4fbf271143f4fbf7b91a5ded31805e42b2208d6,
      [],
    ],
    [
      4774be14b1e81eb9f78f5d58b061f796fb2c744f,
      [],
    ],
  ],
  "",
  1c02edc1cfa96bb7a7de9111504f71310d42ade698f992c98dabd685425af0c7,
  4256f35f0f541ca5d9080391913758fd2b98a1a9e43c9bf1733b97ea6cae9814,
]

I'm syncing up a goerli node now to test the graphql, beacuse the node I was using above doesn't have graphql enabled.

holiman added a commit to holiman/go-ethereum that referenced this issue Sep 28, 2021
holiman added a commit to holiman/go-ethereum that referenced this issue Sep 28, 2021
@holiman holiman linked a pull request Sep 28, 2021 that will close this issue
fjl pushed a commit that referenced this issue Sep 28, 2021
sidhujag pushed a commit to syscoin/go-ethereum that referenced this issue Sep 28, 2021
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this issue Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants