Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Allow tracing message_transact transaction #1397

Closed
wants to merge 1 commit into from

Conversation

boundless-forest
Copy link
Member

Close darwinia-network/darwinia#1018

For an extrinsic which contains dispatch call Receive_messages_delivery_proof, in which contains Ethereum::message_transact, the original trace_transaction only considers the Ethereum::transact, not cover message_transact.

example like this: https://pangolin.subscan.io/extrinsic/3607818-1

You'll get the following result If you try to fetch the execute tracing log:

curl http://g4.pangolin-p2p.darwinia.network:9933 -H "Content-Type:application/json;charset=utf-8" -d '{ "jsonrpc":"2.0", "id":1, "method":"debug_traceTransaction", "params": ["0x2f154faf56ece403a0eb351d8abf5d583a607088f93c2f3b039edfb3f9b8ed7e", {"disableStorage": true, "disableMemory": true, "disableStack": true}]}' | jq

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32603,
    "message": "DispatchError: Other(\"\")"
  },
  "id": 1
}

This error generated at https://github.com/darwinia-network/moonbeam/blob/master/client/rpc/debug/src/lib.rs#L512

let _result = api
        .trace_transaction(&parent_block_id, exts, &transaction)    // Type: Result<Result<(), DispatchError>, ApiError>, Result: Ok(Err(sp_runtime::DispatchError::Other("Failed to find Ethereum transaction among the extrinsics."))
        .map_err(|e| {
            internal_err(format!(
                "Runtime api access error (version {:?}): {:?}",
                trace_api_version, e
            ))
        })?     // Result<(), DispatchError>
        .map_err(|e| internal_err(format!("DispatchError: {:?}", e)))?;

@boundless-forest
Copy link
Member Author

Prefer to add a new runtime function. Close this first.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot return tracing result for certain txs
1 participant