Skip to content

Allow empty tracer for transactions without executed opcodes #4965

@Ferparishuertas

Description

@Ferparishuertas

Problem

On hiero we do have transactions that are being included in consensus but rejected, which have contractresults but no opcodes executed.

For this kind of transaction error. we should enable to give an empty trace ( nowadays we are doing this only if the errros are part of the HEDERA_SPECIFIC_REVERT_STATUSES configuration list.

As some of these transactions have no opcodes, MN fails when asking for opcode details making relay fail

Mainnet example
{
  "error": {
    "code": -32001,
    "message": "[Request ID: 30ac63b1-6681-45b0-a52d-304c672570d8] Requested resource not found. Failed to retrieve transaction information for 0x61f9f18591c513ec3f5e93a49457781c603eaaf1a583703f505e0fd76ba41ada"
  },
  "jsonrpc": "2.0",
  "id": 1
}

Solution

Ensure that

const response = await this.mirrorNodeClient.getContractsResultsOpcodes(
, is able to capture errors within this method, for non existing opcodes transactions .

if no opcode failure or reponse null

  • check contract result
  • If contract result, empty tracer
  • if no contract result
    -- if synthetic, empty tracer
    -- if no synthetic fail, with 32000, "message": "transaction 0x... not found"

In summary

  • Ensuring code path does not fail on opcodes missing
  • Synthetic have is own flow
  • We are removing HEDERA_SPECIFIC_REVERT_STATUSES check, and generating empty traces for all cases that have contract results but no opcodes, and are not synthetic transactions.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions