Abstract

This HIP describes initial support of JSON-RPC Relay and Mirror Node APIs for handling EVM transaction debugging requests.

Motivation

Ethereum nodes can be configured to enable support for debugging historical transactions and thus producing a detailed output log with information related to the transaction execution.

Hedera’s current architecture consists of three types of nodes:

Ongoing user experience work needs EVM execution to enable debugging historical transactions. Enhancing Mirror Archive Node with debug calls would allow users to replay historical transactions and inspect and analyse them by having detailed information for the execution based on a tracer type that is specified in the request. In addition, this enhancement would improve Hedera interoperability with different ethereum tools and providers, including Remix, Hardhat, Ganache, Geth, Alchemy, etc.

Rationale

Add support of debug_traceTransaction in the JSON-RPC Relay which returns detailed information for a historical transaction that was executed in the past.

The JSON-RPC Relay will make a request to the Mirror Node REST API which will be enhanced with a couple of new endpoints that return debug logs.

In order to enable trace calls, we should meet some requirements:

User stories

  1. As a user, I want to perform debug_traceTransaction calls to explore the op code traces for a historical transaction.
  2. As a user, I want to perform debug_traceTransaction calls to explore the sub calls that were executed for a historical transaction.

Specification

JSON-RPC Relay Trace API

The JSON-RPC Relay will be enhanced with a debug_traceTransaction endpoint. The endpoint has one required parameter - transactionHash - and also accepts list of properties - a tracer, and a list of configuration flags.

Example payload: