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

Add "debug_storageRangeAt" JSON-RPC method support #1631

Open
aftermathdigital opened this issue Jul 4, 2021 · 3 comments
Open

Add "debug_storageRangeAt" JSON-RPC method support #1631

aftermathdigital opened this issue Jul 4, 2021 · 3 comments
Labels
status:ready This issue is ready to be worked on type:feature Feature request

Comments

@aftermathdigital
Copy link

aftermathdigital commented Jul 4, 2021

Using Remix's local web3 provider to debug transactions submitted to a local hardhat node fails with the following error:

debug_storageRangeAt - Method not supported

Searching for debug_storageRangeAt in the hardhat repo returns no results, so I guess this method is just not implemented at present.

Reproduction steps:
I used a forking provider similar to the following, but I don't think you need to:

module.exports = {
  solidity: "0.4.24",
  networks: {
    hardhat: {
      chainId: 31337,
      forking: {
        url: "https://mainnet.infura.io/v3/api_key"
      }
    }
  }
};
  1. spawn a node with npx hardhat node
  2. configure solidity to use the local web3 provider
  3. deploy a contract
  4. perform a tx interacting with the contract
  5. Attempt to debug the transaction
  6. Step forward once

At this point the remix debug pane dissapears (presumably due to an unhandled error on their side) and the hh node console is spammed with debug_storageRangeAt - Method not supported

@fvictorio
Copy link
Member

Thanks for opening this @aftermathdigital. This will require some investigation. Especially: how does that method behave? Is it documented somewhere? Will this be enough for remix's debugger to work with Hardhat?

@aftermathdigital
Copy link
Author

aftermathdigital commented Jul 5, 2021

Regarding documenting the method... the best I can find is this: ethereum/go-ethereum#14350 which is the pull request that implements it in Geth.

I don't know if this will be enough to make remix work - but ganache has a similar issue open where they seem to think it is all they need (since you already have debug_traceTransaction) : trufflesuite/ganache#248

GetBlock have a little bit of documentation here, too: https://getblock.io/docs/available-nodes-methods/ETH/JSON-RPC/debug_storageRangeAt

It sounds like a bulk-version of eth_getStorageAt, so its implementation may be quite similar.

@tcoulter
Copy link

tcoulter commented Oct 6, 2021

Note to anyone reading the above comment: The Ganache issue for debug_storageRangeAt referenced above has moved to here: trufflesuite/ganache#1037

@fvictorio fvictorio added status:ready This issue is ready to be worked on and removed package:hardhat-core labels Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:feature Feature request
Projects
Status: No status
Development

No branches or pull requests

3 participants