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

eth_createAccessList return empty response on Gnosis #9444

Closed
nikolay-govorov opened this issue Feb 14, 2024 · 4 comments
Closed

eth_createAccessList return empty response on Gnosis #9444

nikolay-govorov opened this issue Feb 14, 2024 · 4 comments
Assignees
Labels

Comments

@nikolay-govorov
Copy link

nikolay-govorov commented Feb 14, 2024

Hello. It's seems that eth_createAccessList returns empty response on Gnosis instead of valid accessList

System information

Erigon version: 2.57.2-ffb6b83c
OS & Version: Linux
Chain/Network: Gnosis

Steps to reproduce the behaviour

curl $NODE_URL --data '{
  "id":1, "jsonrpc":"2.0",
  "method":"eth_createAccessList",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to":"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",
      "data":"0x70a08231000000000000000000000000Ab5801a7D398351b8bE11C439e05C5B3259aeC9B",
      "gas":"0xF4240"
    },
    "0x1ef211b"
  ]
}'

Expected behaviour

{
  "jsonrpc":"2.0","id":1,
  "result":{
    "accessList":[{
      "address":"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
      "storageKeys":["0xb1bbbef45f513c44e72efa75cfd0eb28e28e8ce68fbe4008ff8e3da60fc4b618"
    ]}],
    "gasUsed":"0x66b8"
  }
}

Actual behaviour

{"id":1,"jsonrpc":"2.0","result":{"accessList":[],"gasUsed":"0x66b8"}}
@yperbasis yperbasis added the gnosis Gnosis Chain label Feb 26, 2024
@ConnorSB13
Copy link

Update on this? We're blocked by this

@somnathb1
Copy link
Collaborator

How are you getting the "expected behavior" for this?

@somnathb1
Copy link
Collaborator

Looks like the reported "expected" storage key and address is being removed from the accessList in the logic implemented in #3453 and #8261
The supposed rationale is that to address is already warm and needs not be added to the access list unless a large number of its storage slots are being used.
Request for comment from @yperbasis

@yperbasis
Copy link
Collaborator

Yes, in those PRs we made eth_createAccessList to return the access list that optimizes the gas of a transaction. Since to (0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d) is already warm, it's actually wasteful to warm up just one slot because you save 100 gas (COLD_SLOAD_COST - WARM_STORAGE_READ_COST - ACCESS_LIST_STORAGE_KEY_COST), while having to pay 2400 gas (ACCESS_LIST_ADDRESS_COST) since you have to pay for to itself. If you want the old (non-optimal behaviour), set the 3rd (optional) parameter of eth_createAccessList ("optimizeGas") to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants