Introduction of Arbitrum trace method
The debug_*
method is a powerful RPC method for developers and analysts working with the Arbitrum Layer 2 network. It provides detailed visibility into transaction execution and allows developers and analysts to retrieve a detailed trace of the execution steps taken by a specific transaction within the Arbitrum Layer 2 network.
Arbitrum network launched a new client Arbitrum Nitro in August 31, 2022. This was a migration from Arbitrum One. Nitro is a significant technical upgrade for Arbitrum to be more compatible on EVM, better user experience, lower cost in gas and improving the transaction speed.
Due to such a migration, when we need trace, we will need to use 2 different trace method based on the block number.
- For block number less than 22207817, use
arbtrace_*
prefixed method. Example:arbtrace_transaction
- For block number greater than 22207818, use
debug_*
prefixed method. Example:debug_traceTransaction
Why do I get a null
response?
Arbitrum network provides L2_specific precompiled contracts, they exists with the contract address at 0x0000000000000000000000000000000000000064
(in decimal starting from number: 100). These precompiled contracts expose a variety of system-level functionality.
It is expected to see null
in response if the RPC method involved precompiled contracts.
How to easily identify transactions live in these precompiled contracts?
Table sourced from Arbitrum Documentation, you can also review the document for full context.
Precompile contract name | Contract Address | Purpose |
ArbAddressTable | 0x0000000000000000000000000000000000000066 | Supporting compression of addresses |
ArbAggregator | 0x000000000000000000000000000000000000006d | Configuring transaction aggregation |
ArbBLS | 0x0000000000000000000000000000000000000067 | Managing BLS keys |
ArbDebug | 0x00000000000000000000000000000000000000ff | Testing tools |
ArbFunctionTable | 0x0000000000000000000000000000000000000068 | No longer used |
ArbGasInfo | 0x000000000000000000000000000000000000006c | Info about gas pricing |
ArbInfo | 0x0000000000000000000000000000000000000065 | Info about accounts |
ArbOwner | 0x0000000000000000000000000000000000000070 | Chain administration, callable only by chain owner |
ArbOwnerPublic | 0x000000000000000000000000000000000000006b | Info about chain owners |
ArbosTest | 0x0000000000000000000000000000000000000069 | No longer used |
ArbRetryableTx | 0x000000000000000000000000000000000000006e | Managing retry-ables |
ArbStatistics | 0x000000000000000000000000000000000000006f | Info about the pre-Nitro state |
ArbSys | 0x0000000000000000000000000000000000000064 | System-level functionality |
Let’s take an example null response due to precompiled contract
curl -X POST \
'https://YOUR-ENDPOINT-URL' \
--header 'Content-Type: application/json' \
--data-raw '{
"method": "arbtrace_transaction",
"params": [
"0x0616ea2035f7c3e07978bf6f3b54b6b1a5f0f5e1542fa5dccafbd8e36da13ccd"
],
"id": 1,
"jsonrpc": "2.0"
}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
To view the transaction on Arbitrum explorer here. You will see the transaction is sent to contract 0x000000000000000000000000000000000000006e
(Arbitrum: ArbRetryableTx).
Comments
0 comments
Article is closed for comments.