foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Anvil crashes when calling `eth_getProof`

Open vmarkushin opened this issue 1 year ago • 1 comments

Component

Anvil

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

forge 0.2.0 (d4f626b 2023-08-09T00:22:15.229380000Z)

What command(s) is the bug in?

No response

Operating System

macOS (Apple Silicon)

Describe the bug

  1. Run the node anvil -p 8546
  2. Do the query: curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"id","method":"eth_getProof","params":["0x0000000000000000000000000000000000000000", ["0x0000000000000000000000000000000000000000000000000000000000000000"], { "blockNumber": "0x0" }]}' http://localhost:8546

The output: curl: (52) Empty reply from server

Node's output:

Listening on 127.0.0.1:8546
eth_getProof
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: TrieError("Invalid state root: [86, 232, 31, 23, 27, 204, 85, 166, 255, 131, 69, 230, 146, 192, 248, 110, 91, 72, 224, 27, 153, 108, 173, 192, 1, 98, 47, 181, 227, 99, 180, 33]")', anvil/src/eth/backend/mem/mod.rs:2324:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1]    42780 abort      anvil -p 8546

vmarkushin avatar Aug 09 '23 20:08 vmarkushin

Having the same issue. Any updates?

ltyu avatar Feb 14 '24 00:02 ltyu