edr icon indicating copy to clipboard operation
edr copied to clipboard

Show better error message when `debug_traceTransaction` can't re-run unsupported transaction types

Open fvictorio opened this issue 6 months ago • 0 comments

Hardhat doesn't support using debug_traceTransaction with blocks that contain unsupported transaction types before the given transaction. This was already the case in pre-EDR Hardhat, but at least the error message was better:

Uncaught InternalError: Only legacy, EIP2930, and EIP1559 txs are supported

Which is not great, but it's better than what HH+EDR does:

thread 'tokio-runtime-worker' panicked at /build/crates/edr_evm/src/transaction.rs:55:18:
internal error: entered unreachable code: error: Header(ExcessBlobGasNotSet)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Uncaught [Error: task 433 panicked] { code: 'GenericFailure' }

We should detect this situation an throw a better error. The error message can be something like:

`debug_traceTransaction` cannot be used with transaction "<txHash>", because its block includes transaction "<unsupportedTransactionHash>" with the unsupported type "<unsupportedTransactionType>"

fvictorio avatar Aug 12 '24 11:08 fvictorio